SHwater

...cybernetic and robotic dystopian first-person shooter...
Post Reply
User avatar
LDAsh
moderator.
Posts: 614
Joined: (041012)(02:10.41)
Location: SA
Contact:

SHwater

Post by LDAsh »

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.
════════════════════════
══════════════════
════════════
══════
User avatar
Dark Knight ez
developer.
Posts: 40
Joined: (071214)(03:12.15)

Post by Dark Knight ez »

How far can you take this animation?
Can you make the mirror wobble more when the player is moving around in the water for example, or is that an impossible interaction between the engine/player and the mirror-model/environment?
User avatar
LDAsh
moderator.
Posts: 614
Joined: (041012)(02:10.41)
Location: SA
Contact:

Post by LDAsh »

The mirror will capture ANYTHING it "sees", so there's no limit, players, physics objects, effects, lights, anything at all. I've bounced around in it enough to have fully tested player interactions, so it doesn't need to use any cheats. I still haven't tested an ocean-sized surface of the stuff to see how it performs, not that the project will use water like that, but I will still do such a test for fun. The actual surface probably won't be able to move geometrically, but all kinds of texture effects can be made happen with player interactions, which includes making it appear to "wobble" intensely around the player. The wobbly effect is merely an interpretation of the normalmaps to use the "heat-haze" effect, can work like any other texture.
════════════════════════
══════════════════
════════════
══════
User avatar
Dark Knight ez
developer.
Posts: 40
Joined: (071214)(03:12.15)

Post by Dark Knight ez »

Sounds great. You should create an ingame demo movie out of all this stuff someday. Would be cool to see it in action.
User avatar
DeeP
developer.
Posts: 272
Joined: (080917)(12:09.13)
Location: B.C. Canada

Post by DeeP »

LDAsh, as far as fog, did you resolve the strange problems associated with using it?
I know the generic fogs offered in Q4 are less desireable to use because of definate edges and bizarre flickering at the volumes outer limits. The fog (light) had to be placed (or inset) into a space smaller than the fogs volume or the useage was pointless.
-Also it always seemed to overpower the textures ,and took away any reflective or bumpmapped features of the textures.
they only used it a few times in Q4... I can see why. -
(now you're gonna tell me that you've created a fog that is perfect for what we need, so go ahead...say it) LOL
You're the nicest func_mover I've ever met.
User avatar
LDAsh
moderator.
Posts: 614
Joined: (041012)(02:10.41)
Location: SA
Contact:

Post by LDAsh »

No you were right the first time, it depends how you use it. I always use lights\fog_generic, which to me works just fine, so long as, as you say, it's used for entire rooms and not partially. Also, it will wash-out the specularity on textures, but I think this is normal, it looks natural to me. You will find out soon enough, anyway, I look forward to seeing what you think. But yeah, I think this is normal to happen for fog, both virtual and real fog will do this.
════════════════════════
══════════════════
════════════
══════
User avatar
DeeP
developer.
Posts: 272
Joined: (080917)(12:09.13)
Location: B.C. Canada

Post by DeeP »

ok, I have no huge issues with the fog besides the washout factor.I've used it, it's cool depending on where it is , like most things...it needs to be "tweaked" to look natural.
You're the nicest func_mover I've ever met.
Post Reply