SkyBox

We now have skybox, courtesy user Graum and myself (brought over from our game “Dirt”.)



While it’s been stated on these boards that you could simply use a Box object for Skybox, this is not easily so because it’s fairly difficult to trick Box into allowing you to have a different texture on each side.



Skybox is easy to use and has a nice demo (TestSkybox, what else?)



Enjoy!

Nice work :slight_smile:



And what about a SkyDome or SkyPlane ? A SkyDome gives wonderful results and has the advantage to be made like a sphere, so it can be rotated to give the impression that the clouds are moving in the sky…

Yep, Skydome is on the jme.dev.java.net list of todos :slight_smile: I’ll be on it in the near future.

I remember reading an old thread from mojomonk about "the old" skybox in 0.1 having depth sorting turned off so anything else would be rendered in front of - making the skybox a background.

Is this possible for the new skybox as well ?

yes, just assign a ZBufferState to the World with the proper z write function (probably NEVER).

Do you refer to the skybox by “world” or the rootnode ??

Must the skybox be in another rootNode for this or be a rootNode on it’s own?



I have tried all available zBufferStates on the skybox / it’s four quads and the rootNode already, but no luck.



At the moment i use cep21’s HelloIntersection to play with the skybox and it’s under the rootNode in the normal world - scenegraph but i’ll experiment some more as soon as i get home.

did you do:



someSkyBox.setForceView(true); ?

That guest was me.



I experimented some time with jmetest.renderer.TestSkybox

i stretched the box to reach outside the skybox and then applied various ZBufferStates to the box and or the skybox and it’s single quads

and setForceView(true) on the skybox and or the box



sadly i was not able to achieve the result i wantet to get. :frowning:

(showing the skybox but not culling the box at it)



can you direct me on what and where to add the ZBufferState in TestSkybox.java to get this ?

Hey winkman,



What was needed was a little monkeying with how the queue was used AND the zbuffer change to skybox. I’ve taken the liberty to set the default action to do as you describe… makes the most sense. You’ll see I’ve also changed the test a lot. The skybox is now only 10x10x10! :slight_smile: Also, the only thing you need to do to ensure your objects appear in front of the skybox is use the renderqueue, opaque or transparent.



Have another look at the test in cvs.

Thanks a lot !

i’ll try it as soon as i get my fingers on it.



edit: i did and it works fine :slight_smile: