Skydome questions

hey guys… just wanna know more about skydome … so if possible please gimme your ideas from the skydome point of view …


  • do i need a extremely large skydome if my terrain is very very huge?
  • performance considerations ? and will the texture resolution be sufficient? 

you can have an extremely small skydome :slight_smile:



The skydome and skybox are always rendered behind everything else, so it dosent matter really how big it is.

wow … really ? u mean when look up(on terrain)… everything will be nicely covered by the skydome? haha sorry … really curious about this …  ://

Core-Dump said:

you can have an extremely small skydome :)

The skydome and skybox are always rendered behind everything else, so it dosent matter really how big it is.

Really? How does it manage that? Objects outside the skydome cannot possibly be drawn as inside it.. can they?

only the viewpoint differs in the following two screenshots:









edit:

Theres a nice explanation: Game Programming Wiki - GPWiki

When you draw the skybox, you make sure z-writing is off (glDepthMask). Then you turn z-writing back on and draw your scene.

In jME this is done by zbuffer.setWritable(false);

Nice pics there.



Still - objects outside the skybox are not drawn inside the box here… so if I make a really small skybox, it will not automagically still be displayed behind everything. If I have 2 boxes 100 unit appart and the diameter of my skydome is 30 units, there is no way I can view both of these boxes without moving… right?

the size of the skybox should be about the size of your maximum viewing distance right? By viewing distance, I mean the distance you are going to want to stop rendering at (after the skybox that is).



if you can only see 30 units away, then one box may be visible, but the box 100 units away would not.


Mindgamer said:

there is no way I can view both of these boxes without moving... right?


I think that you would never be able to view both of the boxes, unless you moved completely outside of the skybox.

Actually, skyboxes generally work by not writing to the zbuffer… which means that they do not block anything else from drawing on top of them, even if they are "further away".  By drawing over the top of the skybox, all object appear to be closer to you than the sky.

wow … haha actually i just wanna ask what if i have an extremely large terrain … with a small skybox/dome,  can i still make it for the whole terrain?

Mindgamer said:

Still - objects outside the skybox are not drawn inside the box here.

If thats the case, you have a wrong ZBuffer setting. (or they are that far away that they are outside the viewing frustum).
The jME SkyBox sets the zBuffer to non writable, maybe you are overwriting this.
The Sphere in the Screenshot i posted is reeealy far behind the reaaaly small Skybox.
wakaoz said:

with a small skybox/dome,  can i still make it for the whole terrain?

size does not matter :)

Pretty cool, never realized it works like that

hahahaha … alright … im trying hard to imagine how a large terrain with a small skybox will look like? or it will fit nicely under the small skydome (no diferent when we look around from the terrain)… thankz anyway for letting me know that's not a problem and this your answer rite ? thankz thankz …


Core-Dump said:

you can have an extremely small skydome :)

The skydome and skybox are always rendered behind everything else, so it dosent matter really how big it is.
Core-Dump said:

you can have an extremely small skydome :)

The skydome and skybox are always rendered behind everything else, so it dosent matter really how big it is.


Is this also true for fog ?
In my current setup i have a fogstate on the rootnode, lets say fog start at 300 and end at 1000. I also have my skybox attached to the rootnode, if the skybox has a size of 50 its not affected by the fog since the fog only starts at 300 which is beyond the skybox. If i increase the size of the skybox to say 900 it is affected by the fog.

Not sure if im doing something wrong here or this is just something to keep in mind when you use fog and a skybox.

wakaoz and Hellmaster: Try the TestSkyBox example, the comments in there should give you a good idea of how skyboxes really work!

Thats pretty neat, a bit counter intuitive though.