Page 1 of 1

True Custom Sky Boxes

Posted: Mon Oct 06, 2008 9:25 pm
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()

Posted: Mon Oct 06, 2008 10:09 pm
by hybrid
Didn't you just describe the skybox mechanism at least that's what you're trying to implement I think)...

Posted: Mon Oct 06, 2008 10:18 pm
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