[Request] Dynamic Caustics/ Caustic Mapping

A very underrated and perhaps overlooked feature.

I was thinking of adding a mouthwash bottle to a scene, but when it came to shadow casting, I remember there is no way to get caustics from a real time light source. :frowning:

But it’s not just the mouthwash bottle. Wine glasses, jewellery and even plastic filled with water will cast caustic like shadows.

http://i3.minus.com/ipuuxZOl6MFl2.jpg

http://i2.minus.com/ivZnbITpetHfO.jpg

As for why dynamic and not bake it through lightmass, have you ever observed a car during a very sunny day? If the angle is just right, you’ll see metal parts of the car rim projecting caustics on the road!

http://i5.minus.com/ib9uADeOXMpRE.jpg

This is the closest image I could find demonstrating this effect.

I’m not fully aware of what technology is needed to pull it off, but I have found some examples of it being done in real time:

Real-Time Caustics in Dynamic Scenes with Multiple Directional Lights https://youtube.com/watch?v=LlkclF6b0Tc
Real Time Caustics Whitepaper
http://geometry.stanford.edu/papers/ws-rtc-03/ws-rtc-03.pdf

Caustics Mapping: An Image-space Technique for Real-time Caustics
http://graphics.cs.ucf.edu/old/caustics/index.php

Real-Time Caustics Using Screen Space Directional Occlusion
http://www.damoweb.com/thesis/

Fast Real-time Caustics from Height Fields
http://research.cs.tamu.edu/keyser/Papers/CausticsCGI09.pdf

No games do that and I would bet that it would take too much processing power.

Maybe he wants it for Architecture design?

That would be nice to have, don’t forget not all games are big.

I already noticed this feature in Crysis 3, the small rock formations looked pretty nice with all the caustic effects from the water. I would certainly appreciate a smiliar feature in UE4 :slight_smile:

No caustics in CE. All fake’d.
You can make own shader in UE4.

Not possible in realtime graphics as it’s a ray-tracing technique. Don’t expect to see this anytime soon, ever, at least within the next 5-10 years. As for doing it offline or staticly? Not currently possible in the engine by default, but you could create an identical scene in a 3D program and import it into Unreal. Seems a bit pointless to use Unreal at all then, though.

You can also create Caustics through materials, but they are faked and not realistic. The only other suggestion I have is looking into Light Functions. Again however, you won’t get colour or an accurate result.

Real Time caustics using an Ray Tracing approach are already possible. In an actual game it may wont work very well performance wise, but it is possible.

Yeah, the scene I’m working on is a bathroom. So it’s a very small and easily controlled environment where I would want caustics (i.e, just 3 bottles sitting on the counter top).

I understand ray tracing is expensive although isn’t UE4 getting ray traced distance shadows in the 4.5 update? I just wish there was a way for translucent or glass materials to cast any kind of shadow like this, by default. Even if it was a very low quality kind of caustics, that would make a huge difference as opposed to there being no shadow at all (without resorting to lightmass).

Are there any game engines right now that have attempted caustics in real time? I think it could benefit Epic and UE4 greatly if they try to the be first in this field.

are the Moving? if not do like he said render then out and perhaps project them back into the scene as a gobo on a spotlight. should be easy to do. I have faked them like that before even in offline rendering just because it was to much render-time to calculate the same thing over and over again. I mean they dont move and unless the object making them moves or the surface they are landing on moves. If both of them are static I suggest baking one out and taking it into Photoshop and making a projectable texture and bring it in that way.

There is Caustics Generator. It generates animated raster maps that may be used for pools/sea/bath.