Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: romullus on 2014-11-24, 19:47:59

Title: Region render causes different lighting
Post by: romullus on 2014-11-24, 19:47:59
Not sure if this bug or expected behaviour, but i stumbled upon a situation where region render gives different results than whole view render. I know that Mental ray do this when final gather is in use, but never saw this in Corona. It happens with PT + PT as well as with PT + HD. That yellowish reflection is from light which is inside owen and has texmap enabled (see attachment). When i remove map, inconsistency dissapears.


Edit: attached gif to better demonstrate problem.
Title: Re: Region render causes different lighting
Post by: Ludvik Koutny on 2015-06-04, 12:20:30
Is the bug still present in latest release? Does it happen even with CoronaVFB?
Title: Re: Region render causes different lighting
Post by: romullus on 2015-06-04, 13:39:36
Tested it with latest build and found that now it's much worse. Light completely dissapears when region rendering. Will do proper report on mantis with attached scene later.
Title: Re: Region render causes different lighting
Post by: pokoy on 2015-06-04, 13:45:33
I hahave used a script in the past that submitted cropped image tiles to backburner for large images and saw the same issue.
It was in an earlier stage  more than a year ago and I didn't report it back then.
It's a severe limitation imo since it means you can't use regions/crops for large resolutions. Needs to be fixed!
Title: Re: Region render causes different lighting
Post by: Ludvik Koutny on 2015-06-04, 14:15:29
Tested it with latest build and found that now it's much worse. Light completely dissapears when region rendering. Will do proper report on mantis with attached scene later.

Thanks a lot, that is going to be very helpful!
Title: Re: Region render causes different lighting
Post by: romullus on 2015-06-04, 14:36:42
You're welcome.

Reported it on mantis: https://corona-renderer.com/bugs/view.php?id=1053

This topic may be moved to resolved section now.
Title: Re: Region render causes different lighting
Post by: Ludvik Koutny on 2015-06-04, 14:39:21
You're welcome.

Reported it on mantis: https://corona-renderer.com/bugs/view.php?id=1053

This topic may be moved to resolved section now.

Yup, thanks again.

Will take a look at the scene ASAP.
Title: Re: Region render causes different lighting
Post by: Juraj on 2015-06-04, 14:59:34
Had the same issue with regular latest build (no daily).

I couldn't even tell what I was seeing, it manifested in much stronger direct light from artificial source (Corona plane light). Good to know someone encountered that as well.

BTW I had no map. Don't have time to reproduce this to be honest now...but maybe later.
Title: Re: Region render causes different lighting
Post by: Ondra on 2015-06-05, 10:39:53
I have an idea for fix, let me try that once I install my new computer.
Title: Re: Region render causes different lighting
Post by: Ludvik Koutny on 2015-06-05, 10:58:46
Meanwhile, here is Copypasta of my reply to Romullus on mantis, in case anyone could use these temporary workarounds:

Hi, I've successfully reproduced it and Ondra found out what the problem is. Basically all textures on lights outside of the camera frustrum get sampled at a lower resolution, resulting loss of precision.

Ondra said it will be fixable, but it will take a while.

There are several workarounds, like using CoronaLightMTL instead of CoronaLight and putting rayswitch map inside, where map in GI slot would be blurred (averaged) version of your orange dots map.

This map is also the reason why this bug is so extreme in this scene. Sampling those small orange dots instead of hitting black at downsized resolution is quite hard.

BUT, what i found out to be most efficient workaround is actually using CoronaBitmap. It has better filtering than Max's native bitmap, so just right click your "dot light" gradient map in slate editor, and select render map. That will collapse the procedural map into bitmap. Select resolution, i used 500*500.
Then load this rendered map into CoronaBitmap, and put this CoronaBitmap as texture for that CoronaLight. I've just tried it and it seems to work well :)