Displaying Skydome in DirectX

Mohamed Abowarda
Mohamed Abowarda used Ask the Experts™
on
I have a huge sphere made in 3Ds max, I am trying to display it in DirectX (using C++), however I tried to set the texture in 3Ds to "2-Sided" so the sky texture appear inside the sphere as well but text texture doesn't appear inside the sphere in DirectX.

How can I make the sphere texture appear inside the sphere as well (2-Sided) so I get a skydome?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hello Medo3337,

Not much time to answer questions at the moment, didn't get back to your last question, but it seems you got there in the end.

The problem in this case is Direct X doesn't have double sided materials in the same sense as 3D Studio Max.  There are two solutions for this -

Firstly, in Max you can reverse the sphere so that it is inside out.  To do this it has to be converted to an editable mesh.  Then you use the flip tool in the Surface part of the modifier.  This makes it so that you see the sphere from inside, even if it uses a single sided material.

Second option is to turn off culling in D3D when rendering the sphere.  Something like Device.SetRenderState (D3D_CULLMODE, D3DCULL_NONE).  Normally cull mode is set to D3DCULL_CCW.  Set it back after drawing the sky or it slows down the rendering.

This is a problem with backface culling as described here.
http://en.wikipedia.org/wiki/Backface_culling#Backface_culling
http://www.videotutorialsrock.com/opengl_tutorial/backface_culling/video.php
Mohamed AbowardaSenior Software Engineer

Author

Commented:
Thank you,

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial