Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: dj_buckley on 2023-09-14, 10:05:40

Title: Caustics Issues
Post by: dj_buckley on 2023-09-14, 10:05:40
Can someone explain why caustics completely changes the appearance of my pool other than simply adding the caustic effect?

Without caustics the pool water is bright and has a nice colour to it.

With caustics the pool water gets darker overall and the colour drains out of it a bit so the whole pool becomes much 'muddier'.

Also my shadows completely change position.

Hopefully the screenshots show what I mean.  Ignore the small region that I used for testing dispersion.
Title: Re: Caustics Issues
Post by: Aram Avetisyan on 2023-09-14, 13:58:48
Hi,

Keep in mind that refractive materials without caustics render with fake shadows/caustics (unless it has Thin mode enabled). The physically correct result is the one with caustics, not the one without.

The brightness comes from the reflections, while "muddiness" comes from the stairs and its shadows. You can tweak the IOR to make the water more reflective - hence brighter in that specific shot.
Title: Re: Caustics Issues
Post by: Juraj on 2023-09-14, 14:09:08
You have to approach it as two completely different materials from get-go. I only have to use Caustics few times a year, but it still didn't become second nature and throws me off a bit, you get too used to behavior of non-caustic refractive material.

Funny thing is my clients (even ones at Zaha Hadid) almost universally dislike the look of natural interior pool with caustics :- ). So I often composite more artistic version of twice rendered water.
Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-14, 14:18:40
Thanks both

The issue i have is this - so the one with caustics on is 'correct' BUT it's such a slowdown if I want to tweak it to get it looking right.  IR takes an age to show the caustics so every tweak means waiting to see the update and we're told we can't use regions with Caustics.

So as you can guess, I've been getting the pool colour/brightness looking nice with caustics off for speed purposes then enabling caustics for final renders.

I don't want to tweak IOR to make it brighter because that will affect refraction too right?
Title: Re: Caustics Issues
Post by: Aram Avetisyan on 2023-09-14, 14:26:24
Thanks both

The issue i have is this - so the one with caustics on is 'correct' BUT it's such a slowdown if I want to tweak it to get it looking right.  IR takes an age to show the caustics so every tweak means waiting to see the update and we're told we can't use regions with Caustics.

So as you can guess, I've been getting the pool colour/brightness looking nice with caustics off for speed purposes then enabling caustics for final renders.

I don't want to tweak IOR to make it brighter because that will affect refraction too right?

That is the price you pay for caustics :)

You can tweak the IOR for reflections - use RaySwitchMaterial and for reflective material use the same water material with higher IOR, it should work.
Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-14, 14:31:26
Thanks both

The issue i have is this - so the one with caustics on is 'correct' BUT it's such a slowdown if I want to tweak it to get it looking right.  IR takes an age to show the caustics so every tweak means waiting to see the update and we're told we can't use regions with Caustics.

So as you can guess, I've been getting the pool colour/brightness looking nice with caustics off for speed purposes then enabling caustics for final renders.

I don't want to tweak IOR to make it brighter because that will affect refraction too right?

That is the price you pay for caustics :)

You can tweak the IOR for reflections - use RaySwitchMaterial and for reflective material use the same water material with higher IOR, it should work.

Interesting, that's not how I'd interpreted the rayswitcher.  I though the 'reflective' slot was just for how you want the material to appear in the reflections of other objects.  i.e. an interior with a mirror, you could have a wood floor, then a different colour wood floor visible in the mirror reflections
Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-14, 15:35:01
What would also be useful is a good explanation into absorption colour and distance.

i.e.

A darker more saturated colour and a high distance value

VS

A lighter less saturated colour and a low distance value.

Is one more correct than the other?

I've also just set the distance to the maximum depth of the pool and then tweaked the colour from there ...
Title: Re: Caustics Issues
Post by: pokoy on 2023-09-14, 16:01:50
Absorption/scattering is directly dependent on the travel length of the ray - the longer the ray travels in a medium, the more it's affected by absorption/scattering.

As for caustics and why the pool looks the way it looks, think of it that way: the surface bending on the water's surface causes light rays to be bent/focused in certain areas, producing a more pronounced lighting (more rays) when it hits the pool surface. Of course, this means that these rays are now 'missing' in other places, resulting in darker lighting. It's consistent with physics.

Absorption is more pronounced with caustics, too. It might need a slightly brighter/less saturated color to produce a similar result with caustic.
Title: Re: Caustics Issues
Post by: TomG on 2023-09-14, 17:57:01
What would also be useful is a good explanation into absorption colour and distance.

i.e.

A darker more saturated colour and a high distance value

VS

A lighter less saturated colour and a low distance value.

Is one more correct than the other?

I've also just set the distance to the maximum depth of the pool and then tweaked the colour from there ...

Neither is more correct than the other. Absorption comes from particles in the medium, so we can think of brown river water which is that color due to sand, earth, etc. suspended in the water. The color sets the color of those particles. The distance in effect controls their density (how far the ray has to travel before it becomes the color you set, with a shorter distance meaning there are more particles so it will more quickly pick up that color). It's up to you whether you are controlling the color of the particles, or their density :)
Title: Re: Caustics Issues
Post by: Juraj on 2023-09-14, 18:03:13
It does indeed to my knowledge ends up being the same, so I personally use darker tones that more closely resemble the tone I am after and then longer distance values to reach that tone. This way also makes sense to me in large bodies of liquid like pools as the distance values are easy to visualize in spatial relationship.
Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-14, 19:52:25
It does indeed to my knowledge ends up being the same

This is what I thought, i just wasn't sure if one thing might break another etc.  A bit like different combos of ISO, F-Stop and Shutter can ultimately arrive at the same EV value, but in reality you're affecting something else depending on which one you tweak.
Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-15, 00:32:01
Also whil I'm here.  Are there any issues with Caustics + 4K Cache that I need to be aware of?
Title: Re: Caustics Issues
Post by: maru on 2023-09-28, 13:59:45
On the original topic:
With thin option - there is no refraction happening at all, so the shadows of the walls are just showing as if passing through the air.
Without thin option and without caustics (we are also calling this "hybrid shadows") - the shadows of the walls are again showing just as if passing through the air, but then this is seen through a refractive material.
With caustics enabled - the whole water object is casting 100% opaque shadow first and then light is computed on top of that, but this time the light is correctly refracted inside the volume.
So basically the "no caustics" option is the same as "thin" in terms of shadows, there is just refraction applied on top. Check out the attached image.


What would also be useful is a good explanation into absorption colour and distance.

i.e.

A darker more saturated colour and a high distance value

VS

A lighter less saturated colour and a low distance value.

Is one more correct than the other?

I've also just set the distance to the maximum depth of the pool and then tweaked the colour from there ...
Making the color darker is exactly the same as making the distance lower. That's why you can just set absorption to pure black, forget about the color, and adjust the distance only. That is, if you don't need colored absorption.


Also whil I'm here.  Are there any issues with Caustics + 4K Cache that I need to be aware of?
No, we are not aware of anything, but the 4K cache should be still treated as "experimental".



Title: Re: Caustics Issues
Post by: dj_buckley on 2023-09-28, 14:10:36
It's all good thanks for the explanation Maru.  I've got it working as I want it now.