This looks like a physically-correct effect of sunlight passing through holes (I am guessing foliage) which are square-shaped. This would happen in real life as well.
If you replace the object which is casting shadows with something that has round holes in it - does the issue disappear?
I’ve not got the scene open, but when I get chance I’ll test it with the default corona sun/sky, because I’m pretty sure the effect disappeared when I ran that test at the time, which is what prompted me to post the screenshot.
I’d understand your thought process if the resulting rendered tree(s) has visible square holes, but they don’t?
Also if anyone can post a real world example of this happening, that would clear a lot of the doubts up.
As i showed in the examples above, this happens with small holes of any shape - the holes have been round in my example scene, still the projected light was square. this only happens with hdri’s, not with the corona sun, I also showed examples above regarding that.
to compare it with something photographic… background bokeh also always has the shape of the lens entrance pupil. It has nothing to do with the shape of the light. in case of the hdri sampling in corona it seems that the sun is only somehow sampled by one -square- pixel… even if hdri resolution is high and sun shape is actually round. I also showed that in my examples.
by the way, it works as expected when the hdri is mapped on a sphere… takes ages to render though… . It is also independent from the birmap filtering and bitmap blur settings. So there is clearly something wrong with the light sampling of hdri’s - something that is not visible when then hdri is directly seen in the background.
Yes, I was thinking that maybe the trees were modelled incorrectly and have some square-shaped holes. But then I checked the previous examples and it definitely can be a bug.
As for real world examples - I only mean that this would happen if the holes were square-shaped, like in the case of bokeh getting the shape of the aperture, basically a pinhole camera effect.
We will look into this. Something is definitely wrong.
To be honest I thought we’d established that it was a problem already, as per George K’s post. My post was merely to see if there was an update on the investigation rather and to provide a further example of the already identified problem.
Yes we have, and I thought we were looking at something else later. So I just wanted to confirm - we have the issue logged and we will properly look into it.
I wondered if this has something to do with the fact that internally Corona downsizes a HDR quite drastically for lighting, basically resulting in the sun being a super bright pixel which would then display as a tiny square light source. Earlier tests might not have looked like this because this behavior might have been introduced at a later point.
So far, we did not get clear answers whether this is a bug or not, sorry. We need to look into it some more - thank you for the reminder.
If anyone has a scene which is clearly showing the issue, please share it with us (i.e. there is a round aperture (hole) and the projection comes out pixelated).
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.
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.
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
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?
What’s the status on this issue? I’m having deal breaking square artifacts in the direct illumination pass that are ruining my images. It’s also impossible to have proper looking shadow play from leaves using an HDRI in Corona.