, 9 tweets, 5 min read Read on Twitter
Here we go:
The cheap water caustics breakdown in @UnrealEngine!
49 instructions and 1 texture sample
Works with dynamic lighting and has RGB split
Details below🔽 :)
#UE4Study #gamedev #indiedev #shaders
The key here is the clever usage of WPbehindTranslucency.
This allows us to project the caustics below the water plane in world space. Attach this at the end of your water shader, adding to the Base Color.
There is no procedural stuff here, the material function is an extension to the Motion_4waychaos found in the engine.
The panning is equal in all 4 axes, as it is addictive.
You can add a general direction to the pan by blending it with SoftLight, and then rotate the panners
Towards the end, you can see the RGB split implementation.
It requires the base texture to have RBG spit on it, and then it desaturates that using a sine wave.
I used a free @Substance3D generator for this one, but you easily can split a BW texture in PS.
share.substance3d.com/libraries/23
Finally, lerp the caustics with a simple depth fade :)
This prevents caustics from being drawn below a certain point.
Another bonus of using this method is that the caustics will be influenced by your water flow refraction because they are actually beneath the water plane
Lastly, everything is multiplied by the scene colour, so that brightly lit areas have more visible caustics and shadowed areas have little to no caustics.
Like any other, this approach is not perfect, obviously, if the camera is below the water plane, the caustics are gone, but it shouldn't be hard to use a similar approach in a PP material active below the surface.
Another issue is flat 90-degree surfaces
So there you go,
a cheap and entirely fake solution for water caustics.
Huge thanks to @AlesTheBull for making the "Modular Cliffs" environment and its base water shader.
And since Tech Art isnt my main forte, please feel free to point out things that can be improved.
Cheers!
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Hristo Enchev
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!