[英]is it possible to render particles behind semi transparent objects in scene kit ?
I'm trying out Scenekit and I'm running into an issue when I'm trying to render particles behind semi transparent objects. 我正在尝试使用Scenekit,当我尝试在半透明对象后面渲染粒子时,我遇到了一个问题。 They simply don't render while other objects in the scene do.
它们根本不会在场景中的其他对象进行渲染时进行渲染。
On this pictures all particles are in front of the semi transparent box, all particles that are behind are not displayed. 在此图片上,所有粒子都位于半透明盒子的前面,后面的所有粒子都不会显示。 You can see that the sphere is properly displayed and the colors of the covered part are attenuated.
您可以看到球体已正确显示,并且覆盖部分的颜色会减弱。 I would expect the same from the particles but maybe the rendering choices of the framework to make particle systems efficient make this kind of behaviour normal ?
我期望从粒子中获得同样的东西但是框架的渲染选择可能使粒子系统有效使这种行为正常吗?
I've tried to google/stackoverflow it, but it seems that scenekit is not a very well covered topic. 我试过google / stackoverflow它,但似乎scenekit不是一个很好的主题。
Translucency depends heavily on draw order. 半透明度在很大程度上取决于绘制顺序。 With alpha blending the renderer reads the current values in the frame buffer, and mixes in the translucent color on top of those values.
使用Alpha混合时,渲染器会读取帧缓冲区中的当前值,并在这些值的顶部混合半透明颜色。
What this means is that opaque objects should be drawn first and translucent objects should be drawn from back to front. 这意味着应首先绘制不透明物体,并从后向前绘制半透明物体。 If opaque objects are drawn after translucent objects the renderer has no current colors to mix with.
如果在半透明对象之后绘制不透明对象,则渲染器不会混合当前颜色。
With SceneKit the draw order can be controlled by the renderingOrder
property on the scene node. 使用SceneKit,绘制顺序可以由场景节点上的
renderingOrder
属性控制。
The order the node's content is drawn in relative to that of other nodes.
节点的内容相对于其他节点的顺序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.