Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: alexyork on 2021-06-08, 13:40:05

Title: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-06-08, 13:40:05
Hi devs,

We've discovered that if you have a scene which runs across a huge area, e.g. a standard exterior scene in CM but you also have an object 500k units away from the camera/origin or so, then caustics seem to "bunch/pinch" into a single pole/singularity black hole of collapsed nothingness... they read/show clearly still but they concentrate themselves into an extreme pinchpoint. In addition it slows down caustics/rendering very significantly.

See example attachment. To make the effect more obvious I've turned on dispersion. The problem goes away as soon as you delete objects too far from the origin.

Lastly, an unrelated, have you guys planned/made a fix for caustics adaptivity causing NaN squares?

Cheers,

Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: rowmanns on 2021-06-08, 16:59:15
Hi Alex,

Thanks for reporting this. Which version of Corona are you using? Secondly would you be able to provide the scene in question?

To your last question, we are planning on addressing some of the Caustics issues in v8. As of yet I don't have any further information. I'll let you know when I know more :)

Thanks,

Rowan
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-06-08, 17:43:29
Hey Rowan,

Sure I can try to upload something tomorrow - but in the mean time this is really easy to test if you just make any super simple caustics scene in a basic pool, and turn on dispersion to make the effect really obvious. Then make a box object and throw it something like 500000 units away from scene origin. You should notice that it happens. Make sure to manually stop and restart IR between changes, as I noticed that somehow it doesn't update properly unless you do this. (Maybe related to Embree? just a sneaky suspicion).

Using latest stable main release corona 6 version.

Cheers,
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: GeorgeK on 2021-06-21, 11:48:38
Hey Rowan,

Sure I can try to upload something tomorrow - but in the mean time this is really easy to test if you just make any super simple caustics scene in a basic pool, and turn on dispersion to make the effect really obvious. Then make a box object and throw it something like 500000 units away from scene origin. You should notice that it happens. Make sure to manually stop and restart IR between changes, as I noticed that somehow it doesn't update properly unless you do this. (Maybe related to Embree? just a sneaky suspicion).

Using latest stable main release corona 6 version.

Cheers,

Reproduced, Thanks Alex!

(Report ID=CRMAX-708)
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-06-21, 13:07:39
Excellent stuff. This has been a challenge on loads of current projects so it'd be great to get a fix!

While you're at it - we've found that it might be somewhat related to the photon count needing to be higher on higher-res scenes, or larger-scale scenes, where what you really want is to fire as many caustics photons into the immediate scene. I wonder if you could build in a distance/scale limit, so the vast majority of caustics are calculated in the camera's view, and anything beyond that, or beyond a distance we can control, start to fall off.

And as above, when you go from a 2k test to a full res render, it seems you need to really crank the number of photons to get a good, clear result. This should not be necessary, and would ideally also be fixed.

Cheers!

Lastly, as a PS... I know it's been requested a thousand times, but we really would looooove a simple include/exclude mode for receiving caustics. Or perhaps you could consider some kind of "caustics blocker" material. We actually tried making one, which does work, using a kind of invisible-to-camera approach, but it doesn't fully work, and it ends up darkening inside water and wouldn't work for most use cases. But something like your corona portal that does a similar thing for caustics and controls them not to fire past the object might help if a proper include/exlude method is not possible/feasible.
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: GeorgeK on 2021-06-24, 15:48:02
Excellent stuff. This has been a challenge on loads of current projects so it'd be great to get a fix!

While you're at it - we've found that it might be somewhat related to the photon count needing to be higher on higher-res scenes, or larger-scale scenes, where what you really want is to fire as many caustics photons into the immediate scene. I wonder if you could build in a distance/scale limit, so the vast majority of caustics are calculated in the camera's view, and anything beyond that, or beyond a distance we can control, start to fall off.

And as above, when you go from a 2k test to a full res render, it seems you need to really crank the number of photons to get a good, clear result. This should not be necessary, and would ideally also be fixed.

Cheers!

Lastly, as a PS... I know it's been requested a thousand times, but we really would looooove a simple include/exclude mode for receiving caustics. Or perhaps you could consider some kind of "caustics blocker" material. We actually tried making one, which does work, using a kind of invisible-to-camera approach, but it doesn't fully work, and it ends up darkening inside water and wouldn't work for most use cases. But something like your corona portal that does a similar thing for caustics and controls them not to fire past the object might help if a proper include/exlude method is not possible/feasible.

Thanks again for all the feedback Alex, I believe we have all issues/requests logged I will further update the current ones and fill in anything missing. Caustic improvements are planned for v8 (https://trello.com/b/EfPE4kPx/corona-tentative-road-map-3ds-max) so hopefully, most of the current issues will be improved.

(Internal ID=566135445)
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-06-24, 15:51:07
Good to know :) There's probably some specific things that the guys here could go into details on as well. I might ask around and get a little list together for you of issues we've found relating to caustics/dispersion specifically, if that would be helpful?

Cheers,
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: GeorgeK on 2021-06-25, 11:12:55
Good to know :) There's probably some specific things that the guys here could go into details on as well. I might ask around and get a little list together for you of issues we've found relating to caustics/dispersion specifically, if that would be helpful?

Cheers,

That would be very helpful, much appreciated! Feel free to contact me or anyone from the support team with the list and we will pass it through!

Cheers,
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-06-30, 14:59:58
Sent you the team's compiled list of feedback :)
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: GeorgeK on 2021-07-01, 13:16:57
Sent you the team's compiled list of feedback :)

Once again thank you very much for the detailed feedback. Marcin is on it :).
Title: Re: Caustics collapse into a pole/pinching when scene scale is huge
Post by: alexyork on 2021-07-01, 13:37:56
Cool no worries!