Results 1 to 4 of 4

Thread: 3d Hidden faces

  1. #1

    Thread Starter
    New Member Oš kupit traktor's Avatar
    Join Date
    Apr 2007
    Posts
    5

    Question 3d Hidden faces

    Hello Everyone,

    I have a problem in 3D engine in API

    How I can find out what faces of some model are hidden? ex. on cube hidden faces are bottom,back and side faces?

  2. #2
    Lively Member
    Join Date
    Jul 2002
    Posts
    86

    Re: 3d Hidden faces

    A fast way to determine which faces are hidden is by just looking at the normal of the face (often you need to compute it). If you do surface normal dot the camera position and its negative, it is for sure hidden since it is facing the opposite way. If its positive you need to do more checks.

    There are a TON of algorithms on hidden surface removal. Theres the painter's algorithm, Z-Buffer algorithm (or depth buffer), scan line algorithm and many more. Just do a quick google for "Hidden Surface Removal Algorithms" and read/understand them.

    As for the API question, I don't exactly know what you mean? You would need to explain it more. I know that in OpenGL it uses Backface removal (by using surface normals) and Z Buffer method, but you have to enable it. As for DirectX, I'm not entirely sure what it uses but I would assume it uses the same operations as OpenGL. Most graphic engines already take care of hidden surfaces and display the scene correctly.

    If you actually want to make a list or something of all the hidden surfaces, you would need to implement one (or a combination) of the hidden surface removal algorithms and then you would find out what surfaces are hidden.

  3. #3
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: 3d Hidden faces

    Try Culling?

  4. #4

    Thread Starter
    New Member Oš kupit traktor's Avatar
    Join Date
    Apr 2007
    Posts
    5

    Talking Re: 3d Hidden faces

    Thanks a lot people. Algorithms are cool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width