So I’ve been working on one of my games when I came across a problem in obj files.
Thats a picture of 2 imported objs’ into three js the left one is transparent, however if I turn my camera down it looks like its clipping or something
thats the picture of the transparent obj but when I put ‘transparent: true’ to my obj’s material it just does it even without opacity.
Normals on the cube are most likely flipped (example.) What you should do - is fix the normals in Blender or another 3D program. What you can do is just set side: Three.DoubleSide
on the material - and it should work just fine
alright so i did the flipping and stuff but it doesnt work when i turn the camera down it starts clipping.
It’s going to cause lots of problems using .transparent = true
on a material without opacity… transparent objects are are very sensitive to drawing order. Make sure that no materials are transparent unless they absolutely need to be.
If you need the object to be transparent though, maybe show the bounding box of each mesh in the scene (not just the glitchy one!) using BoxHelper? Everything is sorted by the center of its bounding box, if your larger mesh in the background is also transparent, then trying to sort one object inside another is going to lead to more problems.