3D rendering of only visible faces


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.


  • It's hard to say whether it's easier to integrate those algorithms into your own application or integrate a game engine's api in your application. Either way if you're still looking for the answer I'd have over to the forums at open source game and rendering engine websites. The real source of info might be opengl.org - otherwise the forums at the Crystalspace 3D Game engine home page or the Ogre3D rendering engine home page. Those should at least give you some ideas if not a good start.

    [link=http://www.moonrisedesign.com/web_application_development.htm]web application development[/link]
  • The general approach is this:

    Get the vector of the camera's pointing direction.
    For each face get its normal. Note there are two normals for each face, the front and the back.

    Using the dot product between the normal and the pointing direction you can figure out if the face is point towards or away from the camera. You typically want to cull faces pointed away from the camera if you are rendering a solid volume. If you are using OpenGL or DirectX, this culling is controlled internally but you can enable/disable it manually.

    You'll also want to do some frustum culling http://www.flipcode.com/archives/Frustum_Culling.shtml

    This will decide which items are in view and which are out of your viewing area.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!