1
$\begingroup$

I am working on an optimization problem where I want to find information about the amount of faces of a mesh visible from a set of randomly distributed points. Ideally, I would like to index the faces {1,2,...,N} and calculate a visibility index for each face stating whether each surface is visible from each individual point or not. It is also important that the evaluation is quite fast (less than a second). I am hoping to find a solution to this problem using Blender.

A simple example of the output I want:

Example face visibility list.

In an early attempt, I have used the Suzanne mesh and a point light source in Blender Render. I UV-unwrapped the mesh using the Lightmap Pack and baked a lightmap. To get a distinct difference between visible and shadowed faces I did the following modifications of the the lamp:

  • Energy increased from 1 to 1000
  • Ray Shadow enabled
  • Light falloff disabled (no distance attenuation)

Left: Test scene with Suzanne mesh and point lamp. Right: Baked lightmap where visible faces are white, hidden faces are black.

Test scene overview. Test scene baked lightmap.

However, this method does not give me the visibility of each face in a direct manner. Instead, I would have to postprocess the lightmap image to extract the information I want.

Any ideas how I can achieve what I am trying do?

Thanks in advance!

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.