- Home /
How to create a caustic effect due to water surface
Hi everybody !
I'm working on a simple video game using unity3D and I would like to know how can I implement in Unity a caustic effect due to the water surface like this video : http://www.youtube.com/watch?v=SjaNP-4Ubj8
Can I do this with or without shader? Can anybody show me the source code of the shader or explain me the tip to do this effect.
Thank for your advices.
Lovin
do you need effect in the water (light rays) or on the floor? first one is just a noise, second just need an algorithmic mask for light, or may be even a texture array with smooth lerping
algorithm from standard unity water can be part of this solution
shader source is in unity3d package with water
Answer by Lovin · Jul 17, 2012 at 11:55 AM
Thanks for answers.
I need effect on the floor. I checked the WaterSimple script and the FX- Water Simple shader from the basic water package but I have no idea to how use them to make the caustic effect in the floor.
Have you an idea on the way to use them ?
look also to water pro shader (if you havn't license, you can install trial for 30 days free)
possible simpliest solution is to use dynamically generating bump map from water shader. bump map can be used for reflection, and reflection map can be a b&w grid.
really by playing with settings and texture for reflection you can achieve effect without any shaders editing.
if you have a good mathematic skills, you can cut algorithm for bump map generation and make a custom lighting model directly in shader with this algorythm. algo can be applied in 3d space (based on world position) so it will look very realistic.
try to customise water pro first.
Answer by Foam · Jul 17, 2012 at 01:07 PM
The basics are covered in GPU Gems.
http://http.developer.nvidia.com/GPUGems/gpugems_ch02.html
It sounds like, though, that you're going to want to start on "Shaders 101" first before diving into something as complex as water simulation.