Going "Inside" Skybox

Started by
17 comments, last by Donavon Keithley 19 years, 8 months ago
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
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).
--- - 2D/Pixel Artist - 3D Artist - Game Programmer - Ulfr Fenris[[ Gaping Wolf Software ]] [[ GameGenesis Forums ]]
:-) thank you, i'll give it a try tomorow.
How do I reverse the normals for my skybox btw?

pent
g_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE )
That should fix it.

edit: too slow!
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]
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.
Donavon KeithleyNo, Inky Death Vole!
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
You have the option to flip normals if you use the Panda Exporter to export your .X files from 3DS Max.
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.
------------------------See my games programming site at: www.toymaker.info
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.

This topic is closed to new replies.

Advertisement