What is the most efficient way to identify the vertices that are visible from a particular viewpoint?
I have a scene composed of several 3D models. I want to attach an identifier to each vertex (ModelID, VertexID) then generate 2D images from various viewpoints and for each image generate a list of the visible vertices identifiers (essentially this is for an image processing application).
Initially I thought to perform a dot product between a vertex normal and the camera view vector to figure out if the vertex is facing the camera or not, however if the model is occluded by another object this test would not work.
Thanks in advance
GL_TRIANGLES
) to populate Z-bufferGL_POINTS
), selecting a different RGB color for each vertex, which maps to your model/vertex IDsNot very fast, but it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With