Author Topic: Directionality changing light appearance non-linearly  (Read 2794 times)

2019-01-16, 00:04:42

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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.
« Last Edit: 2019-01-25, 16:57:33 by maru »

2019-01-16, 09:22:21
Reply #1

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
To add to this, if you go over 0.5 directionality on a light material it stops being visible and just renders black

2019-01-16, 10:19:02
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7293
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-01-16, 12:05:21
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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

2019-01-16, 13:24:41
Reply #4

aaouviz

  • Active Users
  • **
  • Posts: 493
    • View Profile
    • Another Angle 3D
I agree. It doesn't seem to be linear.

Also, at the same .45 point or so the light becomes black in reflections.

2019-01-16, 13:24:53
Reply #5

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4033
    • View Profile
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.

2019-01-16, 13:28:18
Reply #6

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4033
    • View Profile
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.

2019-01-16, 13:28:51
Reply #7

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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

2019-01-16, 13:47:45
Reply #8

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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

2019-01-17, 10:23:36
Reply #9

James Vella

  • Active Users
  • **
  • Posts: 184
    • View Profile
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

« Last Edit: 2019-01-17, 10:32:18 by James Vella »

2019-01-17, 10:44:20
Reply #10

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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

2019-01-17, 10:49:05
Reply #11

aaouviz

  • Active Users
  • **
  • Posts: 493
    • View Profile
    • Another Angle 3D
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.

2019-01-17, 11:09:16
Reply #12

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
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

2019-01-17, 11:24:36
Reply #13

James Vella

  • Active Users
  • **
  • Posts: 184
    • View Profile
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.
« Last Edit: 2019-01-17, 12:26:59 by James Vella »

2019-01-17, 14:46:40
Reply #14

dj_buckley

  • Active Users
  • **
  • Posts: 478
    • View Profile
That explains it then cheers James.