Archived

This topic is now archived and is closed to further replies.

ToddTT

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

Recommended Posts

ToddTT    122
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

Share this post


Link to post
Share on other sites
invective    118
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)

Share this post


Link to post
Share on other sites
ToddTT    122
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

Share this post


Link to post
Share on other sites
DrunkenHyena    805
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

Share this post


Link to post
Share on other sites