Jump to content
  • Advertisement
Sign in to follow this  
The Pentium Guy

Going "Inside" Skybox

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

Hey - when I view my skybox, I can see it fine from the outside (textured and everything) but when I try to go inside the skybox (whcih is obviously what I want) it disappears :s! Yes, the skybox is 'deep' :-), so i did'nt "Exit" the skybox right when I entered it. Can anything be done? pent

Share this post


Link to post
Share on other sites
Advertisement
Yes, reverse the normals in your skybox.

Don't want to do that? Well, then just reverse DX's culling order. Example:

g_pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);

Don't forget to set it back (D3DCULL_CCW).

Share this post


Link to post
Share on other sites
g_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE )
That should fix it.

edit: too slow!

Share this post


Link to post
Share on other sites
Are you loading the sky box from a mesh? If so, what modeling program are you using to create it?

edit: why I want to now is because there are ways to reverse the normals in some modeling programs - could save you some trouble [wink]

Share this post


Link to post
Share on other sites
Reversing the normals won't help since culling is based on the winding order of the vertices. If it's an indexed mesh then you can just iterate through each set of three indices and swap two of them.

Or just change the CULLMODE state as FenrirWolf said.

Share this post


Link to post
Share on other sites
Yup, from a mesh.

I'm trying to load the alley_sykbox.x from the directX sdk samples (honestly I don't know what modeling program)


edit: i'll create a mesh from my 3ds trial and give it a shot and let you know

pent

Share this post


Link to post
Share on other sites
The alley_skybox should be fine, no need to play with the normals. I wonder if it is something else that is going wrong. I have a page on skybox coding here: skybox if you are interested.

Share this post


Link to post
Share on other sites
Quote:
Original post by Donavon Keithley
If it's an indexed mesh then you can just iterate through each set of three indices and swap two of them.


This is probably a much better idea than changing the CULLMODE. Disabling and then reenabling culling will take hundreds of cycles. Not that I'm into micro-optimizing but changing the winding order is just as easy, and then it requires no special handling.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!