Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: Image Complete on 2019-06-11, 14:34:34

Title: Some thoughts on Caustics
Post by: Image Complete on 2019-06-11, 14:34:34
Hello there,

Now that hype is gone (at least for me) for the new caustics, I just want express some random thoughts.
Caustics on Corona was one of the most wanted features for a long time.
The new caustics work and they produce nice results. That comes with a price though.
The render needs twice or triple the original time in order to be completed.
For me, it will be very difficult to use caustics on our production because of that extra needed time.
To be honest, I don't have expreriense with caustics on other render engines (time wise). So I am not sure what to expect from Corona.

What are your thoughts on this?
Will you intergrate caustics in your production?

Cheers
Title: Re: Some thoughts on Caustics
Post by: TomG on 2019-06-11, 14:40:32
"Extra work always takes extra time, no matter how efficiently you do the extra work" is my quote on this - and it is the truth, caustics are hard calculations, so take quite a lot of processor power to do, and will always add to the render time. From my past experience, the caustics in Corona are fast, compared to other solutions I have tried in the past. This does not mean "only adds 25% to your render time" fast though, as you are adding a great many complex calculations to the scene - in general, 2 to 3 times the original render time can be expected, though I've seen it as low as 1.5 times the render time, and as high as six times the render time. To me, that is very reasonable for adding caustics to the scene.

Of course you can optimize - only enable caustics for light sources that matter (usually, disable them for the environment, and usually most lights don't need to contribute, you'll have 1 to 3 main lights that need to take part in caustics), only enable refractive caustics on materials that matter.

Also, we'll always be looking for ways to optimize too. But, there has to be a realistic expectation too - I doubt caustics will ever be "just adds 10 minutes to your 1 hour render time" (though we shall see!)
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-11, 15:05:27
Hi,
we want to bring the overhead down, but there will always be any. Dont quote me, but if caustics take +100% time, we can maybe bring it down to +50%
Title: Re: Some thoughts on Caustics
Post by: alexyork on 2019-06-11, 15:40:52
(https://i.imgur.com/Gf76gXO.jpg)
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-11, 15:43:19
Don't make me make you a tshirt with some 2016 brexit quote :D

But seriously we are working with Intel on some optimizations... we will see how much they bring
Title: Re: Some thoughts on Caustics
Post by: alexyork on 2019-06-11, 15:45:30
Don't make me make you a tshirt with some 2016 brexit quote :D

But seriously we are working with Intel on some optimizations... we will see how much they bring

haha!

Yep, awesome. the whole studio here is pumped to move up to v4 finally (soon).
Title: Re: Some thoughts on Caustics
Post by: Jpjapers on 2019-06-12, 10:30:11
The trade-off is worth it. If you know youre going to need some shots with some crispy AF caustics then plan ahead and give yourself more time. The realism it adds far outweighs the extra time needed IMHO. Great Job team!
Title: Re: Some thoughts on Caustics
Post by: Image Complete on 2019-06-12, 12:44:21
Planing ahead for scenes that need caustics might be the solution.
I guess I set the expectations too high, for caustics in all scenes, open by default in order to bring that extra touch of realism. We might see this one day in the future, who knows!?
Just to be clear, I don't want to be harsh on the team. Not at all! You are doing an amazing job!
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-12, 12:50:41
well still even then, when the slowdown is a constant factor, you can view it this way:

1) upgrade your CPU to double # of cores (e.g. new ryzens with 16 cores costing $750)
2) turn on caustics in every render
3) render time stays the same, every scene has caustics
4) you got caustics for $750 ;)

It really just depends on how much do you want to use caustics - if you want to use them in every scene, you can. There is constant price to pay for that ;).

Even if you decide to turn them on only occasionally, check it again in version 5, we will have some further improvements by then.
Title: Re: Some thoughts on Caustics
Post by: pokoy on 2019-06-12, 13:09:57
Are there any plans to make a 'reflective' caustic switch available in v5? I think that would be very much worth it, and users can optimize render times that way, too... I know about the rayswitch workaround, but a dedicated reflective switch would be way more convenient than having to fiddle with rayswitch mtls for multiple materials in the scene only to have caustics within manageable render times.
Title: Re: Some thoughts on Caustics
Post by: Image Complete on 2019-06-12, 14:44:27
well still even then, when the slowdown is a constant factor, you can view it this way:

