For a cubemap you have to render six video textures one for each side.
But in Blender my graphic card only supports 4 textures for a custom material shader. So I used the plot function to stitch the six images to one single cubemap texture (Blender render cubemap alignment) together. The Downside is that the plot function is very slow (+4 ms on my PC).
Actually it is not possible to overtire the Blender environment texture with the video texture. Therefore it is not possible to use an normal environment shader. I modified Martinsh shader to render the single cubemap texture.
If you have an newer ATI graphic card you can use Martinsh shader (http://devlog-martinsh.blogspot.co.at/).
To improve the performance it is possible to reduce the texture size at line 7 in renderCubemap2. Or reduce the update interval for the renderCubemap2 script by increase the frequency from the delay sensor to 1 or 2.
@BluePrintRandom
Actually I am trying to speed up cubemap render by using BGL or nodes.
If the BGL or nodes variant are not working I will add your requested features to the shader.
So I think you have to wait quit a while.
I have added a node based cubemap shader.
This improves the performance a lot, because I don’t need to stitch the images with the video texture module.
But there is a small seam between the images, which I don’t get solved.
Could you make an add-on for this, so the player can just add a reflective material, set it’s reflection texture size and the reflection texture data(like color(how much of each color is used), reflection amount, blur…)
I’ve got a question- is it possible to color the reflection? I would like to use this for my car games(a car body), but for that I need to have something like this:
Yes. Like BluePrintRandom has described, you only need to add a mix node between last color mix node and the output node. But you can also put the material node in between.
Which parts should I append to add that item to my game?(I mean, which ones are nessecary for the reflection, but which ones is just a background object.
I made the car material for preview- this way it looks quite fine, but, of course, the texture on it could be better. Anyway, it is kinda good material thanks to realtime reflections:)
The model is awful. I am still thinking how to transfer this material to my game and how to make it use object color instead of that green that I set…
That’s a 1 bounce global illumination technique called light propagation volumes that ray casts/cone traces through the voxel grid generated from the light camera’s world positions and diffuse buffer per pixel. It’s actually doable in bge if you find out a way to pass video texture buffer to a 2d filter.
Edit: oh and the article provided is irrelevant to “dynamic” light bouncing.