Backgrounds and Skies

Blitz3D Forums/Blitz3D Beginners Area/Backgrounds and Skies

Crazy4Code(Posted 2005) [#1]
I don't know how to explain this very well, but here I go: So, you have the sky, which I do by making a upside down plane in the air, but there usually seems to be some sort of background in most games. How is this accomplished?

Does that make sense?


Mustang(Posted 2005) [#2]
You need a "skybox" or "skysphere"... here's 2 skybox tuts, for terragen and bryce:

http://www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=gamejoseph03212002.html

http://www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=gamemorduun03272002.html


Crazy4Code(Posted 2005) [#3]
Alright. I have no idea what those are, but I assume the links will explain it all. Thanks.


Crazy4Code(Posted 2005) [#4]
I downloaded Teragen, like the tutorial said, but that seems to be the second part of the tutorial. I still don't understand what a skybox is or what it does. Could anyone try to explain that, because that tutorial was talking about terrains and heightmaps, not skies. What do I do with that stuff?


Ross C(Posted 2005) [#5]
It's a cube that surrounds your world. Each face of the cube has a texture that matches up with all the other joining faces. It gives the impression/illusion of there being alot more detail in the distance.


Crazy4Code(Posted 2005) [#6]
That's what I started to think just after I asked. Now what I don't understand is what Terragen has to do with that. I'll probably figure it out. I'm guessing Terragen makes terrains that include the skybox? What exactly does terragen make?


Ross C(Posted 2005) [#7]
Terragen generates terrains, but has the ability to make skyboxes from them. Takes 6 camera renders and makes the textures for your sky box :o)


Crazy4Code(Posted 2005) [#8]
I'm checking out the user guide on the site. I'll figure it out.


WolRon(Posted 2005) [#9]
Terragen can make 'correct' looking skyBOXES because it can take a snapshot every (exactly) 90 degrees. Because of this, even the inside of a cube can look spherical. Of course the advantage here is that a 6 sided box uses WAY less polygons than a spherical model and therefore is drawn much faster.


Mustang(Posted 2005) [#10]

Of course the advantage here is that a 6 sided box uses WAY less polygons than a spherical model and therefore is drawn much faster.



Actually this not true... usually ppl make skyboxes so that it has six separate textures (because it's easier) and this of course means six separate surfaces with just two triangles each - and this is second worst way to do realtime 3D, worst being surface with one triangle :)

Current 3D hardware is designed for pushing and rendering large batch of polygons at a time, low tri/surface ratio just makes it idle. Practical lowest batch size limit is somewhere around 2000 triangles, any surface less than that takes still the same time to prepare, transfer and render.

So skysphere with 2000 triangles and one texture/surface would be many times faster to render than skybox with 12 triangles and six textures/surfaces.


WolRon(Posted 2005) [#11]
Why 6 surfaces? You can make a skybox out of 1 surface. Which would still be faster than a skysphere with 1 surface(although, because of the reasons you stated, may just be splitting hairs...).


Crazy4Code(Posted 2005) [#12]
Can Blitz read the Terragen world files? Also, I downloaded a skybox. It came in a zip file with 6 images and an rwx file. What do I do with these?


Mustang(Posted 2005) [#13]

You can make a skybox out of 1 surface.



Of course, but that requires "manual" UV-mapping adjustment of the skybox mesh and image some stitching... not many bother to do that, or even know how to move UVs and such. IMO even the castle demo has six separate maps and terragen (like most renderers) can output only single image at a time, so you can't generate one image that would have six sides nicely laid out side-by-side in one image.


DH(Posted 2005) [#14]
Of course, but that requires "manual" UV-mapping adjustment of the skybox mesh and image some stitching... not many bother to do that, or even know how to move UVs and such. IMO even the castle demo has six separate maps and terragen (like most renderers) can output only single image at a time, so you can't generate one image that would have six sides nicely laid out side-by-side in one image.

And try to make that a power by 2 and have it still look good! :-)


Ross C(Posted 2005) [#15]
What you could do is use two surfaces. 4 images in one texture, and two in the other, is your worried about surface count :o)


Crazy4Code(Posted 2005) [#16]
I'm just going to use the meshes that came with the ones I downloade.