0
$\begingroup$

Given the point (x,y,z) and meshes scattered around this point in the space, where each triangle on the mesh has its normal known, I want to be able to detect which triangles are not visible to the camera (from all possible angles of view from this point). What would be the best way to implement that in Blender - is there maybe already a possibility to achieve this using some higher level API functions or shoud I implement it from scratch?

What I did so far was reading about backculling, but all the algorithms I found so far are related to a specific camera view, not in all possible directions from the point (I guess logic should be similar?).

Thank you for the provided ideas and answers!

$\endgroup$
  • 1
    $\begingroup$ Look up ray casting. Example of raycasting thru the camera bounds. Can raycast from any point in a scene with Scene.raycast. All directions from a point would be infinite, so would have to choose some resolution. $\endgroup$ – batFINGER Jan 21 at 13:53
0
$\begingroup$

At the end I implemented simple check, where I:

1) Calculate the center of triangle, and its normal

2) Calculate direction vector from view point to center of triangle

3) Calculate angle between triangle normal and direction vector

4) If angle is bigger than 90 degrees, the triangle is not visible.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.