- Home /
How to know if triangles in a mesh are occluded or illuminated by directional light?
Hi all,
I'd need to know if the triangles of my mesh are occluded or illuminated. If they are illuminated it would be great to find a way to know how much brightness they have, and thus be able to set a bright threshold from which decide if a triangle is completely occluded or not. My scene is very simple, it has the following elements: a directional light (pointing to a mesh) and the mesh.
Do you know different approaches to do this? Thank you very much for all in advance!
Hi, by Occluded I take it you mean lit up or not lit up?
I normally think of occlusion in terms of rendering a mesh or not in Unity, and in terms of Ambient Occlusion when baking a scene in Blender for instance?
As for trying to do what I think you are trying to do I have no idea, it sounds like quite a complicated thing to do, beyond my current skill anyway. Sorry :(
By occluded I mean those facets that are not illu$$anonymous$$ated because there are other facets between them and the directional light.
Any solution? please, I'm totally confused :)
Is there any way to obtain the brightness of the triangles or colors of the vertices in my mesh once the light is acting on them? thus, a dark color could indicate that that facet is about to be occluded.
I prob cant help you with this at all but if you can post a pic of something like the end result that you are trying to get by doing this, then maybe someone out there can think of a way to achieve this that may possibly be a totally different method for getting an acceptable solution to the problem you are trying to slove
Your answer
![](https://koobas.hobune.stream/wayback/20220613165218im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
White artifacting bordering mesh triangles 0 Answers
Color triangle on mesh 3 Answers
How to obtain the brightness/color of a triangle? 2 Answers
Accessing Mesh: Triangle and Vertex array fields directly? 0 Answers
Procedurally Generated Mesh Texturing 0 Answers