   Fast and nice water technique?
  I want to create water which you can see through and has reflections. I was thinking of having a heightmap to see how much transparency the water pixel will have, is that possibel? And how do you do reflections, what different techniques are there?   
  Getting water to look right is hard. Really hard. Hard enough that the realistic-ness of the water is a selling point for commercial MMO engines.   ;  This might be a good place to start..http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html   ;  The simplist method is to use a normal map to refract the reflection. You can fake the water physics by animating the normal map, and adding various decals (for ripples and the like).A transparent blue tint + an animated normal map gives pretty good results.I actually opted to NOT do reflections, since they're quite costly. Instead, I just draw the water over the main scene, and refract it based on the normal map.Simple example:;Quote:Original post by SharsnikThe simplist method is to use a normal map to refract the reflection. You can fake the water physics by animating the normal map, and adding various decals (for ripples and the like).A transparent blue tint + an animated normal map gives pretty good results.I actually opted to NOT do reflections, since they're quite costly. Instead, I just draw the water over the main scene, and refract it based on the normal map.Simple example:[removed image]They don't have to be. Have you considered static cubemaps? Since the water itself is fairly far away from the camera, you could probably slip by just prerendering or loading a cube map for the water and then just doing lookups into it. Works for refraction too.EDIT: Removed the image from the quote.   ;  If you want correct reflections, you'll have to mirror the scene. Basically it comes down to this:- render the scene flipped/mirrored, eventually clipped at the water level (everything below the water level is not rendered).- Store this rendering a texture (FBO/Render target, or take a snapshot). To win some speed, render on a small texture resolution. You can also render a simplified version of your world (no normalMapping, simpler lighting, no small models, etc.) to gain more speed.- Use this mirror texture, render it with projective on a water quad in a shader or something. You can distort the projective texture coordinates by mixing 1 or 2 normalMaps with it.- Or instead of a water quad, you can also use a heightfield and create real waves (in the vertex shader).It comes at a cost of course. You can also simplify it with static cubeMaps that contain some hills and most important, the skybox for reflecting clouds.Refractions are almost the same thing:- Render everything below the water normally into a texture/FBO/whatever- Eventually use brown/green or dark-blue height-fog to simulate dirty/dark water.- Project the refraction texture on your water wuad/heightfield. Again, you can distort the texture coordinates with a high-frequency normalMap or something.Now combine refraction and reflection with Fresnell or a more simple but similiar approach. If you look straight down into the water, you'll get much refraction, little reflection. If you look onto a skew angle onto the water, you'll have much reflection, almost none refraction. Lerp between the two based on the view angle onto the water.Good luck,Rick   ;  I guess it depends on how high your demands are. I'd say Sharsnik did a better job on the water than on the trees ;)   ;Quote:Original post by ZahlmanI guess it depends on how high your demands are. I'd say Sharsnik did a better job on the water than on the trees ;)Work in progress <g>   ;  I actually like those trees! Cartoonish style.   ;  Yeah, but the edging, shadows and texturing still needs work ;p   