Hi, I’m new to Three.js so maybe it’s simple case, but let me ask
I’m trying to create a simple scene composed of multiple objects using spacekit.js, which relies on three.js underneath.
While presenting the objects, I have encountered few issues. I’d greatly appreciate guidance on what I can change or check to achieve intended effect.
- The ‘green’ object (screenshots below) is created using LatheGeometry and MeshStandardMaterial with options as below:
THREE.MeshStandardMaterial({
color: {choosenColor},
side: THREE.DoubleSide,
transparent: true,
opacity: {choosenOpacity},
})
It’s single object with empty space inside. As you can see in the screenshots below (#1, #2), depending on the camera’s position, part of the inner edge is clipped or even not visible. How can I achieve an effect where the edges of the inner opening are always visible regardless of the camera’s position (as in the last screenshot #3)?
- Two ‘green’ objects (screenshot below) are created similarly to the single one described above. In this case, the ‘recess’ in the objects is not visible from every angle but depends on the camera’s position, sometimes it is not visible, sometimes is clipped (screenshot #1 - ‘recess’ of left object is partially clipped). How can I ensure that the ‘recess’ is always visible?
-
- Each of the ‘orange’ objects (screenshot below) is created using LatheGeometry and MeshStandardMaterial with options as below:
THREE.MeshStandardMaterial({
color: {choosenColor},
side: THREE.DoubleSide,
})
As you can see in the screenshot below, there is noticeable edge tearing when they intersect with other objects (green ones with transparent set to true, desribed above). How can I avoid this tearing and achieve smooth effect when objects intersect?
So far, I have tried adjusting renderOrder, using computeVertexNormals, setting depthWrite, depthTest for materials. However, I haven’t been able to achieve desired results.
All suggestions will be greatly appreciated. Thank you for any help