1
\$\begingroup\$

I'm studying the color and the Luminosity of Stars. I'm trying to figure how to transform information of Luminosity i perceive at a given distance to something usable into a shader. For instance , Given the Radius and temperature of a star, with inversed square law on Distance(meters) i obtain the perceived luminosity of a star in Watt (brut force, without any scattering). For sample, the luminosity I obtain for the Sun ON Earth is about 1361W and a RGB color about

w=1361    
r=255 g=245 b=242

Astronomical and physics are quite OK, but how to transform this values into usable shader formulas or values? best practices ? samples ?

I guess i will simply take the aboves value as Light reference an normalize the intensity(1361) to be 1 on each rgb componemt value. I' ll keep you posted.

\$\endgroup\$
1
  • \$\begingroup\$ vterrain.org/Atmosphere contains some interesting related links and info under section "stars". \$\endgroup\$
    – Exilyth
    Commented Aug 31, 2016 at 14:42

1 Answer 1

1
\$\begingroup\$

One formula that you can play around with is the inverse square law for light fall-off at a given distance. In a virtualisation the inverse square law can often give a light that just seems a bit too bright and keen.

A brighter way to work out the fall-off in light intensity is this watering down of the formula:

NewIntensity = Original Intensity
               ------------------------------
               K1 + K2Distance + K2Distance^2

where K1, K2, and K3 are constants we can attune to give the best results. This tends to give a better looking model.

\$\endgroup\$
1
  • \$\begingroup\$ Many thank to taking the time to answer. I'm pretty aware of the distance backoff formula, then i beleive i was unclear explaining my question. Regarding the sun light, the distance backoff is already done, and moving arround the planet, regarding the 8 light min distance from the sun will not change the numbers. My question was more about what i'm doing with this 1361 absolute value.. do i need to consider it at the norm 1 value or is their any other technique such gamma correction or other to deal with huge value ( I,m NOT using HDR and then have to stay on 0-1 range for intensity).. \$\endgroup\$ Commented Aug 27, 2016 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .