• Advertisement
Sign in to follow this  

Meshes and Backface culling

This topic is 4244 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

The other day I was trying to get "bigship1.x" displayed on my screen using a right handed system. At first I didn't get any triangles at all, blank screen. I started tweaking out the program until I set the D3DRS_CULL to D3DCULLMODE_CW, or something like that. Although am happy that it got displayed after that, however I expected it to atleast show the inner faces of the mesh. Something over here is weird, or atleast I am missing out on something.. Please help.. Am in a paranoial phase right now

Share this post


Link to post
Share on other sites
Advertisement
Well, changing handedness can change the apparent winding order of triangles, which can cause back/front-face flipping.

I would recommend adding a debug key to your program to let you switch between culling modes NONE, CW (clockwise), and CCW (counter-clockwise) to see what the effects are on the mesh you're trying to draw. Also, sometimes switching to wireframe rendering can help with debugging visualization.

Btw, if you want the front & backs of your triangles to render (so you would see the "inside" of the mesh), you would set the cull mode to NONE.

Share this post


Link to post
Share on other sites
I was peculiarly addressing the fact that when I switched into CW, the mesh was rendered.. So that would mean that it should have rendered something when it was in CCW (the other side of the ship) but it didn't... If I am wrong in my conclusion please tell me.

Share this post


Link to post
Share on other sites
Well, the normals will be pointing away from you, which could cause it to calculate a black color for that vertex, and if you are filling the backbuffer with black when you clear it, it will just blend in. Try setting the background color to white.

If that is not it, then maybe the fixed pipeline checks the direction of the normal and still culls backpointing faces? It doesn't cull when you set cullmode to NONE.

Share this post


Link to post
Share on other sites
Quote:
Original post by arithma
I was peculiarly addressing the fact that when I switched into CW, the mesh was rendered.. So that would mean that it should have rendered something when it was in CCW (the other side of the ship) but it didn't... If I am wrong in my conclusion please tell me.


hi arithma ,
can u put a screen shot so we could know better about ur problem and put also the code that u use to create the device and the world veiw projection matrixs u r using.

best regards,

Share this post


Link to post
Share on other sites
Quote:
Original post by arithma
I was peculiarly addressing the fact that when I switched into CW, the mesh was rendered.. So that would mean that it should have rendered something when it was in CCW (the other side of the ship) but it didn't... If I am wrong in my conclusion please tell me.


We don't have enough information to draw any conclusions - we could start guessing, but that wouldn't help much.

Share this post


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

  • Advertisement