Making a 2 skydomes instead of a "skybox"
Making a 2 skydomes instead of a "skybox"
I want to make the skybox be a skydome instead of a skybox. But I want 2 skydomes one that is transparent with clouds on it and another that has a daytime to night time texture within it. and I want to rotate the clouds faster then the sky and make the day go from night to day ect. Anyone know how I can do this??
Well, without trying it out myself, I would:
- Copy all the code from the CSkyBoxSceneNode and place it in your own class. Have your class inherit from ISceneNode.
- Modify the vertices and material arrays to create a sphere rather then a box. You will likely only need one material for each sphere, so you should no longer need a material array. For sphere coordinates your best bet is to create a sphere in some 3d modeller and make a note of all vertex positions. Your other option may be to save a sphere in a 3d modeller and load the mesh in.
- Modify the render method to render your new sphere, keeping the SNRT_SKY_BOX option in the registerNodeForRendering call.
- Add a parameter to your new skybox node to set a scaling size, so you can create one smaller one and one larger one.
You can then create two skyboxes manually (not using any method in the scene manager). You can also add a method to your new object to rotate it each loop, giving it timing information so it knows how long it has been since the last loop.
Your inner cloud texture should have a one-colour background which you can use to set a alpha channel on.. though I'm not entirely sure if alpha channels are supported by the engine on objects.. Something else to check out..
- Copy all the code from the CSkyBoxSceneNode and place it in your own class. Have your class inherit from ISceneNode.
- Modify the vertices and material arrays to create a sphere rather then a box. You will likely only need one material for each sphere, so you should no longer need a material array. For sphere coordinates your best bet is to create a sphere in some 3d modeller and make a note of all vertex positions. Your other option may be to save a sphere in a 3d modeller and load the mesh in.
- Modify the render method to render your new sphere, keeping the SNRT_SKY_BOX option in the registerNodeForRendering call.
- Add a parameter to your new skybox node to set a scaling size, so you can create one smaller one and one larger one.
You can then create two skyboxes manually (not using any method in the scene manager). You can also add a method to your new object to rotate it each loop, giving it timing information so it knows how long it has been since the last loop.
Your inner cloud texture should have a one-colour background which you can use to set a alpha channel on.. though I'm not entirely sure if alpha channels are supported by the engine on objects.. Something else to check out..
it would be nice to be able to add a skydome module for irrlicht - one that enabled night and day transitions (color and texture) and orbs for sun/moon - some animator for how long a day is - and cloud texture - here are some links to interesting techniques:
http://www.flipcode.com/tutorials/tut_skydomes.shtml (describing part of how everquest does its skydome)
http://www.geocities.com/ngdash/whitepa ... color.html
(describing dynamic color changes to the sky)
hopefully there is a way to work on something like this as a replacement for skybox that doesnt force hacking of the main source!
http://www.flipcode.com/tutorials/tut_skydomes.shtml (describing part of how everquest does its skydome)
http://www.geocities.com/ngdash/whitepa ... color.html
(describing dynamic color changes to the sky)
hopefully there is a way to work on something like this as a replacement for skybox that doesnt force hacking of the main source!