当前位置: 动力学知识库 > 问答 > 编程问答 >

blender - overlapping of geometries in Scenekit

问题描述:

I'm have put a plane onto the same height as the edges of the cube are. Everything you see was created in Blender and you can download Blender file here. The plane is a little bigger than the hole so that they overlap.

The whole rendering is a little funny. I get this frame around the hole due to plane and cube edge having the same hight. I only want the plane to be visible. How can I fix this?

EDIT: I can always change height for a tinywiny bit but I would prefer a different approach due to shadows and reflections and stuff.

网友答案:

I'm a little confused because you are referring to a hole while it seems that your cube does not have any hole and your are adding a plane on top of it.

What you are seeing is called depth fighting and it's because both objects have the same z-value, yes.

SCNMaterial exposes properties like writesToDepthBuffer and readsFromDepthBuffer that can help with that. Also check SCNNode's renderingOrder property.

分享给朋友:
您可能感兴趣的文章:
随机阅读: