Advertisement
Sigma88Mods

GN star

Jun 4th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. @Kopernicus:FOR[SigmaWantsTestStars]
  2. {
  3. Body
  4. {
  5. name = M7V
  6. Template
  7. {
  8. name = Sun
  9. }
  10. Orbit
  11. {
  12. referenceBody = Sun
  13. semiMajorAxis = 2e13
  14. meanAnomalyAtEpoch = 3
  15. }
  16. Properties
  17. {
  18. radius = 6.957e7
  19. @radius *= 0.12
  20. mass = 1.988435e28
  21. @mass *= 0.09
  22. SurfaceTemperatureK = 2900
  23. }
  24. !COLOR,* {}
  25. COLOR
  26. {
  27. Temperature = #$../Properties/SurfaceTemperatureK$
  28. RED = 0
  29. GREEN = 0
  30. BLUE = 0
  31. }
  32. @COLOR
  33. {
  34. // Set Temperature = Temperature \ 100
  35. @Temperature /= 100
  36. @Temperature = #$Temperature$.0
  37. @Temperature = #$Temperature[0,.]$
  38. }
  39. // Calculate Red:
  40. // If Temperature <= 66 Then
  41. @COLOR:HAS[~Temperature[>66]]
  42. {
  43. // Red = 255
  44. @RED = 1
  45. }
  46. // Else
  47. @COLOR:HAS[#Temperature[>66]]
  48. {
  49. // Red = Temperature - 60
  50. @RED = #$Temperature$
  51. @RED -= 60
  52. // Red = 329.698727446 * (Red ^ -0.1332047592)
  53. @RED != -0.1332047592
  54. @RED *= 329.698727446
  55. @RED /= 255
  56. }
  57. // If Red < 0 Then Red = 0
  58. @COLOR:HAS[#RED[<0]]
  59. {
  60. @RED = 0
  61. }
  62. // If Red > 255 Then Red = 255
  63. @COLOR:HAS[#RED[>1]]
  64. {
  65. @RED = 1
  66. }
  67. // Calculate Green:
  68. // If Temperature <= 66 Then
  69. @COLOR:HAS[~Temperature[>66]]
  70. {
  71. // Green = Temperature
  72. // Green = 99.4708025861 * Ln(Green) - 161.1195681661
  73. // APPROX TO Green = -0.0431*Temperature^2 + 6.9703*Temperature - 0.206
  74. // REWRITE AS Green = Temperature * (-0.0431*Temperature + 6.9703) - 0.206
  75. @GREEN = #$Temperature$
  76. @GREEN *= -0.0431
  77. @GREEN += 6.9703
  78. @GREEN *= #$Temperature$
  79. @GREEN -= 0.206
  80. @GREEN /= 255
  81. }
  82. // Else
  83. @COLOR:HAS[#Temperature[>66]]
  84. {
  85. // Green = Temperature - 60
  86. @GREEN = #$Temperature$
  87. @GREEN -= 60
  88. // Green = 288.1221695283 * (Green ^ -0.0755148492)
  89. @GREEN != -0.0755148492
  90. @GREEN *= 288.1221695283
  91. @GREEN /= 255
  92. }
  93. // If Green < 0 Then Green = 0
  94. @COLOR:HAS[#GREEN[<0]]
  95. {
  96. @GREEN = 0
  97. }
  98. // If Green > 255 Then Green = 255
  99. @COLOR:HAS[#GREEN[>1]]
  100. {
  101. @GREEN = 1
  102. }
  103. // Calculate Blue:
  104. // If Temperature >= 66 Then
  105. @COLOR:HAS[~Temperature[<66]]
  106. {
  107. // Blue = 255
  108. @BLUE = 1
  109. }
  110. // If Temperature <= 19 Then
  111. @COLOR:HAS[~Temperature[>19]]
  112. {
  113. // Blue = 0
  114. @BLUE = 0
  115. }
  116. @COLOR:HAS[#Temperature[<66],#Temperature[>19]]
  117. {
  118. // Blue = Temperature - 10
  119. @Temperature -=10
  120. // Blue = 138.5177312231 * Ln(Blue) - 305.0447927307
  121. // APPROX TO Blue = -0.0784*Temperature^2 + 10.274*Temperature - 73.434
  122. // REWRITE AS Blue = Temperature*(-0.0784*Temperature+10.274)-73.434
  123. @BLUE = #$Temperature$
  124. @BLUE *= -0.0784
  125. @BLUE += 10.274
  126. @BLUE *= #$Temperature$
  127. @BLUE -= 73.434
  128. @BLUE /= 255
  129. // RESTORE Temperature
  130. @Temperature += 10
  131. }
  132. // If Blue < 0 Then Blue = 0
  133. @COLOR:HAS[#BLUE[<0]]
  134. {
  135. @BLUE = 0
  136. }
  137. // If Blue > 255 Then Blue = 255
  138. @COLOR:HAS[#BLUE[>1]]
  139. {
  140. @BLUE = 1
  141. }
  142. // APPLY CHANGES
  143. %Orbit
  144. {
  145. %color = #$../COLOR/RED$,$../COLOR/GREEN$,$../COLOR/BLUE$
  146. }
  147. %ScaledVersion
  148. {
  149. %Material
  150. {
  151. %emitColor0 = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  152. %emitColor1 = #$emitColor0$
  153. @emitColor1[*] *= 0.9
  154. %rimColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  155. @rimColor[*] *= 1.7
  156. rimBlend = 0.8
  157. rimPower = 1
  158. %sunspotColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  159. @sunspotColor[*] *= 0.01
  160. }
  161. Light
  162. {
  163. %IVASunColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  164. %scaledSunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  165. %sunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  166. %sunAU = #$../../Properties/radius$
  167. %sunLensFlareColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  168. %lensFlareColorMult = #$../../Properties/SurfaceTemperatureK$
  169. !brightnessCurve {}
  170. brightnessCurve
  171. {
  172. key = 0.0000005 0 0 0
  173. key = 0.00001 0.007 0 0
  174. key = 0.0001 0.1 0 0
  175. key = 0.001 0.3 0 0
  176. key = 0.01 0.4 0 0
  177. key = 0.1 4 0 0
  178. key = 0.2 6 0 0
  179. key = 0.3 10 0 0
  180. }
  181. }
  182. @Light:HAS[#lensFlareColorMult[<3717]]
  183. {
  184. @lensFlareColorMult = 0
  185. }
  186. @Light:HAS[#lensFlareColorMult[>3717],#lensFlareColorMult[<5772]]
  187. {
  188. @lensFlareColorMult *= 0.000243072435585805
  189. @lensFlareColorMult -= 0.403014098201264
  190. }
  191. @Light:HAS[#lensFlareColorMult[>5771]]
  192. {
  193. @lensFlareColorMult = 1
  194. }
  195. @Light
  196. {
  197. @sunLensFlareColor[*] = #$lensFlareColorMult$
  198. }
  199. %Coronas
  200. {
  201. %Corona
  202. {
  203. %Material
  204. {
  205. texture = Flares/NoCorona
  206. }
  207. }
  208. %Corona
  209. {
  210. %Material
  211. {
  212. texture = Flares/NoCorona
  213. }
  214. }
  215. }
  216. }
  217. }
  218. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement