• Advertisement
Sign in to follow this  

Mesh unhoped-for transparency.

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

Hello

I'm learning to load meshes from files.

My problem is that my result has some unhoped-for transparency.
Well, sorry for my English, I'll better show it in pictures.

Right picture- is how it should be(from DirectX SDK Viewer), and left – is what I have.

carbi.jpg
Why tires are always full visible?
I realized that it is unrelated to Lights and unrelated to different material types. Same problems with meshes containing only one material, some planes are visible trough others.

Help please. Any directions about what's could be wrong? Or what did I forget?

Share this post


Link to post
Share on other sites
Advertisement

Looks like you are culling the wrong winding order of polygons... change your cull mode to the oposite one. Make sure all your meshes have consistent winding order as well otherwise weird reults like that can happen as well (turn backface culling off to test that, should look the same with and without back face culling). Note that using a transform matrix with negative determinant also flips the winding order (typically if you mirror an object).

 

Could also be you disabled the depth buffer but I think the cull mode is most likely.

Share this post


Link to post
Share on other sites

Solved.

Thanks.

I've disabled Z-buffer.

Not disabled in fact, but disrupted it work by setting ZnearPlane =0, when setting Perspective. I thought it is ok. but it's not.

Me doing it wrong. smile.png

Share this post


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

  • Advertisement