Dynamic Cube Mapping For Liquids Example

Hi,

Many years ago, I used to use the Blitz3D game engine to create game prototypes.

It was based on a DirectX 7.0 sub-system, which could not handle shaders, but it could do dynamic cube maps for reflective surfaces.

I have tracked down an old example at:

Can the blender game engine do this?

If not, why?

This was an acheivable feature in 2001 using a very old version of DirectX.

If my memory serves me well, the programming language had one function called ‘SetCubMap’ and you could also specify an alpha value so that the surface was semi-transparent.

This is the kind of feature Blender needs to take it to the next level.

Regards,

JourneyMan17

Short answer: because nobody’s coded it yet.

Long answer:
There are plenty of things that “old game engines” could do things that Blender can’t. Blender is an open-source program with only a handful of people working on the game engine. If you know how to code this, feel free to contribute! If there’s a feature that seems easy to implement, then figure out a way to do it!

On a side note, Blender is powered by OpenGL instead of DirectX.

-Sam

Is there a GLSL shader that can accomplish this?

Dynamic cube maps cannot be done right now in glsl or otherwise.

Now, work is being done on the video texture playback… a feature of this is “render to texture”…

Once done you may be able to set up cameras to render a cube map… in python.

This is rendering the scene 6 times more than usual as you’ll render the positive and negative direction of each axis dor each face of the cube… so even when it’s in don’t expect it to be quick!

once you can do this you use the dynamic cube map in glsl in the same way that you would a static one, just point at the dynamically generated texture.