View Full Version : math pro's anyone? arealight int. with scaling factor
Sorath 10-15-2009, 03:51 PM hey math pro's
currently struggeling around with an simple problem in maya.
i'm using one area light with scaling of 1 and intensity of 1.
since i want to plug it's scaling factor in it's intensity to maintain intensity values and therefore beeing able to just adjust shadow softness with it's scaling factor.
i have a little problem with.
scaling = intensity (by eye measuring).
1 = 1
0.5 = 3.9
0.1 = 100
2 = 0.25
what is the math behind it? how can i make a driven key or shading network to maintain intensity with scaling.
sidenotes:
when i scale the arealight down to 0.5 i need to raise intensity because the amount of light emitted is less than with scaling 1 - and so on and so forth.
thanks for clearing things up.
greets
Bastian
|
|
Sorath
10-15-2009, 04:01 PM
does my post make any sense..
cause with no decay in arealights it's still a decay in it's depth..
but wouldn't it be cool to have same intensities with different scalings?
drag your light in hypershade, create a multiply node, or a few.. using connection editor connect the outscale of one the axises, like x.. to input of multiply and that is your controller.
what i would do is on your light add new attributes of whatever u want to modify. call it shadow size, intensity of light, color..whatever and make them floats unless it's color. put default value as the default value that u want your light to start with.
now in hypershade u got a multiply or several, their first input is the scale of the light X the other input on each mulitplier will be the new attributes u added. like shadow size
then the output of the multiply connect it to the light's shadow, intensity and etc.
if u dont want the values to be directly multiplied by scale(say scale is from 1-2000) and u only need multiply of 0.1-2..then u can use setrange to compress the ranges of the outputs for each attribute u want it can have a different range, like intensity can be 0.0-3.0, shadow intensity 0.0-1.0 and so on.
YourDaftPunk
10-15-2009, 05:52 PM
i'm using one area light with scaling of 1 and intensity of 1.
since i want to plug it's scaling factor in it's intensity to maintain intensity values and therefore beeing able to just adjust shadow softness with it's scaling factor.
i have a little problem with.
scaling = intensity (by eye measuring).
1 = 1
0.5 = 3.9
0.1 = 100
2 = 0.25
what is the math behind it? how can i make a driven key or shading network to maintain intensity with scaling.
Area means squared.
Lets say Base Scale = 1 and Base Intensity = 1 like in your example.
Therefore, we have:
New Intensity = ( Old Scale^2 / New Scale^2 ) * Old Intensity
So if we scale to 0.1 we have in simplified form:
100 = 1 / (0.1*0.1)
or 0.5:
4 = 1 / (0.5*0.5)
and yes we can try scale of 2:
0.25 = 1 / (2*2)
Finally, a more complex example. Start scale is 12 and start intensity is 350. You could scale your light to 30 and find the new intensity like so:
56 = (12^2 / 30^2) * 350
-shawn
Starrider
10-15-2009, 05:55 PM
Basically it's just
intensity = 1.0 / (scale ^ 2)
intensity = 1.0 / pow(scale, 2);
edit: oh sorry, same time send out fail :)
CGTalk Moderation
10-15-2009, 05:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.