Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => Topic started by: dj_buckley on 2019-01-16, 00:04:42

Title: Directionality changing light appearance non-linearly
Post by: dj_buckley on 2019-01-16, 00:04:42
What's up with the values in Corona, specifically directionality on lights/light materials.  If you gradually increase the value i.e. 0, 0.5, 1, 1.5 you get a nice gradual change of direction of the light.

BUT ... as soon as you get to around 4.5, 5 - the change is drastic.

As a side note, this also happens with the Vignetting in the Frame Buffer.
Title: Re: Directionality
Post by: dj_buckley on 2019-01-16, 09:22:21
To add to this, if you go over 0.5 directionality on a light material it stops being visible and just renders black
Title: Re: Directionality
Post by: romullus on 2019-01-16, 10:19:02
Directionality in Corona lights/light materials has a range of 0-1 At value of 1.0 light rays goes completely parallel, so anything beyond that wouldn't make any sense. Are you sure you're not confusing something?
Title: Re: Directionality
Post by: dj_buckley on 2019-01-16, 12:05:21
Apologies I meant anything beyond 0.45 and 0.5.

Gradually increasing a lights direction 0,0.05,0.1,0.15,0.2,0.25,0.3,0.35 etc you get a nice gradual change, but as soon as you hit around 0.45,0.5 the change is drastic
Title: Re: Directionality
Post by: aaouviz on 2019-01-16, 13:24:41
I agree. It doesn't seem to be linear.

Also, at the same .45 point or so the light becomes black in reflections.
Title: Re: Directionality
Post by: TomG on 2019-01-16, 13:24:53
On the light going black, ensure "Prevent black appearance" is checked - it should be by default, but it may be an older scene. If you are using a really old version of Corona (mentioning the version could be useful ;) ) before that checkbox was added, you would have to have two light sources, one emitting light and not visible, one not emitting light, and visible, and without directionality to act as what the camera sees. Turning black is physically correct, in that at high directionality none of the light rays are reaching the camera as it is outside the cone of the light rays.
Title: Re: Directionality
Post by: TomG on 2019-01-16, 13:28:18
On it still being black in reflections and refractions even with the checkbox enabled, this is a known limitation at this time. In those situations, the "one light for light casting, one for how it looks" would be the workaround.
Title: Re: Directionality
Post by: dj_buckley on 2019-01-16, 13:28:51
Using the latest Corona version on Max 2018.  The black issue just seems a bit abrupt.  But changing the value is just as abrupt.  I'll run some tests
Title: Re: Directionality
Post by: dj_buckley on 2019-01-16, 13:47:45
Here's the comparison changing only the light direction as viewed from above and inside the volume.

As you can see at around 0.4 and 0.5 especially, the change is pretty dramatic when compared to the change between 0 - 0.4
Title: Re: Directionality
Post by: James Vella on 2019-01-17, 10:23:36
This looks correct to me. From what I understand the disc light (as apposed to the spherical light) is 180 degrees, as the directionality gets closer to 1.0 you considerably closing the distance of the angles.

For example:

Directionality: 0.1 / Degrees 162
Directionality: 0.2 / Degrees 144
Directionality: 0.3 / Degrees 126
Directionality: 0.4 / Degrees 108
Directionality: 0.65 / Degrees 63

Title: Re: Directionality
Post by: dj_buckley on 2019-01-17, 10:44:20
I see what you're saying but 0.1 to 0.4 almost look identical.  In your reference, the difference between 0.1 and 0.4 in terms of the angle is huge
Title: Re: Directionality
Post by: aaouviz on 2019-01-17, 10:49:05
I'm sorry, but that still doesn't make any sense...it's not linear? If there is a reasonable explanation for this, then good... but I'm yet to hear one?

If we assume directionality of 0 = 0° rotation (aka 180° of light direction, all directions)
and directionality of 1 = 90° rotation (aka 0° of direction, parallel)

Then shouldn't we presume for every increment of 0.1 it should change by 9°? (that is to say, the limit of light direction is changed by 9° on both sides)

Therefore a light directionality of .5 = 45° (aka half), .3 = 27° etc?

I might be out of my depth here, so happy to be corrected if there is something I'm missing.
Title: Re: Directionality
Post by: dj_buckley on 2019-01-17, 11:09:16
I'm sorry, but that still doesn't make any sense...it's not linear? If there is a reasonable explanation for this, then good... but I'm yet to hear one?

If we assume directionality of 0 = 0° rotation (aka 180° of light direction, all directions)
and directionality of 1 = 90° rotation (aka 0° of direction, parallel)

Then shouldn't we presume for every increment of 0.1 it should change by 9°? (that is to say, the limit of light direction is changed by 9° on both sides)

Therefore a light directionality of .5 = 45° (aka half), .3 = 27° etc?

I might be out of my depth here, so happy to be corrected if there is something I'm missing.

Exactly how I expected it to work, each increment would shift the direction of the light equally
Title: Re: Directionality
Post by: James Vella on 2019-01-17, 11:24:36
I see what you're saying but 0.1 to 0.4 almost look identical.  In your reference, the difference between 0.1 and 0.4 in terms of the angle is huge

Well they are not really identical, like in real life it depends on (a) the size of the light and (b) the distance to the subject (wall in this case) as you can see in the render I have attached.

I'm sorry, but that still doesn't make any sense...it's not linear? If there is a reasonable explanation for this, then good... but I'm yet to hear one?

If we assume directionality of 0 = 0° rotation (aka 180° of light direction, all directions)
and directionality of 1 = 90° rotation (aka 0° of direction, parallel)

Then shouldn't we presume for every increment of 0.1 it should change by 9°? (that is to say, the limit of light direction is changed by 9° on both sides)

Therefore a light directionality of .5 = 45° (aka half), .3 = 27° etc?

I might be out of my depth here, so happy to be corrected if there is something I'm missing.

You cannot calculate each individual 0.1 by 9 Degrees as the change is exponential, for example 0.65 Directionality is 0.35 x 180 = 63 Degrees. So in your example 0.5 = 90 Degrees, and 0.3 = 126 Degrees (attached example).  Because of the nature of it being exponential you will see the greatest results between 0.5, 0.51, 0.52, 0.53 for fine tuning before you reach 0.65, try this in the interactive render to see what I mean.


edit:
Updated lighting ref image to include 1500mm from wall


edit2:
It would probably be a good idea for it to be linear, not sure exactly how you would achieve this to be honest.
Title: Re: Directionality
Post by: dj_buckley on 2019-01-17, 14:46:40
That explains it then cheers James. 
Title: Re: Directionality
Post by: maru on 2019-01-25, 16:56:02
Currently expected. May be improved. Definitely low priority (there is a lot of more important things to do).
(internal note id=312321346)
Title: Re: Directionality
Post by: aaouviz on 2019-01-25, 19:04:24
Currently expected. May be improved. Definitely low priority (there is a lot of more important things to do).
(internal note id=312321346)

Fair enough, thanks!
Title: Re: Directionality
Post by: aaouviz on 2022-06-06, 15:53:16
Also, at the same .45 point or so the light becomes black in reflections.

3+ years later and this issue is still not resolved...