pouët.net

skybox as 2d bitmap

category: general [glöplog]
 
hello,
i want to build a skybox-fx on nintendo ds but the 3d of this machine are not able to do "glDisable(GL_DEPTH)";
so i have another idead about it, is it possible to create those sky-style backgrounds with a moving bitmap? how will it be done?
added on the 2009-03-07 19:25:45 by dcclark dcclark
Why not just draw the skybox at the upper limits of what the system is capable of?

I mean, if you have a world within a 100 x 100 x 100 box, then just make a 1000 x 1000 x 1000 box around it and you'll be fine (or what?).
Yes, if the problem is the skybox being too big, just make it smaller. If you position it so it's always centered on (0, 0, 0) in camera space you'll get the same effect as an infinitely large skybox. If making the world smaller to fit inside the smaller skybox is a problem, you could just clear the depth buffer after rendering the skybox.
added on the 2009-03-07 19:52:08 by doomdoom doomdoom
just use fog and some sprites for clouds and you'll be fine :D
added on the 2009-03-07 19:55:15 by xernobyl xernobyl
doom's right. that's how we do it :)
added on the 2009-03-07 21:51:18 by bartman bartman
If your camera isn't moving too much up and down, theoretically you could get by with a 2d bitmap that you'd scroll horizontally depending on the camera angle in the xz plane. We've used that approach in a couple of mobile games and it works fine in a very limited setting and careful tuning, but a proper skybox is of course a lot better if you have the power to render it.

Here's a video of one of the j2me mobile games that I've implemented the technique in. Notice how the background doesn't move up and down much, and looks totally flat if you concentrate on it instead of the rollercoaster. As said already, go for doom's method instead.
added on the 2009-03-07 22:08:12 by Preacher Preacher
fuck up your projection matrix and project it to the fucking back of the zbuffer (fixed w)

allthough i have no idea how an nds works or what its capable of :)
added on the 2009-03-07 23:52:16 by superplek superplek
(and draw it first, yes)
(excuse all the foul language)
added on the 2009-03-08 00:04:46 by superplek superplek
doesn't ds actually have a floating point onchip wbuffer so that you can go wild and just make the box larger than your world?
added on the 2009-03-08 15:19:31 by eye eye
What's a wbuffer? A 1/zbuffer?
added on the 2009-03-08 15:47:28 by xernobyl xernobyl
thankx to all who delivered informations for me/us.
added on the 2009-03-08 20:38:39 by dcclark dcclark
Just wondering: what's the current state of the art on the NDS home development movement?
Some months ago I've tested a very nice 3D enginesque demo with shadows and stuff.
added on the 2009-03-09 19:37:06 by xernobyl xernobyl
It looked almost like a good Wii game!
added on the 2009-03-09 19:37:25 by xernobyl xernobyl

login