Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Kopernicus:FOR[KaedithStar]
- {
- Body
- {
- name = Kaedith's Star A
- Template
- {
- name = Sun
- }
- Properties
- {
- radius = 3.09884e6
- mass = 1.24121e27
- description = Kaedith's Star is one of the closest stars to the Kerbin solar system. A very small, cool red dwarf star. Its discovery about a century ago is a story of drama and science, which is why two of the most popular movies of the last decade featured the star. One a science fiction flick, the other a drama-documentary.
- }
- Orbit
- {
- referenceBody = Sun
- semiMajorAxis = 5.506e12
- }
- !COLOR,* {}
- COLOR
- {
- Temperature = 2514
- RED = 0
- GREEN = 0
- BLUE = 0
- }
- @COLOR
- {
- // Set Temperature = Temperature \ 100
- @Temperature /= 100
- @Temperature = #$Temperature$.0
- @Temperature = #$Temperature[0,.]$
- }
- // Calculate Red:
- // If Temperature <= 66 Then
- @COLOR:HAS[~Temperature[>66]]
- {
- // Red = 255
- @RED = 1
- }
- // Else
- @COLOR:HAS[#Temperature[>66]]
- {
- // Red = Temperature - 60
- @RED = #$Temperature$
- @RED -= 60
- // Red = 329.698727446 * (Red ^ -0.1332047592)
- @RED != -0.1332047592
- @RED *= 329.698727446
- @RED /= 255
- }
- // If Red < 0 Then Red = 0
- @COLOR:HAS[#RED[<0]]
- {
- @RED = 0
- }
- // If Red > 255 Then Red = 255
- @COLOR:HAS[#RED[>1]]
- {
- @RED = 1
- }
- // Calculate Green:
- // If Temperature <= 66 Then
- @COLOR:HAS[~Temperature[>66]]
- {
- // Green = Temperature
- // Green = 99.4708025861 * Ln(Green) - 161.1195681661
- // APPROX TO Green = -0.0431*Temperature^2 + 6.9703*Temperature - 0.206
- // REWRITE AS Green = Temperature * (-0.0431*Temperature + 6.9703) - 0.206
- @GREEN = #$Temperature$
- @GREEN *= -0.0431
- @GREEN += 6.9703
- @GREEN *= #$Temperature$
- @GREEN -= 0.206
- @GREEN /= 255
- }
- // Else
- @COLOR:HAS[#Temperature[>66]]
- {
- // Green = Temperature - 60
- @GREEN = #$Temperature$
- @GREEN -= 60
- // Green = 288.1221695283 * (Green ^ -0.0755148492)
- @GREEN != -0.0755148492
- @GREEN *= 288.1221695283
- @GREEN /= 255
- }
- // If Green < 0 Then Green = 0
- @COLOR:HAS[#GREEN[<0]]
- {
- @GREEN = 0
- }
- // If Green > 255 Then Green = 255
- @COLOR:HAS[#GREEN[>1]]
- {
- @GREEN = 1
- }
- // Calculate Blue:
- // If Temperature >= 66 Then
- @COLOR:HAS[~Temperature[<66]]
- {
- // Blue = 255
- @BLUE = 1
- }
- // If Temperature <= 19 Then
- @COLOR:HAS[~Temperature[>19]]
- {
- // Blue = 0
- @BLUE = 0
- }
- @COLOR:HAS[#Temperature[<66],#Temperature[>19]]
- {
- // Blue = Temperature - 10
- @Temperature -=10
- // Blue = 138.5177312231 * Ln(Blue) - 305.0447927307
- // APPROX TO Blue = -0.0784*Temperature^2 + 10.274*Temperature - 73.434
- // REWRITE AS Blue = Temperature*(-0.0784*Temperature+10.274)-73.434
- @BLUE = #$Temperature$
- @BLUE *= -0.0784
- @BLUE += 10.274
- @BLUE *= #$Temperature$
- @BLUE -= 73.434
- @BLUE /= 255
- // RESTORE Temperature
- @Temperature += 10
- }
- // If Blue < 0 Then Blue = 0
- @COLOR:HAS[#BLUE[<0]]
- {
- @BLUE = 0
- }
- // If Blue > 255 Then Blue = 255
- @COLOR:HAS[#BLUE[>1]]
- {
- @BLUE = 1
- }
- // APPLY CHANGES
- %Orbit
- {
- %color = #$../COLOR/RED$,$../COLOR/GREEN$,$../COLOR/BLUE$
- }
- %ScaledVersion
- {
- %Material
- {
- %emitColor0 = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- %emitColor1 = #$emitColor0$
- @emitColor1[*] *= 0.6
- %rimColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- @rimColor[*] *= 1.7
- rimBlend = 0.8
- rimPower = 1.2
- sunspotPower = 2
- %sunspotColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- @sunspotColor[*] *= 0.01
- sunspotTex = Kaedith'sStar/PluginData/AsunspotTex.png
- }
- Light
- {
- %IVASunColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- %scaledSunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- %sunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- %sunAU = #$../../Properties/radius$
- %sunLensFlareColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
- scaledSunlightIntensity = 1.57
- sunlightIntensity = 1
- !brightnessCurve {}
- brightnessCurve
- {
- key = 0.0000005 0 0 0
- key = 0.00001 0.007 0 0
- key = 0.0001 0.1 0 0
- key = 0.001 0.3 0 0
- key = 0.01 0.4 0 0
- key = 0.1 4 0 0
- key = 0.2 6 0 0
- key = 0.3 10 0 0
- }
- IntensityCurve
- {
- key = 566660.010666667 1.8 -1.58825394956168E-06 -1.58825394956168E-06
- key = 1133320.02133333 1.27279220613579 -5.61532568990691E-07 -5.61532568990691E-07
- key = 2266640.04266667 0.9 -1.9853174369521E-07 -1.9853174369521E-07
- key = 3399960.064 0.734846922834954 -1.08066993288506E-07 -1.08066993288506E-07
- key = 6799920.128 0.519615242270663 -3.82074518883717E-08 -3.82074518883717E-08
- key = 20399760.384 0.3 -7.35302754426705E-09 -7.35302754426705E-09
- key = 40799520.768 0.212132034355964 -2.59968781940134E-09 -2.59968781940134E-09
- key = 350000000 0 -1.03466968703035E-10 0
- }
- ScaledIntensityCurve
- {
- key = 566660.010666667 1.8 -1.58825394956168E-06 -1.58825394956168E-06
- key = 1133320.02133333 1.27279220613579 -5.61532568990691E-07 -5.61532568990691E-07
- key = 2266640.04266667 0.9 -1.9853174369521E-07 -1.9853174369521E-07
- key = 3399960.064 0.734846922834954 -1.08066993288506E-07 -1.08066993288506E-07
- key = 6799920.128 0.519615242270663 -3.82074518883717E-08 -3.82074518883717E-08
- key = 20399760.384 0.3 -7.35302754426705E-09 -7.35302754426705E-09
- key = 40799520.768 0.212132034355964 -2.59968781940134E-09 -2.59968781940134E-09
- key = 350000000 0 -1.03466968703035E-10 0
- }
- IVAIntensityCurve
- {
- key = 566660.010666667 1.8 -1.58825394956168E-06 -1.58825394956168E-06
- key = 1133320.02133333 1.27279220613579 -5.61532568990691E-07 -5.61532568990691E-07
- key = 2266640.04266667 0.9 -1.9853174369521E-07 -1.9853174369521E-07
- key = 3399960.064 0.734846922834954 -1.08066993288506E-07 -1.08066993288506E-07
- key = 6799920.128 0.519615242270663 -3.82074518883717E-08 -3.82074518883717E-08
- key = 20399760.384 0.3 -7.35302754426705E-09 -7.35302754426705E-09
- key = 40799520.768 0.212132034355964 -2.59968781940134E-09 -2.59968781940134E-09
- key = 350000000 0 -1.03466968703035E-10 0
- }
- @IntensityCurve
- {
- @key,*[*, ] *= #$../sunlightIntensity$
- @key,*[0, ] /= #$../sunlightIntensity$
- }
- @ScaledIntensityCurve
- {
- @key,*[*, ] *= #$../sunlightIntensity$
- @key,*[0, ] /= #$../sunlightIntensity$
- }
- @IVAIntensityCurve
- {
- @key,*[*, ] *= #$../sunlightIntensity$
- @key,*[0, ] /= #$../sunlightIntensity$
- }
- }
- %Coronas
- {
- %Corona
- {
- %Material
- {
- texture = Kaedith'sStar/Corona/OrangeCorona
- }
- }
- %Corona
- {
- %Material
- {
- texture = Kaedith'sStar/Corona/OrangeCorona
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement