Determining visibility

Hello,

I’d like to know, if there is a possibility to determine the visibility of a mesh component - face, edge, vertex.
I mean the information must be in Blender (there is a button in the 3dview), but how can I access to them from Python?

I don’t like to program a new ray tracing approach, because it tend to be very time consuming.
OR did somebody know you to access the Z-Buffer using the Python API?

Thanks for your answers,
semmelb

It IS possible but Id suggest not bothering doing it.

the is existing functions to pick the first face on the mesh with the mouse if you need.

can you say what you want to program?

Of course.

At the moment I am working on an Image based Rendering and Modelling approach.

For the last part, the rendering with textures, I need the visibility check.

For getting the images (camera-shots) on the model I am using StickyUV-coords.
Selecting a camera and pressing “MakeSticky” - this leads to an UV-map where all faces are in. The faces which are behind an other face are textured, too.
In the next step, I convert the StickyUV-coords into normal uv’s

So I have wrong textures at non-seen sides.
Adding a visibility check in the conversion step will solve the problem.

Semmelb

@ideasman24

Can you please tell me, what kind of solution do you suggest?

Has nobody a similar problem?

Wouldnt you just do a loop on the faces and see if any of the verts in the faces are seen? - if they are set the correct UV’s for all verts in that face.

Ok, this would be easy and how can I determine the visibility of a vertex?
I tested the hide attribute, but this did gave me the result I expected.

So, I have done a simple backface-culling.
The results are not impressive, but it works.
Maybe I implement an extended visibility check.

It is a pitty, that I do not got access to the Blender internal visibility calculation.

Semmelb

Hi
I have the same problem, i.e determine the visibility of a mesh ( I want to automatically sync with music whenever certain objects enter the viewport).
Is it possible to post the backface-culling script you wrote ?
Is there now a build-in solution in Blender to determine visibility ?
Thanks a lot for you help