cube mapping?

Blitz3D Forums/Blitz3D Programming/cube mapping?

elseano(Posted 2003) [#1]
I keep hearing this. What is it, what should I use it for, and how do I impliment it in Blitz3D?


(tu) sinu(Posted 2003) [#2]
do a search, theres a few posts and some good demos on it here.


Ross C(Posted 2003) [#3]
Hey, have you ever used spherical reflection mapping? It sort of gives the same shiney effect except it's alot better.

Imagine a cube, with each of it's sides textured differently. Now imagine what it would be like if you wrapped that cube around your mesh. It is basically a six sided texture.

Now what it can be used for. Say you wrapped around your mesh, a sky box. Well, it would then seam like your mesh is reflecting the world around it in real time. You can also update each face texture of the cube. Say you positioned the camera at the meshes position. Then you rotated the camera to face a diection, such as left. Then copied the backbuffer to the left face of the texture.

You would be essentially updating the cubemap, and it would really be reflecting everything about it. If you do plan to update the cube faces tho, do one per frame, don't update them all each frame. This is because copying data from Video RAM is pretty slow, and you might only get away with doing one texture per frame.

There is an example to demonstrate cube-mapping somewhere. Oh yeah, if you check out Rob's signature, and click on Demo1, the water in that example is cubemapped, and looks fantasic. Be warned tho, not all cards support it. you can check to see if they do by using the GfxDriverCaps3D command. if this returns 100 then the card cannot do cubemapping, if it returns 110, it can :)

Hope that explains some. They'll be someone cleverer along to add in something i missed tho ;)


elseano(Posted 2003) [#4]
Thanks!
but... I just found out out that my card won't handle cube mapping...
Oh well, I'm getting A new computer for Christmas tomorrow anyway, and that comes with a GeForce 4 and that'll probably handle it, lol ;]


jfk EO-11110(Posted 2003) [#5]
Congrats, enjoy!


elseano(Posted 2003) [#6]
Yay! I just got my new comp up and running and the cubed demo by Rob is utterly awesome :D


Ross C(Posted 2003) [#7]
Good stuff :)