Request: write to all of cubemap texture

Archives Forums/Blitz3D Bug Reports/Request: write to all of cubemap texture

Ross C(Posted 2008) [#1]
It would be extremely handy, and a dam sight faster if we could write to the whole cubemap texture, instead of just updating individual cubemap faces. The reason being, it takes so long to do. And the reason for updating the whole cubemap is for dot3 mapping purposes.

Using a cubemap, updates dot3 lighting without worrying about vertex normals and such with animated models. The cubemap does all that for you.

However, to move the light sources, you need to rotate the cubemap. This is achieved by placing a camera inside a cube, mapped with the various faces of a cubemap colour texture for normals. Then you take 6 renders, copying each side to the appropriate face on the cubemap.

Now, this takes a long time to do, so, using cameraviewport and using 6 cameras, you can place the camera viewports in a line, just like a cubemap texture, with the 6 faces being shown. You simple copyrect the whole strip to the cubemap texture, and you only need one copyrect. Alot quicker than 6, and makes the dot3 alot more useful.