Dynamic Skybox

Alright,



I’m still messing around with the skyboxes since yesterday, and I’m now trying to figure out the best way to make a dynamic skybox.



I’ve read this in the wiki and still trying to figure out how to do this :$:

-A box or sphere map is the simplest solution. But you can use any Node as sky, even complex sets of geometries and quads with animated clouds, blinking stars, city skylines, etc.



How do I use a node as sky? Because I can imagine it taking like alot of processing power to scale the node up in order to place it far away.



So I was hoping there is some easy solution to connect the node to a skybox just like u would do with an image and SkyFactory?

[java]

Node sky = new Node("SkyNode");

sky.attachChild(skybox);

sky.attachChild(createRandomClouds());

[/java]



xD?

@glaucomardano said:
[java]
Node sky = new Node("SkyNode");
sky.attachChild(skybox);
sky.attachChild(createRandomClouds());
[/java]

xD?

Yeah well, I was thinking there was maybe some sort of thing like the SkyBox concept that looks far away but is infact near, because if I'd use this HUGE node, like clouds of 1000 units big and put it like 3000 units high, it's gonna use loads of processing power right?

While the normal concept of a skybox (from my understanding) is to virtualize a box around the world, which isn't far away at all, but just is simulated as a far away texture.

yeah, 3000 clouds consumes more performance than a skybox texture of course. If you are gonna animate the clouds you could use Multithreading

@glaucomardano said:
yeah, 3000 clouds consumes more performance than a skybox texture of course. If you are gonna animate the clouds you could use Multithreading....

Ofcourse, that I did realize, alright I think my thinking of the skybox is just weird, so you're saying the best I could do is making very huge clouds (with multithreading) and put them very high? Alright I'll try that then, it just felt like that it would mess up the skybox concept but alright, thanks for the advice

yes, instead of creating a skybox made textures you could create geometries to compose the sky(clouds, houses, water, starts…whatever). And put the clouds very high.Additionally you could use LOD for the sky geometries, because they are gonna be faraway.

Alright, thanks

And about the



[java]

Node sky = new Node("SkyNode");

sky.attachChild(skybox);

sky.attachChild(createRandomClouds());

[/java]



I meant the skybox is just a blue gradient textured box or just set the viewport background color.

Or you can fake it like I do. A simple quad with a texture of some clouds where you can see through to the sky colour (background colour of scene) behind and then animate the texture across the quad by modifying the texture coords of the quad. You can put e.g. two layers of these on top to get two cloud layers going (even with different movement directions if that is your fancy). Finally you can then have a stars quad that fades in when night arrives.



The only problem with this is how to get clouds, stars and fancy sunset/sunrise gradients going in the distant horizon. Perhaps you can use a normal skymap for this but would have to be a custom made one where you can do the same animation trick on the textures if you want them to animate as well. I havent solved these problems yet as I am still using the fog filter that “fogs” out everything in the horizon anyway. :slight_smile:

ParticleEmitter could be nice too to simulate the clouds.

perhaps an animated GIF?

maybe this can help http://hub.jmonkeyengine.org/groups/user-code-projects/forum/topic/procedural-animated-clouds-with-video/#post-134281