Light Decay Exponent

Use this forum for discussions specifically related to the Krakatoa SR C++ API.
For discussion of topics applicable to both the C++ and Py APIs, please use the parent forum.
jamesvecore
Posts: 18
Joined: Fri Mar 23, 2012 12:36 pm

Light Decay Exponent

Postby jamesvecore » Thu Jan 23, 2014 3:24 pm

I'm having an issue with lights not working when the decay exponent is anything other than 0. I assume a value of 1 is linear decay and value of 2 is standard decay? Is this not the case? I've tried both positive and negative values with no luck. I've been testing this in my softimage plugin and can't seem to get anything when the decay is non-zero. Am I missing something here?

Thanks,

-James

User avatar
Bobo
Posts: 6128
Joined: Tue Nov 15, 2005 10:26 am
Location: Vancouver, Canada
Contact:

Re: Light Decay Exponent

Postby Bobo » Thu Jan 23, 2014 4:03 pm

jamesvecore wrote:I'm having an issue with lights not working when the decay exponent is anything other than 0. I assume a value of 1 is linear decay and value of 2 is standard decay? Is this not the case? I've tried both positive and negative values with no luck. I've been testing this in my softimage plugin and can't seem to get anything when the decay is non-zero. Am I missing something here?

Thanks,

-James


You are right, a decay of 0 means no decay, 1 means linear falloff, 2 is quadratic (physical), 3 would be cubic and so on.
From what I know from our Maya and C4D implementations, the key to getting lighting when using falloff is to increase the Flux. Otherwise a light that has standard settings and looks good in no decay mode will become too dark when you enable the falloff.

The idea (as far as I remember the explanation by the original developer of Krakatoa) was that at a distance of 1 unit, you always have the same illumination regardless of the decay mode. So let's say the units are meters and at one meter you have a certain amount of light. When you change the decay exponent, you should still get the same illumination at that unit distance (because 1/(distance^E) is 1 at distance of 1.0 regardless of E), but it also means that the light becomes "hotter" as you measure closer to the source, and a lot darker when you move away (at 2 units it would be 1/4th, and 3 units 1/9th etc. with E=2)

So you might need to boost your Flux value A LOT if you expect to see illumination at any significant distance, esp. since most 3D apps default to 1 unit assumed to be 1 cm. So at 1 meter (100 cm) there would be barely any light left (only 1/10000 of the original intensity).

Note that this light behavior does not conform to the light implementation of 3ds Max where Krakatoa was originally developed, so there has always been a bit of a learning curve figuring out the lighting...

Hope this helps.
Borislav "Bobo" Petrov
Product Specialist
Thinkbox Software Inc.

jamesvecore
Posts: 18
Joined: Fri Mar 23, 2012 12:36 pm

Re: Light Decay Exponent

Postby jamesvecore » Thu Jan 23, 2014 4:37 pm

Thank you for the explanation. Turns out it was just a bug accidentally setting the far_attenuation end value to 0.0 which was killing all the light.

Thanks again!

-James


Return to “Krakatoa SR C++ API”

Who is online

Users browsing this forum: No registered users and 2 guests