#Visible Triangles of an Object
9 messages · Page 1 of 1 (latest)
What do you mean by 'remove'? By default Three won't render any triangle that faces away from the camera; https://threejs.org/docs/#api/en/materials/Material.side
You need to make sure the order of your vertex in your faces array image are in the right order
I want to permanently remove those faces, and export the changed model. So if I can't delete them using threejs, atleast I need the list of triangles (or ids) to be deleted. Handling UVs is a different thing.
Yes yes, if I have ids, I need to ensure lot of order-related stuff. But how to get those backside triangles ids?
The most straightforward way would be to just do the math yourself — compute the triangle's normal, take the dot product with your camera facing vector, and check its sign.
yes, I can write the code manually. but then how do I make it fast, because the triangles are in millions?
How fast does it need to be? The time to do the multiplies and compares should be a fraction of the time needed to actually export the triangle data.
Web workers if it's manageable. If not, shaders it is. Never did shaders for vertex computations in three thi