I have a water tile (a heightfield), that I can render ok, but don’t know how to tile it. I was thinking of forcing the two pairs of edges of the tile to have the same height values, like this:
aaaa
b b
b b
aaaa
But the results are not convincing. Can you please share some insights?
Maybe I should attenuate the wave tiles at the edges? I could also flip odd tiles, but flopping odd tiles will make waves move the wrong way. Please help.
The only thing remaining now for me is to figure out how to do bump mapping, reflections and I’ll probably have what is called environmental bump mapping. I’ve noticed that many programs attenuate what they reflect. Do they simply multiply the reflected colors with a coefficient < 1? I’ll probably have to model the sun using a directed light no? Do I use Phong shading for water? I’ll be grateful for every hint you may have for me.
The problem is, I don’t have shaders available. The water is supposed to be rendered using fixed pipeline only. Does anyone have any hints about what to do in this case to make the waves look good? AFAIK, fresnel reflection is not supported by the fixed pipeline. Particularly, I’d like to know how to add foam to wave crests with the fixed pipeline.
Maybe with 1D texture, blue everywhere and white on the last texel, then assign texcoords on your waves to make the top appear white.
Not a lot of options for doing realistic water with fixed pipeline …
Good idea, the intrinsic color of waves would then have to be black, as the texture will already color them. I’m not certain a completely white top will cut it (would make wave look more like a snow-capped mountain probably). I could however generate 2D textures at wave-generation time using the same algorithm I would otherwise use in a shader. Basic reflections could then be rendered with multi-texturing. The fixed pipeline also supports bump mapping, so this way I could get bump mapping + reflections. On top of that, I’d put some Phong lighting. Are these ideas sound?