SHwater
Posted: (080219)(03:02.15)
Been working with all kinds of different water techniques in this engine since the very beginning. Like foliage, water is something that this engine really struggles to do, or rather, artists struggle to get it done in the engine. Anything with any semitransparency/translucency is handled very different by the renderer and it's extremely difficult to find a middle-ground where you have good lighting interaction with the other effects. Anyway, long story short, I've devised a "recipe" of effects layered over each other, much the way I've done the real-time reflective puddles. The idea is to get the major components working first, such as the actual mirror, and then tackle its implementation method. With the puddles, it was a matter of cutting a hole into the ground in which to fit a perfectly square mirror, to give the illusion that the mirror is shaped, which of course is impossible. It's just a trick. With water, we need to give the illusion that the mirror is moving, and can't be solved with such a simple trick.
This is handled with a separate "heat-haze" ("normalmap wobbles") effect on a whole other piece of geometry, rather than trying to squeeze it all into one material. The mirror itself is actually just a regular mirror, no tricks involved, but it is the animating mesh coupled with the heat-haze shader that gives the illusion that the mirror (which itself is translucent) is moving along with everything else and is 1 entire material, when actually it is 3.
[ external image ]
Not the greatest of shots here, and the mirror is yet to be tweaked to be level with everything else, you can see it's on a slight tilt. This is really something that needs to be seen real-time or at least in a video to appreciate everything that is going on. If you look closely, you'll see the bottom of the "pool" is visible through all the effects and the mirror itself, there's even a dead rat down there, barely visible from an angle but easy to spot when standing directly over it. The reflection is real-time of course, meaning intense lighting conditions translate directly into the water. The water effect itself includes multiple scrolling blends, efficient contrast of cubemapping, and an overall specular layer to again compliment extreme lighting conditions, true to the nature of water. When you shine a flashlight into it, it becomes a mess of white, yet in moderate lighting it can seem almost completely transparent, again true to the nature of water.
Too many developers test things in this engine in normal lighting. Trees, water, particles, decals. These things need to be tested in all kinds of lighting conditions through effects like fog and glass. This is why things can take so long to get done in Shadowing Hate, because we use fog EVERYWHERE, it makes a lot of effects 100X more difficult to achieve, though not impossible. What may look nice in moderate lighting with no fog, will turn into barf behind heavy fog, glass and flashlights. So again, like the foliage, we have an effect that not only does work in the engine (despite much pessimism, even from other developers), but works to compliment other effects like light and fog, not fight against them.
This is handled with a separate "heat-haze" ("normalmap wobbles") effect on a whole other piece of geometry, rather than trying to squeeze it all into one material. The mirror itself is actually just a regular mirror, no tricks involved, but it is the animating mesh coupled with the heat-haze shader that gives the illusion that the mirror (which itself is translucent) is moving along with everything else and is 1 entire material, when actually it is 3.
[ external image ]
Not the greatest of shots here, and the mirror is yet to be tweaked to be level with everything else, you can see it's on a slight tilt. This is really something that needs to be seen real-time or at least in a video to appreciate everything that is going on. If you look closely, you'll see the bottom of the "pool" is visible through all the effects and the mirror itself, there's even a dead rat down there, barely visible from an angle but easy to spot when standing directly over it. The reflection is real-time of course, meaning intense lighting conditions translate directly into the water. The water effect itself includes multiple scrolling blends, efficient contrast of cubemapping, and an overall specular layer to again compliment extreme lighting conditions, true to the nature of water. When you shine a flashlight into it, it becomes a mess of white, yet in moderate lighting it can seem almost completely transparent, again true to the nature of water.
Too many developers test things in this engine in normal lighting. Trees, water, particles, decals. These things need to be tested in all kinds of lighting conditions through effects like fog and glass. This is why things can take so long to get done in Shadowing Hate, because we use fog EVERYWHERE, it makes a lot of effects 100X more difficult to achieve, though not impossible. What may look nice in moderate lighting with no fog, will turn into barf behind heavy fog, glass and flashlights. So again, like the foliage, we have an effect that not only does work in the engine (despite much pessimism, even from other developers), but works to compliment other effects like light and fog, not fight against them.