Author Topic: about Light Discard Distance  (Read 1842 times)

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
about Light Discard Distance
« on: November 06, 2018, 03:28:16 am »
Hi again.
i recently found that discard distance of Light means the distance between Light and origin of an Object3D.
if an object3D(such as a ball) has radius of 10, placed 15 from light, discard distance is 10, then the object is not lit. but in reality the light should lit a part of the object at that distance.
when the light move closer to the object , down to 9.9 unit away, the object is suddenly lit.
would it be better if discard distance takes into account the radius of object3d?
that's just a thought, there may be downside too.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: about Light Discard Distance
« Reply #1 on: November 06, 2018, 08:44:14 am »
For compiled object (which are all objects in jPCT-AE), discarding lights is based on the center of an object and it's distance to the light source. That's why there's no half-lit object in your case. If it would have been better to base it on the bounds of an object depends on the case, I guess. There might be situations where one is better than the other or where even someting else would be good. So I went with the computational least expensive way of doing it, which is just checking the center.

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
Re: about Light Discard Distance
« Reply #2 on: November 06, 2018, 12:29:28 pm »
that makes sense , thanks.