1) upgrade your CPU to double # of cores (e.g. new ryzens with 16 cores costing $750)
2) turn on caustics in every render
3) render time stays the same, every scene has caustics
4) you got caustics for $750 ;)

It really just depends on how much do you want to use caustics - if you want to use them in every scene, you can. There is constant price to pay for that ;).

Even if you decide to turn them on only occasionally, check it again in version 5, we will have some further improvements by then.

I am way beyond 16 cores but I get your point
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-12, 16:14:18
Great ;) we are already working on optimizations
Title: Re: Some thoughts on Caustics
Post by: Jpjapers on 2019-06-12, 16:40:46
Great ;) we are already working on optimizations

Just whilst youre here Ondra. Will v5 be just about faster existing features? Or will we finally see the PBR shader emerge?
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-12, 17:01:12
there will be much faster parsing and lower memory consumption. We will improve our internal testing, and fix some long standing bugs.

The short time frame means no PBR material for v5, that one is being postponed to v6 (hopefully)
Title: Re: Some thoughts on Caustics
Post by: Jpjapers on 2019-06-12, 23:27:05
there will be much faster parsing and lower memory consumption. We will improve our internal testing, and fix some long standing bugs.

The short time frame means no PBR material for v5, that one is being postponed to v6 (hopefully)

Cool :) that displacement memory reduction sounds very promising!
Title: Re: Some thoughts on Caustics
Post by: Njen on 2019-06-13, 00:23:18
Just to chime in here on a request about caustics that has already been asked for, is the ability to enable caustics by material is necessary. For example, caustics really makes eyes look much more realistic, but I don't want to turn on caustics for the entire scene just to get a few pixels looking better.

The current work around I am doing is rendering a second pass of just the eyes held out by the rest of the scene, then comping the caustics render element from that second pass on top of my character render. The final result looks great and takes less time than if I had enabled caustics for the whole scene, but there is obviously the overhead of rendering a second pass to get what I want.
Title: Re: Some thoughts on Caustics
Post by: Javadevil on 2019-06-13, 03:20:32

1) upgrade your CPU to double # of cores (e.g. new ryzens with 16 cores costing $750)
2) turn on caustics in every render
3) render time stays the same, every scene has caustics
4) you got caustics for $750 ;)


Thats my plan :)
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-13, 10:20:14
Just to chime in here on a request about caustics that has already been asked for, is the ability to enable caustics by material is necessary. For example, caustics really makes eyes look much more realistic, but I don't want to turn on caustics for the entire scene just to get a few pixels looking better.

The current work around I am doing is rendering a second pass of just the eyes held out by the rest of the scene, then comping the caustics render element from that second pass on top of my character render. The final result looks great and takes less time than if I had enabled caustics for the whole scene, but there is obviously the overhead of rendering a second pass to get what I want.

The way the current solver works, there probably wouldnt be the speedup you would expect from this, since the photons cannot be guided to hit just specific materials...
Title: Re: Some thoughts on Caustics
Post by: Jpjapers on 2019-06-13, 12:06:23


The way the current solver works, there probably wouldnt be the speedup you would expect from this, since the photons cannot be guided to hit just specific materials...

Just curious. Do you emit special photons for the caustics that behave differently or do you use the same photons but run different calculations. Just curious about how it works :)
Title: Re: Some thoughts on Caustics
Post by: Juraj on 2019-06-13, 12:26:53
I will just put this small trick out here for desperate people: Render Caustics outside of beauty pass, and denoise them. Even Optix Denoiser creates magic out of them in matter of minutes.
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-13, 13:15:03


The way the current solver works, there probably wouldnt be the speedup you would expect from this, since the photons cannot be guided to hit just specific materials...

Just curious. Do you emit special photons for the caustics that behave differently or do you use the same photons but run different calculations. Just curious about how it works :)
we use photons only for caustics, not for anything else. Hope I understrood the question right ;)
Title: Re: Some thoughts on Caustics
Post by: Mr.Max on 2019-06-13, 16:32:20
what about adding Caching option for caustics  ?
In VRay we used to calculate the caustics once then use the same cache for all other shots, when there is no animation of course .
is is possible to add in future?
Title: Re: Some thoughts on Caustics
Post by: martinsik on 2019-06-13, 17:03:58
what about adding Caching option for caustics  ?
In VRay we used to calculate the caustics once then use the same cache for all other shots, when there is no animation of course .
is is possible to add in future?

