Making a 2 skydomes instead of a "skybox"

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

Making a 2 skydomes instead of a "skybox"

Post by Spartacus »

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??
Boogle
Posts: 162
Joined: Fri Nov 21, 2003 3:16 pm
Location: Toronto, Canada

Post by Boogle »

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..
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Post by powerpop »

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!
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

It wouldn't have to be an integrated part of Irrlicht.

It's just a custom scene node that you create and put a rotator on.

No need to modify any Irrlicht source for that.
Crud, how do I do this again?
Post Reply