Cube map and sky boxes

Blitz3D Forums/Blitz3D Beginners Area/Cube map and sky boxes

Azaratur(Posted 2008) [#1]
What is the difference from cube maps and sky boxes?
How can i create a cube map?

Aza


Azaratur(Posted 2008) [#2]
Nobody know it?
Maybe i must put this other part of the forum?

Aza


Santiworld(Posted 2008) [#3]
in the grass sample there is a skycube, in the samples on blitz3d...

in that sample, show can you create...

don't forget use entityorder to the entity of the skycube


Ross C(Posted 2008) [#4]
A skybox is a 6 sided shape (cube) with a different texture on each face. typically a cube, with it's normals flipped, it provides a static (usually, very far away) representation of your game world. It save you having to model the far away geometry.

A cubemap is a special texture, that wraps all around a mesh. Depending on the cubemap mode you set, it will either remain static, or adjust it's position to provide a reflection type texture.

It's basically impossible to do certain effects in blitz without a cubemap. You can update your cubemap by rendering from the mesh it textures location. You render FRONT BACK LEFT RIGHT UP and DOWN seperately and copy this render to the relevant cube face. This would provide you with real time reflection.

At a cost i might add, as rendering and copying 6 textures is fairly slow, depending on the size of them of course.


markcw(Posted 2008) [#5]
Here's a code example of cubemapping for water reflections, the sky is a skysphere not a skybox, skyboxes are better because there is no visible distortion.

Simple Cubemapped Water (with skysphere)
http://www.blitzbasic.com/codearcs/codearcs.php?code=1788


Azaratur(Posted 2008) [#6]
Thanks to all,
where can i find other example of cubemap?
I already read the markcw example i wanna read more!!
I must learn!!!

Aza


Ross C(Posted 2008) [#7]
What more are you wanting to know? The example sets it up perfectly :o)


markcw(Posted 2008) [#8]
Download cubed.zip here:
http://www.blitzmax.com/logs/userlog.php?user=8652&log=1737