Such caching would be extremely memory consuming. Corona caustics solver generates a new set of photons for each pass with each set having millions of photons. Let's say you render 100 passes per image, the cache would then contain photons from all the passes, so something around billion photons. This would hardly fit into memory.
Title: Re: Some thoughts on Caustics
Post by: shoebu23 on 2019-06-13, 17:15:54
Team,

Amazing job, well done!  Quick question... with 'only in caustics element enabled', is there a way to see the combined effect directly in the VFB without having to go into Photoshop?  I like the idea of separating out beauty from CShading_Caustics- but would love to be able to quickly see (or even adjust) it in the VFB.  Thanks!
Title: Re: Some thoughts on Caustics
Post by: TomG on 2019-06-13, 17:51:09
Team,

Amazing job, well done!  Quick question... with 'only in caustics element enabled', is there a way to see the combined effect directly in the VFB without having to go into Photoshop?  I like the idea of separating out beauty from CShading_Caustics- but would love to be able to quickly see (or even adjust) it in the VFB.  Thanks!

No way to do this at present, no, sorry.
Title: Re: Some thoughts on Caustics
Post by: Juraj on 2019-06-13, 18:06:17
There is one workaround, I will write it just for the sheer absurdity :- ).

Make two copies of the same light (one with Caustic On, one Off), each into separate LightSelect Layers and than you can see both Beauty+Caustic and Beauty without in LightMixer.
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-13, 18:12:40
There is one workaround, I will write it just for the sheer absurdity :- ).

Make two copies of the same light (one with Caustic On, one Off), each into separate LightSelect Layers and than you can see both Beauty+Caustic and Beauty without in LightMixer.
please don't ;)
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-17, 18:23:44
(https://i.imgur.com/Gf76gXO.jpg)

Here is an improvement we just did, now it requires about half rendertime for the same quality of caustics: https://corona-renderer.com/comparer/0cZSSm

Will you print me the tshirt now? :D
Title: Re: Some thoughts on Caustics
Post by: Image Complete on 2019-06-18, 12:12:59
It is 1 min vs 1.03 min. Am I missing something? :[
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-18, 12:32:02
it is same time comparison, see quality of the caustics, especially inside the ring and pool
Title: Re: Some thoughts on Caustics
Post by: Fluss on 2019-06-18, 13:00:46
there will be much faster parsing and lower memory consumption. We will improve our internal testing, and fix some long standing bugs.

The short time frame means no PBR material for v5, that one is being postponed to v6 (hopefully)

We can live whithout new PBR coz you know... 2.5D DISPLACEMENT IS COMING !!!!! That will be a game changer for us! That plus the overall optimizations, can't wait for that!

And I can't stop smiling by looking at the potential feature pool on trello. All of my own most-wanted features are there. Keep-it up guys, you rock !
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-18, 16:18:40
the 2.5D displacement does not have 100% chance of making it into v5, just so you are not disappointed if it does not ;)
Title: Re: Some thoughts on Caustics
Post by: rozpustelnik on 2019-06-18, 17:03:13
Sorry for noob question but how 2.5 displacement will be differerent from existing one? What are pros and cons?
Title: Re: Some thoughts on Caustics
Post by: Ondra on 2019-06-18, 17:31:34
It is an experiment - we have an idea how to lower memory consumption of displacement by factor of 10x. We will see if it works ;)
Title: Re: Some thoughts on Caustics
Post by: rozpustelnik on 2019-06-18, 18:34:23
Yep. This surely would be magic :)
Title: Re: Some thoughts on Caustics
Post by: Juraj on 2019-06-19, 20:34:45
It is an experiment - we have an idea how to lower memory consumption of displacement by factor of 10x. We will see if it works ;)


There were more benefits to it though, mainly that the detail could be a lot higher, on sub-pixel level. Something of that sort even without memory footprint would take endless computation time.

Though maybe someone could benchmark the systems in Vray and particularly Octane that offer this.