Author Topic: HDRI/Environment sampling causing Shadow artefacts  (Read 7108 times)

2024-02-06, 11:50:45
Reply #30

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
I remembered I had a camera obscura test setup for it and tested now with the string option:

int lights.envResolution = {value}

And yes, it actually is the reason why HDR environment maps produce a 'pixelated' sun shape or shadows.
Setting it to 1000 - which I believe is the default value - will produce a square shaped sun in a camera obscura, setting it to the map's original resolution (8000 in my case) will produce a rounded shape.

Not really a bug but a side effect of Corona downsizing HDR images internally. This should probably be added to the online help with instructions how to use the string option.


2024-02-06, 11:58:15
Reply #31

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
Below my tests of different values...

int lights.envResolution = 1000 vs int lights.envResolution = 8000

Green = sun object, red = HDR image aligned to the sun.
Left is a circle shaped hole, right is a square shaped hole in the camera obscura's wall facing the lights.
« Last Edit: 2024-02-06, 12:12:28 by pokoy »

2024-02-06, 12:02:26
Reply #32

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
(started writing before pokoy's last message)

I was able to reproduce the issue and it is definitely related to the internal environment resolution that Corona uses.
The string option is int lights.envResolution = 5000 and you can learn more about string options here - https://support.chaos.com/hc/en-us/articles/4528609584017
The default value is 1000

I will now re-report it to devs. It is expected, but can lead to some unwanted results like the example with tree canopy here https://forum.corona-renderer.com/index.php?topic=35753.msg199373#msg199373


(Internal ID=1297189417)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-02-06, 12:21:52
Reply #33

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Out of interest, why does Corona downsample like that?  Speed purposes?

For things like that, where stuff is happening behind the scenes that we're unaware of and at the cost of quality, it would be better to give the user a choice? "Keep Original Environment Map Resolution" as a tickbox for example?