What the... my mesh is see-through!

Started by
2 comments, last by ToddTT 22 years, 3 months ago
I''ve loaded a mesh and it appears just a bit transparent. I can see faces that are hidden beneath other faces. *** The mesh however looks great when I load it into MeshViewer (wish I had the source for that!). *** I''m new to lighting and render states and such... I''m guessing this might be the area of the problem. Does anybody have a clue why my mesh is a little bit transparent??? Thanks! Todd
Advertisement
Are your normals pointing the right way? Try changing the cull mode to none. If everything looks ok, your vertices are specified in the wrong order or are backwards, causing some of them to be culled and not drawn.

d3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE)
Thanks... but I already tried with culling on and off!

I''ve modified my code to use the SDK helper functions for setting up the DirectX device, lighting, etc... and the problem has gone away.

I''d still like to know what was the bit that caused this though.

Thanks,
Todd
G''day!

Without seeing anything, this is just a guess, but it''s probably related to your Z-Buffer. I would guess you either didn''t have one, or didn''t activate it. The SDK code probably did.

Without a Z-Buffer the faces get drawn in the order they appear in the Vertex Buffer, so it''s very likely that some hidden faces would be drawn over other ones.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement