Home 3D Art Showcase & Critiques

[WIP] Development of a Waterfall in UE4 (GIF Heavy)

JEmerson
polycounter lvl 7
Offline / Send Message
JEmerson polycounter lvl 7
I am making this thread to chronicle my journey of learning how to make waterfalls for UE4 in a real time and performant way. There are 3 types of waterfalls I have found from a real time vfx perspective: 1) The brute force waterfall, 2) The optimized waterfall, and 3) The cartoon waterfall. I began this journey 8 months ago in my spare time and have been getting closer to better and more performant variants of waterfall textures and shaders. Below, I will go over each development - but the takeaway is that nearly all waterfalls are created similarly, and the textures chosen are the most important aspect. Furthermore, I have not found a method yet that does not cause a heavy shader complexity. This could be due to my inexperience and/or my construction methods. If you have any comments or suggestions, I am all ears. Cheers!

Goals:
1. Have a generally realistic waterfall that is optimized for an action game.
2. Backlight the waterfall (as if from above).
3. Make the waterfall appear "cold."

Current Progress Shot


Cartoon Style
Starting with a cartoon style waterfall learned via Jeremy Griffith's great tutorial on Gnomon Workshop, we can get something like this:


Takeaways: Masked blend mode using a default shader model and two-sided yields great results for a more cartoon like approach due to the binary nature of the opacity clip. The edges cannot be feathered well.

Chronological Development Using What We Learned from Jeremy Griffith

First Attempt (Panner Planes Only supported by Mist particles)



Uhg. Not good, but we know we're generally on the right path. Let's try fixing the mist so that it pans and blends better, looking more like mist, as well as swap those planes for a different mesh.

Second Attempt (Panner Meshes, mist particles, and some new splash sprites)



The mist is fixed, but the meshes and large forms still look like bad. This is the result of poor combinations of textures and poor texture choices for the panner meshes and the splash particles. The splash particles in particular do not behave correctly and overshoot way too often. Introduction of vertex color masking to affect overall opacity yields higher control over the "streams" of the waterfall. However, this is insufficient and does not get to where we want. Back to the drawing board! Let's watch Tyler Smith's tutorial.  Oh hey, he get's really great results with a simpler setup than Jeremy. Perhaps we can use this method and/or adapt it?

Brute Force Method (Throw a lot of particles at it!)



Takeaways: Throwing a lot of particles looks great! But it kills your performance, which depending on the scene, may be a huge factor due to many other draw call operations occurring each tick.  In this scenario, we are spawning nearly 1,000 particles total for the life of the waterfall alone. Secondly, the particles are not reacting to velocity (stretching), which is similarly unrealistic. However, due to the sheer number and speed, this does not look bad from a distance.

Optimized Method (Panner Meshes with Particles Support - Tyler's Method Above)

Takeaways: Translucent blend mode using a subsurface shader model gives us the more "classic" approach to waterfalls in game. It is typically very optimized and has a more feathered "opacity" than the Masked blending method. However, the colors may not standout as much in the environment because translucency blends the forward most pixels with those in the background. Furthermore, specularity is not supported, so we are not seeing reflection changes in the panner mesh. However, we went from a particle count of 1,000 (brute force method) down to only 100 not including the mist or the splashes.

What's next?
From here, I intend to try out a couple of methods after cleaning up the particle placement and lifetimes for the splashes and the cold mist.

1. Instead of using a deformed cylinder as my primary mesh, I am going to try interlocking spheres. I was turned onto this idea by Terrie Denman (Blizzard, Senior VFX) which should help with the edge breakup that makes the optimized method look less than stellar compared against the brute force method.
2. Refine particle counts and placement (of course). Most importantly on this though is better matching the particle acceleration and speed to the panning texture on the mesh behind it.
3. Using a method outlined by Epic Games, attempt to introduce a cubemap into the Translucency shader model to get specularity results, thereby increasing the believability of the waterfall as "real."
4. Reintroduce collision spawn of splash effects now that particle counts are under more control.
5. Reintroduce vertex color opacity painting to get greater control over the edges of the panner mesh again.

Replies

Sign In or Register to comment.