Author Topic: Environment lighting discrepancy between Corona 9 and 10  (Read 3266 times)

2023-07-04, 14:35:44
Reply #15

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
The case is already being handled in the ticket, the difference between the renders is confirmed.
It has something to do with CoronaColorCorrect map, plugging the HDRI directly in to the Environment slot(s) gives identical renders for V9 and V10.

I will share other important updates here.
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2023-07-04, 19:06:43
Reply #16

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Oh, if ColorCorrect node produces different results with HDR images, then that's pretty much a 'no' for using v10 for me. Using it in almost every scene over here. Sounds like something for a hotfix.

2023-07-04, 19:17:28
Reply #17

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Oh, if ColorCorrect node produces different results with HDR images, then that's pretty much a 'no' for using v10 for me. Using it in almost every scene over here. Sounds like something for a hotfix.

Same :(

2023-07-13, 09:44:45
Reply #18

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
Here are the updates for this:

The environment map filtering has been improved in Corona 10, and with some specific maps and resolutions the renders may look different.
As observed by Tom, there is no difference when using a 20k map and there is difference when using a 7k map (different maps).

If this is the case of any user, to have identical with Corona 9 renders while using Corona 10, a string option can be used to increase the environment map's lighting resolution (default value is 1000):

Code: [Select]
int lights.envResolution = 5000
This should give identical results between Corona 9 and Corona 10.

Feel free to test this out and share your feedback.

Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2023-07-13, 10:03:21
Reply #19

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Seems like a key change that should be documented somewhere.

I'm not technical so I don't fully understand that string, but is Corona ultimately reducing the resolution of HDRI's behind the scenes?

2023-07-13, 11:23:46
Reply #20

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Seems like a key change that should be documented somewhere.

Totally agree, especially since it gives such a radically different result by default. I for one, almost never use higher than 4K HDRI for environment and i'm bit worried now that my old scenes will look quite different now, on the other hand 90% of my environment lighting is done with Corona sun and sky, so maybe i will be good :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-07-13, 11:48:45
Reply #21

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Here are the updates for this:

The environment map filtering has been improved in Corona 10, and with some specific maps and resolutions the renders may look different.
As observed by Tom, there is no difference when using a 20k map and there is difference when using a 7k map (different maps).

If this is the case of any user, to have identical with Corona 9 renders while using Corona 10, a string option can be used to increase the environment map's lighting resolution (default value is 1000):

Code: [Select]
int lights.envResolution = 5000
This should give identical results between Corona 9 and Corona 10.

Feel free to test this out and share your feedback.

I'm sorry but in my opinion it's never a good idea to change things like this. And it would be critical to know what 'specific maps' means and which resolutions will be downgraded to which values. Also, a default of 1000 pixels might be a bit too low.

Why wasn't this mentioned anywhere? And, why was it changed in the first place?

2023-07-13, 12:39:48
Reply #22

Juraj

  • Active Users
  • **
  • Posts: 4761
    • View Profile
    • studio website
I am interested which one is closer to ground truth? Since in above post it is being mentioned that at 20K, difference isn't observed (and how come if they are both downsampled apparently to just 1K behind the scenes?), what happens at that 20K? Does it look like in V9 or like in V10?

What is correct?

Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2023-07-13, 15:22:13
Reply #23

arqrenderz

  • Active Users
  • **
  • Posts: 996
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
Resolution or filter type shouldn't change image color don't it ???

2023-07-14, 05:32:56
Reply #24

Tom

  • Active Users
  • **
  • Posts: 236
    • View Profile
    • www
Hi guys,

First thing to mention is I tried the string trick and I confirm Corona 10 now gives similar results to Corona 9, that's a good point as we now have a workaround, although not really user friendly.

To clarify and summarize: when using a 7k HDRi map without using the 'string trick,' I found a significant difference between Corona 9 and Corona 10. This difference no longer exists when employing the 'string trick.' As I was curious to know if this discrepancy was due to the HDRi map itself, I repeated the test, this time using another HDRi map, of a higher resolution of 20k. And surprinsingly I did not observe any notable difference, even without using the 'string trick.' Therefore, I don't quite understand how the new filtering in Corona 10 works, and I would appreciate feedback from the developers on this matter, as well as a fix to achieve shadows as sharp as those in Corona 9 without having to rely on the 'string trick.'

2023-07-14, 05:36:14
Reply #25

Tom

  • Active Users
  • **
  • Posts: 236
    • View Profile
    • www
Here is the conversation I had with Aram replying to my support ticket, in case it helps:

>     
>
> Aram Avetisyan (Chaos)
>

> I understand what you are addressing, but keep in mind that the filtering has been improved for environment maps, so consider the results with Corona 10 as "superior" now, even though they differ from Corona 9.

What do you mean by "superior"? All I can see is less light being cast by the HDRi and blurrier shadows which to me looks like the opposite of a superior result.

> The "fix" for this already implemented - the better filtering - which comes with a drawback of possible differences between Corona 9 and Corona 10.

What was wrong with Corona 9 filtering? I still don't understand, sorry. If the goal was to speed up the rendering, I understand that, but not at the expense of a regression in shadow rendering and lighting intensity (both of which being linked obviously).

> And there is a workaround, I would say rather easy one, the string option, to get consistent with Corona 9 results using Corona 10.

Yes there is a workaroud, but it's far from user friendly.

> I have just in case asked clarifying questions for devs to see how exactly the resolution of a map affects the filtering, and I will update you once there is a response.

Great, thanks Aram.

2023-07-14, 09:53:55
Reply #26

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
So the better filtering makes the image look inferior but we have to think of it as superior.  Got it

2023-07-14, 10:05:53
Reply #27

Juraj

  • Active Users
  • **
  • Posts: 4761
    • View Profile
    • studio website
Internally downsampling to 1K might be little too much, since I create HDRis, I know how tiny the Sun is even at 25k + res.

Will do my own tests to check as well now.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2023-07-14, 10:48:14
Reply #28

Tom

  • Active Users
  • **
  • Posts: 236
    • View Profile
    • www
Will do my own tests to check as well now.

Awesome. Thanks Juraj.

2023-07-14, 10:54:34
Reply #29

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Some rough (and probably wrong) math:
- sun disc diameter is 0.5° in visible sky, which translates to 1 pixel in a HDR @ 720px width (well, it's rectangular, not circular so obviously not enough resolution to properly represent a sun disc)
- when a low res HDR gets downsized to 1000px internally, we end up with a sun disc size of ~1.4 pixels (still not enough)
- with the original disc being downsized and filtered we may end up with a disc of around 3-4 pixels depending on its original intensity, hence the softer shadow and reduced intensity

Now that we know that the downsizing (and different lighting outcome) happens at some resolution below 20.000px it would be interesting to know:
- where is the threshold where env maps are being downsized
- are they downsized in steps (any other internal auto-values than 1000px?)

Once a scene is loaded that uses an environment map at a value that gets auto-downsized by v10, you absolutely MUST display a warning in the log window and offer an option to add the string from there. Earlier Corona versions had warnings in less severe cases where differences were to be expected so why not this time? Basically, let me decide if I want the 'new' or 'old/legacy' way of how env maps are treated.

In past versions, some features were deemed 'experimental' and were disabled by default and you enabled them only after it was shown to be safe to do so. The main reason for doing this was to ensure that images don't render differently. Now, you've implemented a change without communicating it, no info when opening a scene in v10 that *will* look differently and support says the workaround is an 'easy one'. I wonder if anyone spend enough time on thinking through the outcome of the change.