Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: bishbashross on 2019-12-17, 19:43:50

Title: Shadow bokeh effect?
Post by: bishbashross on 2019-12-17, 19:43:50
Not sure what to call this but is it possible to achieve this effect without workarounds? I'm guessing not.

Anyone have any experience of this. I'd imagine you'd have to fake it by creating a tree mask and blurring with something like lenscare, then using that to cast a shadow?

Interested to hear peoples thoughts. :)
Title: Re: Shadow bokeh effect?
Post by: burnin on 2019-12-18, 03:18:25
In principle,
the larger the Sun Size - the wider and more diffused the emissive source is, the softer and wider the shadow gets. Same occurs in relation between the shadow transmitter (ie. leaf) and its receiver (ie. ground) - the larger the distance between, the more diffused is the signal receiver gets. (see attached and pay attention while observing environment)
;)
Title: Re: Shadow bokeh effect?
Post by: GeorgeK on 2019-12-18, 11:17:44
From what I can see it's very dependent on scene settings, leaf geometry/shape, tree distance, Sun Azimuth etc. You can get pretty close tinkering for sometime.
Title: Re: Shadow bokeh effect?
Post by: maru on 2019-12-18, 12:30:59
This thing definitely does happen in Corona if you set up your sun and tree as similar to reality as possible.
Title: Re: Shadow bokeh effect?
Post by: sebastian___ on 2019-12-18, 12:35:46
The image Corona_GK posted does seem to show the circle effect, but not as pronounced as the circles you get in reality.
Now I'm curious myself if renderers can simulate that circle shape of the sun in the shadows.
Title: Re: Shadow bokeh effect?
Post by: maru on 2019-12-18, 14:12:25
Here is an example with Corona Sun.
Title: Re: Shadow bokeh effect?
Post by: bishbashross on 2019-12-18, 15:58:39
From what I can see it's very dependent on scene settings, leaf geometry/shape, tree distance, Sun Azimuth etc. You can get pretty close tinkering for sometime.

This is not bad! Still lacks the beauty and sharpness of the real effect to me though.

Maru, that looks like the DOF doing most of the work there I think. Image I posted is sharp throughout the frame.
Title: Re: Shadow bokeh effect?
Post by: romullus on 2019-12-18, 20:55:37
You don't need anything special to get this in Corona, just plant a tree and lit a sun. This phenomena depends on two things - right distance between the leafs and the ground and many small gaps between the leaves. Usually it's not hard to get it fulfilled. Basically, it's the same DOF, it just happens not in a lens, but between the leaves and a ground. Gaps between leaves acts as an aperture and ground is a film, or sensor.
Title: Re: Shadow bokeh effect?
Post by: mferster on 2019-12-18, 22:12:11
More examples!

You can even recreate the fun bokeh effects you see during solar eclipses by putting a sphere far enough away from your scene.
Title: Re: Shadow bokeh effect?
Post by: GeorgeK on 2019-12-19, 08:34:01
It's one of those things that someone made accidentally and an entire team of people try to reverse engineer!
Title: Re: Shadow bokeh effect?
Post by: romullus on 2019-12-19, 10:03:45
You can even recreate the fun bokeh effects you see during solar eclipses by putting a sphere far enough away from your scene.

Wait a minute! So you actually added 3D sphere blocker between the sun and the scene? Whoa! I unsuccessfully tried to recreate this phenomena by painting a sun eclipse into HDRI map, but required resolution would be insane, so i dropped my attempt. It never crossed my mind that this can be achieved with 2D sun and 3D moon :] Super cool!
Title: Re: Shadow bokeh effect?
Post by: mferster on 2019-12-19, 17:23:32
Wait a minute! So you actually added 3D sphere blocker between the sun and the scene? Whoa! I unsuccessfully tried to recreate this phenomena by painting a sun eclipse into HDRI map, but required resolution would be insane, so i dropped my attempt. It never crossed my mind that this can be achieved with 2D sun and 3D moon :] Super cool!

Yah, that's exactly correct! You can even do goofy things like putting stencil shapes in front of the sun.
Title: Re: Shadow bokeh effect?
Post by: maru on 2019-12-19, 17:46:28
Maru, that looks like the DOF doing most of the work there I think. Image I posted is sharp throughout the frame.

There is no DOF in my scene whatsoever! :D Just download it and see.
Title: Re: Shadow bokeh effect?
Post by: GeorgeK on 2019-12-19, 19:28:34
Wait a minute! So you actually added 3D sphere blocker between the sun and the scene? Whoa! I unsuccessfully tried to recreate this phenomena by painting a sun eclipse into HDRI map, but required resolution would be insane, so i dropped my attempt. It never crossed my mind that this can be achieved with 2D sun and 3D moon :] Super cool!

Yah, that's exactly correct! You can even do goofy things like putting stencil shapes in front of the sun.

This is hilarious!
Title: Re: Shadow bokeh effect?
Post by: burnin on 2019-12-19, 19:47:56
... and a new feature for Corona 6 - Sun Shape ;)
Title: Re: Shadow bokeh effect?
Post by: romullus on 2019-12-19, 19:55:23
... and a new feature for Corona 6 - Sun Shape ;)

We don't need fakes. Give us physically plausible sun and moon eclipse simulation with accurate date and time :]
Title: Re: Shadow bokeh effect?
Post by: sprayer on 2019-12-19, 23:02:25
... and a new feature for Corona 6 - Sun Shape ;)

We don't need fakes. Give us physically plausible sun and moon eclipse simulation with accurate date and time :]
+1
That would be great
Title: Re: Shadow bokeh effect?
Post by: burnin on 2019-12-20, 01:52:47
... and a new feature for Corona 6 - Sun Shape ;)

We don't need fakes. Give us physically plausible sun and moon eclipse simulation with accurate date and time :]
I only meant it for the Sun attribute, specifically for the shape of cast light. That would bring an advantage and added extra value to the engine.
Like there's a Textured property for its look/ visual appearance... or did you forgot about the rainbow ;) (https://forum.corona-renderer.com/index.php?topic=21186.msg130767#msg130767) which is also a deep Fake - basically everything virtual is a "canny fake"

Also, "Physical Sky/Environment" is a whole different matter (which I think you're implying to).
I did believe that better, highly improved environment system is/was in works or at least planned (along with infinite ground plane, auto shadow & reflection catcher, atmospheric scattering done in a way to also simulate other worlds/planets)... well, maybe it's in the works or maybe it was just a thought and is now a memory since the R&D department is on hold... :'(

... and we're getting off topic 
Title: Re: Shadow bokeh effect?
Post by: romullus on 2019-12-20, 09:47:57
Actually, i was joking with soltice idea :] I don't think that it would add much value to Corona.
Title: Re: Shadow bokeh effect?
Post by: bishbashross on 2019-12-20, 13:34:45
Maru, that looks like the DOF doing most of the work there I think. Image I posted is sharp throughout the frame.

There is no DOF in my scene whatsoever! :D Just download it and see.

I stand corrected! Thanks for input maru :)

Title: Re: Shadow bokeh effect?
Post by: maru on 2019-12-20, 16:47:49
Remember this one? https://corona-renderer.com/gallery/352

(https://corona-renderer.com/content/gallery/352-Eclipse-02-by-Lev-Levchenko-Nekrobul-.jpg)