True Custom Sky Boxes

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
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

True Custom Sky Boxes

Post by Beroc »

I am working on a small project, and had the thought that I wanted a skybox. I looked at the two methods I can find and neither have the desired effect that I want. the AddSkyDomeSceneNode and AddSkyBoxSceneNode both draw static skies. I am looking something with a little more umph. So I was thinking way back to the old days when I was playing with Unreal and making maps and such. I remembered that they had a Sky thing... Basically, it was a statically positioned camera that mimiced the rotation of the player camera, but allowed you to see the "sky" that you placed somewhere else in the map. Or at least that is the best way for me to explain it.

So the theory is to Draw the Sky first, don't erase the render, then draw the objects on top of it. However, when I try to do it like this. The background goes back to the sky color defined in the BeginScene reference. You will have to forgive me from "Paraphrasing what my presentation, I am actually working with Irrlicht.NetCP, but I can transpose your answers to it.

Code: Select all

                device.VideoDriver.BeginScene(True, True, New Color(0, 200, 200, 200))
                SkyBox.rotation = Camera.Rotation
                smgr.ActiveCamera = SkyBox
                SkyBox.render()
                smgr.ActiveCamera = Camera
                smgr.DrawAll()
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Didn't you just describe the skybox mechanism at least that's what you're trying to implement I think)...
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

Post by Beroc »

Found it....

Called Render to Texture... Or what this guy did.. Render to Skybox

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=13288


Now the better question would be.. can I create 2 scenes.. one being a "skybox" the other being my actual lit scene.. I will test that one tommorrow..

Thanks guys
Post Reply