GregroxMun

ICC_StarConfigBase_WIP

Feb 27th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.19 KB | None | 0 0
  1. @Kopernicus:FOR[InterstellarConsortiumCatalogue]
  2. {
  3. //Interstellar Consortium Catalogue Star Config Base by GregroxMun.
  4. //If you use this, PLEASE make sure you read the whole config and its comments.
  5. Body
  6. {
  7. name = ICC_SunAnalogue
  8.  
  9. //Unique Body Identifier:
  10. identifier = ICC/SunAnalogue
  11.  
  12. Template
  13. {
  14. name = Sun //make this object a star.
  15. }
  16. Properties
  17. {
  18. // default constants.
  19. radius = 69550000 // 1/10th of RSS Sun. 1 KSP-Scale Real Sun Radius.
  20. mass = 1.9891e28 // 1/100th of RSS Sun. 1 KSP-scale Real Sun Mass.
  21.  
  22. // user inputs.
  23. luminosity = 1 // 1/100th of RSS Sun. Normalized to KSP-scale Real Sun.
  24. @radius *= 1 // 1/10th of RSS Sun. Normalized to KSP-scale Real Sun.
  25. @mass *= 1 // 1/100th of RSS Sun. Normalized to KSP-scale Real Sun.
  26. temperature = 5800 // Equal to RSS Sun. Used to find color.
  27.  
  28. //"luminosity" and "temperature" values in the Properties{} node are NOT used by Kopernicus. This is strictly for keeping track of things.
  29.  
  30. // Luminosity, Radius, and Temperature MUST be related by the equation:
  31. // L = R^2 * T^4.
  32. // Where L = Your Star's Luminosity in Solar Luminosities. ---- ---- (to be clear, that's 1/100th the real scale value)
  33. // Where R = [Your Star's Radius] / 69550000 meters.
  34. // Where T = [Your Star's Temperature] / 5800 Kelvins.
  35. }
  36. Orbit
  37. {
  38. referenceBody = Squad/Sun
  39.  
  40. //Make sure the star is always referencing the stock solar system.
  41. //Orbital elements are computed by the IC spreadsheet found at the KSP Forums thread: https://forum.kerbalspaceprogram.com/index.php?/topic/177439-kopernicus-interstellar-consortium/
  42. //For this example I'll use the elements for the star Alternis. Make sure you've reserved a star with the Interstellar Consortium
  43. // and that you use your own star's orbital elements.
  44. semiMajorAxis = 4.71E+13
  45. eccentricity = 0 //Always 0.
  46. inclination = 16.01993527
  47. argumentOfPeriapsis = 90 //Always 90.
  48. longitudeOfAscendingNode = 120.5297059
  49. meanAnomalyAtEpoch = 0 //Always 0. IMPORTANT NOTE: MAYBE NOT, UNSURE OF THIS ONE.
  50. period = 1E+12 //Period should be arbitrarily high, there should be effectively no stellar motion. This is measured in seconds and is around 30,000 years.
  51. }
  52.  
  53. //Fill in the relevant information from the spreadsheet here as well for I.C. plugin compatibility.
  54. //Make sure you take it from the "Star Position (Config Files)" table.
  55. @InterstellarConsortium
  56. {
  57. @position = 7.7, 3.9, 1.3
  58. @SOI = 0.8
  59. }
  60.  
  61. ScaledVersion
  62. {
  63. Light
  64. {
  65. //This defines the light emitted by the star.
  66.  
  67. //User Inputs
  68.  
  69. ambientLightColor = 0,0,0,0
  70. sunAU = 69550000 //SET THIS EQUAL TO THE STAR'S RADIUS.
  71. sunFlare = //Sun Flare Filepath.
  72. //For stars, sun flare textures should omit the camera ghost particles. I've included a stockalike sun flare with no ghosts.
  73.  
  74. //OK here is where things get confusing so pay close attention.
  75. //The above values are all misnomers.
  76. //They should be called Insolation and Luminosity, respectively.
  77. //The "luminosity" value here is equal to the watts per square meter recieved from the star at 13,599,840,256 meters, or 1 Kerbin Orbit Radius.
  78. //1 Kerbin Orbit Radius is NOT 1/10th of 1 astronomical unit, in fact it is equal to 0.090909317 au, which is close to 1/11th.
  79. //The value "radiationFactor" can be found by multiplying your star's luminosity value by 1.21.
  80. //The value "luminosity" can be found by taking the square root of your star's luminosity, then multiplying by 1.1, then multiplying by 1360.
  81. //The value "insolation" is the same as "luminosity" but you multiply by 0.15 instead of 1360.
  82.  
  83. luminosity = 1496
  84. insolation = 0.165
  85. radiationFactor = 1.21
  86.  
  87. //This is the point where you realize how much of a mess "Kerbol" is.
  88.  
  89. //Color of sunlight. These should all be the same.
  90. //Use the calculator here: https://academo.org/demos/colour-temperature-relationship/
  91. //to figure out what color your star's light should be based upon the temperature you set up in the Properties node.
  92. //6600 K is true white, but anything between 5700 and 6800 K can safely be interpreted as true white.
  93. //Using the RGBA(R,G,B,A) scheme is probably the easiest way to input color here.
  94. //Make sure you don't forget to put in a value (255 is fine) as the A/alpha value. It doesn't matter what value is used for Alpha, but if you forget it, Kopernicus won't parse the color correctly.
  95.  
  96. sunlightColor = RGBA(255,255,255,255)
  97. scaledSunlightColor = RGBA(255,255,255,255)
  98. IVASunColor = RGBA(255,255,255,255)
  99. sunLensFlareColor = RGBA(255,255,255,255)
  100.  
  101.  
  102. //Intensity Curves. These are also fairly complicated.
  103. //Intensity curve keys take the form of
  104. //key = distance in meters, sunlight intensity at that distance, 1st derivative, 2nd derivative.
  105. //Unless you are using a float curve editor or you have a good understanding of differential calculus (seriously), use 0 for the derivatives.
  106. //To make these curves, we need to know what the "habitable zone" of the star is.
  107. //Specifically, the distance at which Earth would have the same temperature as it does around the Sun.
  108. //This is found by Luminosity^0.5. To be clear, that's the actual luminosity you recorded in the Properties{} node, not the "luminosity" value from above in the Light{} node.
  109. //That distance will be in units of 1/10th of one astronomical unit, so multiply by 14959787070.0 to get the actual distance. We will call this value the "Local A.U. or LAU."
  110. //You will have to define three curves: IntensityCurve, IVAIntensityCurve, and ScaledIntensityCurve. The first two are identical to each other,
  111. //but the last one has its distance values divided by 6000.
  112. //The intensity curve we use can be defined a number of ways, but importantly, intensity must drop to zero before the end of the star's SOI according to Interstellar Consortium.
  113. //Physically speaking, the intensity of light should drop by the square of the distance. In reality, our eyes have a logarithmic vision, so to account for this,
  114. //we'll use the equation Intensity = Distance^-0.5.
  115. //In this config I'll define the intensity at a few points, but in your star system you should define the distances at orders of magnitude (0.01, 0.1, 1, 10, 100, 1000) and at the semimajoraxes of each of your planets. (Or periapsis AND apoapsis for eccentric bodies)
  116. //You can use a different intensity curve, for instance if you wanted to have the same lighting for all planets, as long as it fades to zero before the edge of its SOI.
  117. IntensityCurve
  118. {
  119. //we define this to be where intensity = 1. 1 LAU.
  120. //key = 14959787070 1 0 0
  121.  
  122. //0.1 LAU.
  123. key = 1495978707 3.16227766 0 0
  124.  
  125. //0.5 LAU.
  126. key = 747989354 1.41421356 0 0
  127.  
  128. //1 LAU.
  129. key = 14959787070 1 0 0
  130.  
  131. //5 LAU.
  132. key = 74798935350 0.447213595 0 0
  133.  
  134. //10 LAU.
  135. key = 14959787070 0.316227766 0 0
  136.  
  137. //100 LAU.
  138. key = 149597870700 0.1 0 0
  139.  
  140. //1000 LAU.
  141. key = 1495978707000 0.0316227766 0 0
  142.  
  143. //0.8 ki -- the edge of the SOI.
  144. //1 ki = 1E+13 meters.
  145. key = 8E+12 0.0 0 0
  146.  
  147. //Very luminous stars might shine much further than the edge of their gravitational sphere of influence. But they should not shine too much further, and then only very dimly.
  148. //Likewise, dim red dwarf stars may fade to effectively zero long before you reach the edge of their SOI.
  149. }
  150. //duplicate the IntensityCurve and rename it to IVAIntensityCurve
  151. IVAIntensityCurve
  152. {
  153. key = 1495978707 3.16227766 0 0
  154. key = 747989354 1.41421356 0 0
  155. key = 14959787070 1 0 0
  156. key = 74798935350 0.447213595 0 0
  157. key = 14959787070 0.316227766 0 0
  158. key = 149597870700 0.1 0 0
  159. key = 1495978707000 0.0316227766 0 0
  160. key = 8E+12 0.0 0 0
  161. }
  162. //duplicate this again for the ScaledIntensityCurve, but this time divide all of the distance values by 6000.
  163. ScaledIntensityCurve
  164. {
  165. key = 249329.784 3.16227766 0 0
  166. key = 124664.892 1.41421356 0 0
  167. key = 2493297.84 1 0 0
  168. key = 12466489.2 0.447213595 0 0
  169. key = 2493297.84 0.316227766 0 0
  170. key = 24932978.4 0.1 0 0
  171. key = 249329784 0.0316227766 0 0
  172. key = 1.33333333e9 0.0 0 0
  173. }
  174.  
  175. //Don't change this unless you know what you're doing.
  176. //This is the brightness curve for the sun lens flare.
  177. //The first number is some kind of inverse distance. The second number is size of the flare. Then of course, two derivatives.
  178. //The minimum size will represent the size of the stars in the stock skybox.
  179. brightnessCurve
  180. {
  181. key = 0.000005 0.01 0 0
  182. key = 0.00001 0.1 0 0
  183. key = 0.0001 0.1 0 0
  184. key = 0.001 0.3 0 0
  185. key = 0.01 0.4 0 0
  186. key = 0.1 4 0 0
  187. key = 0.2 6 0 0
  188. key = 0.3 10 0 0
  189. }
  190.  
  191. }
  192. Material
  193. {
  194. //This defines the appearance of the surface of the star.
  195.  
  196. //These colors should be the same as the temperature-based colors of the starlight.
  197. //If you used true white earlier but your star is really slightly cooler or hotter than that, you should use the true temperature colors here.
  198. emitColor0 = RGBA(255,243,231,255)
  199. //This color should be about 10 percent darker (but the same temperature) as emitColor0.
  200. emitColor1 = RGBA(230,218,208,255)
  201. //This color should be about 10 percent brighter (but the same temperature) as emitColor0, up to values of 255.
  202. rimColor = RGBA(255,255,254,255)
  203.  
  204. //These are fine as they are, you shouldn't need to change them.
  205. rimBlend = 0.5
  206. rimPower = 1
  207.  
  208. //sunspotColor should be a new temperature-color equal to about 0.65 times the temperature of
  209. sunspotColor = RGBA(255,201,157,255)
  210.  
  211. //This are fine as it is, you shouldn't need to change it.
  212. sunspotPower = 1
  213.  
  214. // sunspotTex = filepath
  215. //sunspotTex can be used to customize the sunspot map. It is a grayscale texture where white represents darker regions and black represents lighter regions.
  216. //for most purposes the stock sunspot texture is fine, but red dwarfs can look good with larger sunspots, and brown dwarf sunspot textures might resemble gas giant bands.
  217. //I've commented out the sunspotTex line so that the stock sunspot will load.
  218. }
  219. Coronas
  220. {
  221. //This defines the texture of the corona rim texture of the star.
  222. //You can use your own texture if you want, but I've prepared a few sunspot textures for specific star spectral types.
  223. //The stock corona can also be used for M to early-K red and orange dwarf stars.
  224. Corona
  225. {
  226. Material
  227. {
  228. texture = //Corona Texture Filepath
  229. }
  230. }
  231. // Duplicate the above Corona node, you need two of them and they should be identical.
  232.  
  233. Corona
  234. {
  235. Material
  236. {
  237. texture = //Corona Texture Filepath
  238. }
  239. }
  240. }
  241. }
  242. }
  243. }
Advertisement
Add Comment
Please, Sign In to add comment