3D WORKSHOP:
Realistic Water Environment
15
make an animated normal map texture yourself. There is a very good one here.
by SpewBoy
In the python controller we added earlier, type mirror as the python script. Go back to the always sensor and click on the button with the three dots. This means that the sensor will trigger every frame.
www.blenderart.org
Go to the texture section of the water surface material and add a new texture. Set it as an image and click “load”. Now look on your disk for the texture included with this tutorial called “water.png”. Every reflective object in the game must have a unique “mirror” texture. The resolution or colour of the texture is not important, that’s why the one included is very small. I made it blue so it looks a bit like water in the viewport. The textures should have useful names like “water” and “water_n” for the texture explained bellow. Now add the texture included called water_n.jpg. This is the normal map. It is what provides the ripple effects. In the texture’s settings activate the “Normal Map” setting. OR Look online for a tutorial on how to
Now change the text viewport to a UV/Image editor viewport. Select the normal map texture and click “View” -> “Real-time properties”. Set up the real-time properties like you see in the picture bellow:
Now go to the “map to” tab for the water_n texture and deselect “Col” and select “Nor”. The “Nor” value underneath where it says “Mix” can be put up to 1.0 or down depending on how strong you want the ripples to be. Note that this is only for the ripple’s specularity. The actual distortion comes later and is done by using nodes. Add a new texture to the water material. Browse for radial_alpha.jpg (included with this tutorial). Give it the name radial_a, and then delete it again.
Issue 24 | Oct 2009 - "From Out of the deep"