3d forums home Resources for 3d artists

3D rendering of only visible faces

Posted: February 23, 2009
zeeshanzia84
Hi,

I am actually doing Computer Vision research and have no experience in 3D rendering.

I have a 3D model and I know that the camera is looking at the model from a particular direction, now I want to render only those faces that will be visible from that camera. Can someone please point me to some algorithms for calculating which faces would be visible and which won't be visible.

Thanks a lot in advance.
Posted: February 23, 2009
3d artist gallery Andyba
One idea is to shoot a ray from the camera and stop it when it intersects the closest polygon to the camera.
In dependence of quality you can shoot different number of rays for every pixel.

Another idea is to use the polygon normals - if the angle between direction of camera and the polygon normal direction is less than 90 degrees you can remove this polygon from rendering.
Posted: February 23, 2009
zeeshanzia84
Thanks a lot.

Do I have to read the values of surface normals from the 3D model file or is there someway to find it directly.

I mean, ofcourse I can take a cross-product, but depending upon the ordering of the vertices, I can get two opposite directions. Is there any way to choose the 'right' one?
Posted: June 12, 2009
3d artist gallery Andyba
Actually the 3d models usually contain information about polygon surface direction. In 3d modeling packages it is usually possible to change this direction, in 3ds max it is called inverse normals.