• Advertisement
Sign in to follow this  

What is Culling and Normals?

This topic is 4614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering what culling was and how it affected the rendering speed when it was turned on vs. turned off? I'm using DirectX and I was making a box. If I have culling ON then it will render the box showing half of each side (one polygon is only visible from the other side). If I have culling OFF it looks like a normal box. The mesh file is included below. Also, on the example below how would i calculate the mesh normals? I understand that it's the multiplication of two arrays (to find the purpendiculare array) but I'm not sure. Does anybody have any help on this. Thank you, J ---------------------- xof 0303txt 0032 Mesh v0{ 8; 47.00; 32.00; 0.00;, 143.00; 68.00; 0.00;, 44.00; 39.00; 0.00;, 140.00; 75.00; 0.00;, 47.00; 32.00; 200.00;, 143.00; 68.00; 200.00;, 44.00; 39.00; 200.00;, 140.00; 75.00; 200.00;; 12; 3; 0,1,3;, 3; 0,3,2;, 3; 0,1,5;, 3; 0,4,5;, 3; 0,2,6;, 3; 0,4,6;, 3; 4,5,7;, 3; 4,6,7;, 3; 1,3,7;, 3; 1,5,7;, 3; 2,3,7;, 3; 2,6,7;; MeshTextureCoords { 8; 0.0;2.22;, 1.11;2.22;, 1.11;2.22;, 0.0;2.22;, 0.0;0.0;, 1.11;0.0;, 1.11;0.0;, 0.0;0.0;; } MeshMaterialList { 3; 12; 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2;; Material { 0.00;0.00;55.000;0.000;; 0.00; 0.00;0.00;0.00;; 0.00;0.00;0.00;; } Material { 0.00;44.00;0.000;0.000;; 0.00; 0.00;0.00;0.00;; 0.00;0.00;0.00;; } Material { 44.00;0.00;0.000;0.000;; 0.00; 0.00;0.00;0.00;; 0.00;0.00;0.00;; } } }

Share this post


Link to post
Share on other sites
Advertisement
Culling is for Back Face Culling (doesn't render the backside of a triangle), and normals are vectors that describe which way a polygon is facing. Although I didn't read the file info, I believe that your "disappearing" faces have been defined in a the wrong order (depending on if you're using CCW culling or CW culling).

Share this post


Link to post
Share on other sites
So with culling ON then the rendering will be faster - because it doesn't render the back sides of polygons?

Share this post


Link to post
Share on other sites
Another type of culling is called frustum culling. This method determines if geometry is actually within the viewport and if so draws it, otherwise, doesn't. So if something is behind you, it never gets sent to the video card. In my non-expert opinion, this method is probably the overall best method to optimize. It gets rid of more geometry than any other method(usually). Any other methods are for getting rid of tris that are onscreen, but aren't seen, or to make simply that they are less tris, detail controlled meshes or whatever they are called is an example.

Share this post


Link to post
Share on other sites
Backface culling will give you a limited speed increase - however I stress limited because a great deal of work is required before this type of culling can be determined, and the polygon rejected.

You will get most increase when using this method with complex shaders, as you are saving on fillrate as opposed to bandwidth (which is helped by occlusion or frustrum culling).

Share this post


Link to post
Share on other sites
Quote:
Original post by calidev234
So with culling ON then the rendering will be faster - because it doesn't render the back sides of polygons?


Correct. But as Programmer16 mentioned, you must make sure you winding is consistant, or some of your polygons will be rendered backwards.. and as backface culling is on, they'll be invisible.

This might help you with your normals question.
http://www.devmaster.net/forums/lofiversion/index.php?t414.html



FYI: Just as an aside, not that it's entirely relevant.. developers for the PS2 usually skip backface culling, simply because the PS2 has so much graphics bandwidth that it's extremely hard to fill-limit the thing. I believe the spec is a 2,560-bit graphics data bus.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement