CubeMaps

Blitz3D Forums/Blitz3D Programming/CubeMaps

Ross C(Posted 2003) [#1]
A wee bit confused, and not sure this belongs in this forum, but, when talking about cubemaps, are they like spheremaps, as in they move according to the camera psoition?


Rob(Posted 2003) [#2]
Cubemaps can be static or dynamic. Imagine a skybox? now imagine each side of that skybox projecting it's own image inside onto whatever object that lies within. you get a perfect 3D representation of what goes on around you placed onto the object.

now this can also be dynamic. The cube simply renders a camera view for each face (up down left right front and back) and there you have realistic water/reflections etc.

Other uses? mustang thinks you can use them to replace lights in a scene by projecting a lightmap onto objects too.


Mustang(Posted 2003) [#3]
Bit techy explanation:

http://developer.nvidia.com/attach/1625


Ross C(Posted 2003) [#4]
Thank both of you'z kindly ^_^!


Ross C(Posted 2003) [#5]
Sorry, another question. So A dynamic cubemap has to re-render all 6 sides continously?


Mustang(Posted 2003) [#6]
So A dynamic cubemap has to re-render all 6 sides continously?


Yes - but you don't have to update them EVERY frame, or even every side of the cubemap, like bottom side.

mustang thinks you can use them to replace lights in a scene by projecting a lightmap onto objects too.


Thinks? :) I have used them such way many times IRL, so it is possible. And it's NOT a "lightmap" (I think that you know what I ment but the word "lightmap" sounds just so wrong here).

More about this cubemap lighting:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/directx_cpp/graphics_samp_8sz7.asp

(don't let the DX8 fool you; it's DX7 stuff!)


Rob(Posted 2003) [#7]
bleh! I knew that mr hot shot developer :)


Ross C(Posted 2003) [#8]
righto, thanks alot mustang :)


Mustang(Posted 2003) [#9]
mr hot shot developer :)


:) Ha... if only! Here's another thing you need to do when using cubemaps for lighting (Diffuse Convolution):

http://www.debevec.org/HDRShop/tutorial/tutorial6.html

"Normal" cubemap (created by rendering 6 cube-sides from one spesific spot in your world) is NOT what you want to use, you need to tune it so that it will give you nice gradients and smooth color shifts. Even heavy gaussian blur is better than doing nothing but that messes the seams a bit, so HDR Shop is needed for good results.

Note that you also need to do a lot of "format swapping" too, but luckily HDR Shop can do that also:

http://www.debevec.org/HDRShop/tutorial/tutorial4.html


AbbaRue(Posted 2003) [#10]
Rob. Your demo is awsome. Look like a real rooms.
I can see making a tomb raider type game, very easy.