Advertisement
GregroxMun

Laythe.cfg and Laythe region of PlanetShifter.cs

Nov 8th, 2015
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.99 KB | None | 0 0
  1. @Body[Laythe]
  2. {
  3. @Atmosphere
  4. {
  5. // effectively the ambient lighting color for all objects on the ground of this body (provides a slight tint)
  6. ambientColor = 0.075,0.08,0.095,1
  7.  
  8. // sets the waveLength property in the AtmosphereFromGround component of the scaled version
  9. // From my picking around in the KSP assemblies, it seems this is fed to the shader in this way:
  10. //
  11. // shader.invWaveLength = Color( 1 / r^4, 1 / g^4, 1 / b^4, 0.5);
  12. //
  13. // Obviously the code for the shader is not available, and I don't feel like picking through ARB shader IL so we'll need
  14. // to figure this out experiementally.
  15. lightColor = 0.762094, 0.7163926, 0.6708019506, 0.5
  16.  
  17. //AtmosphereFromGround
  18. //{
  19. //outerRadiusMult = 1.032
  20. //innerRadiusMult = 0.958
  21. //}
  22. }
  23. @Orbit
  24. {
  25. color = RGBA(38.25, 63.75, 12.75, 255)
  26. }
  27. @Properties
  28. {
  29. //tidallyLocked = true
  30.  
  31. biomeMap = AlternisKerbol/Laythe/PluginData/LaytheBiomes.png
  32.  
  33. Biomes
  34. {
  35. Biome
  36. {
  37. name = Ocean
  38. value = 1.0
  39. color = 0,0,0,1
  40. }
  41. Biome
  42. {
  43. name = Land
  44. value = 1.4
  45. color = 1,1,1,1
  46. }
  47. }
  48. @ScienceValues
  49. {
  50. landedDataValue = 3
  51. splashedDataValue = 3
  52. flyingLowDataValue = 2.5
  53. flyingHighDataValue = 2
  54. inSpaceLowDataValue = 1.5
  55. inSpaceHighDataValue = 1
  56. recoveryValue = 3
  57. }
  58. description = Long known as Kerbin's sister moon, Laythe was seeded with life hundreds of millions of years ago when a large asteroid struck Kerbin - catapulting boulders with various life forms into orbit around Jool. Given its proximity to Kerbin, some of this impact debris found its way to Laythe, depositing a precious cargo of microbes and, according to some theories, whole plant seeds. This life quickly spread across the moon, until it became the lush green world we know today.(There are, however, fringe theorists who believe that life started on Laythe and was brought to Kerbin, but that's just absurd)
  59. }
  60. @ScaledVersion
  61. {
  62. Material
  63. {
  64. normals = AlternisKerbol/Laythe/Textures/Laythe_Normal
  65. texture = AlternisKerbol/Laythe/Textures/Laythe_Color
  66.  
  67. Gradient
  68. {
  69. 0.0 = 0.72549,0.81961,0.83529,1
  70. 0.6 = 0.0549,0.0784,0.141,1
  71. 1.0 = 0.0196,0.0196,0.0196,1
  72. }
  73. }
  74. }
  75. @Template
  76. {
  77. removeOcean = true
  78. }
  79. Ocean
  80. {
  81. maxQuadLengthsPerFrame = 0.03
  82. minLevel = 2
  83. maxLevel = 12
  84. minDetailDistance = 8
  85. oceanColor = #1E2028
  86.  
  87. Material
  88. {
  89. colorFromSpace = #1E2028
  90. color = 0.117,0.125,0.156,1.000
  91. shininess = 0.08
  92. }
  93.  
  94. FallbackMaterial
  95. {
  96. colorFromSpace = #1E2028
  97. color = 0.117,0.125,0.156,1.000
  98. }
  99.  
  100. Mods
  101. {
  102. AerialPerspectiveMaterial
  103. {
  104. globalDensity = -0.00001
  105. heightFalloff = 6.75
  106. atmosphereDepth = 150000
  107. DEBUG_SetEveryFrame = true
  108. cameraAlt = 0
  109. cameraAtmosAlt = 0
  110. heightDensAtViewer = 0
  111. enabled = true
  112. order = 100
  113. }
  114.  
  115. OceanFX
  116. {
  117.  
  118. framesPerSecond = 1
  119. spaceAltitude = 150000
  120. blendA = 0
  121. blendB = 0
  122. texBlend = 0
  123. angle = 0
  124. specColor = 0.117,0.125,0.156,1.000
  125. oceanOpacity = 0
  126. spaceSurfaceBlend = 0
  127. enabled = true
  128. order = 100
  129. }
  130. }
  131. }
  132. @PQS
  133. {
  134. materialType = AtmosphericMain
  135. Material
  136. {
  137. saturation = 1
  138. contrast = 4
  139. tintColor = 0.173,0.173,0.173,0.852
  140.  
  141. powerNear = 0.75
  142. powerFar = 0.75
  143.  
  144. groundTexStart = 0
  145. groundTexEnd = 10000
  146.  
  147. steepPower = 4
  148. steepTexStart = 10000
  149. steepTexEnd = 100000
  150. steepTex = BUILTIN/terrain_rock00
  151. steepBumpMap = BUILTIN/Cliff (Layered Rock)_NRM
  152. steepNearTiling = 1000
  153. steepTiling = 100
  154.  
  155. lowTex = BUILTIN/terrain_sand00
  156. lowBumpMap = BUILTIN/Waterbump
  157. lowNearTiling = 4000
  158. lowMultiFactor = 10
  159. lowBumpNearTiling = 4000
  160. lowBumpFarTiling = 10
  161.  
  162. midTex = BUILTIN/terrain_grass00_new
  163. midBumpMap = BUILTIN/cloud_normal
  164. midNearTiling = 4000
  165. midMultiFactor = 100
  166. midBumpNearTiling = 1000
  167. midBumpFarTiling = 100
  168.  
  169. highTex = BUILTIN/terrain_snow00
  170. highBumpMap = BUILTIN/05_NORMAL
  171. highNearTiling = 4000
  172. highMultiFactor = 4
  173. highBumpNearTiling = 2000
  174. highBumpFarTiling = 4
  175.  
  176. lowStart = 0.02
  177. lowEnd = 0.1
  178. highStart = 0.5
  179. highEnd = 1
  180.  
  181. globalDensity = -8E-06
  182. fogColorRamp = BUILTIN/AerialRampKerbin
  183. }
  184.  
  185. Mods
  186. {
  187. VertexColorMap
  188. {
  189. map = AlternisKerbol/Laythe/Textures/newlaythe_dif.png
  190. enabled = true
  191. order = 200
  192. }
  193. VertexHeightMap
  194. {
  195. map = AlternisKerbol/Laythe/PluginData/laythe_newheight.png
  196. offset = -400
  197. deformity = 7000
  198. enabled = true
  199. }
  200. VertexHeightNoise
  201. {
  202. deformity = 250
  203. frequency = 8
  204. enabled = true
  205. }
  206. }
  207. LandControl
  208. {
  209. landClasses
  210. {
  211. Class
  212. {
  213. name = Mud
  214. color = 0.35, 0.25, 0.2, 1
  215. noiseColor = 0.26, 0.27, 0.15, 1
  216. noiseBlend = 0.8
  217. noiseFrequency = 20
  218. }
  219. Class
  220. {
  221. name = BaseLand
  222. color = 0.16, 0.185, 0.15, 1
  223. noiseColor = 0.14, 0.15, 0.02, 1
  224. noiseBlend = 0.2
  225. }
  226. Class
  227. {
  228. name = IceCaps
  229. latitudeRange
  230. {
  231. startStart = -10
  232. startEnd = -10
  233. endStart = 0.09
  234. endEnd = 0.1
  235. }
  236. }
  237. enabled = true
  238. }
  239. }
  240.  
  241. }
  242. }
  243. }
  244. ---------------------------------------------------------------------------------------------------------------------------------
  245. #region laythe
  246.  
  247. //Laythe is just as important in the grand scheme of things as kerbin!
  248. //Let's remake it completely, it deserves better.
  249. cb_laythe.pqsController.surfaceMaterial = new Material(cb_kerbin.pqsController.surfaceMaterial);
  250. cb_laythe.pqsController.maxLevel = cb_kerbin.pqsController.maxLevel;
  251. cb_laythe.pqsController.minLevel = cb_kerbin.pqsController.minLevel;
  252. cb_laythe.pqsController.minDetailDistance = cb_kerbin.pqsController.minDetailDistance;
  253. cb_laythe.pqsController.maxDetailDistance = cb_kerbin.pqsController.maxDetailDistance;
  254. cb_laythe.atmosphericAmbientColor = new Color(0.075f, 0.08f, 0.095f);
  255. cb_laythe.orbitDriver.orbitColor = new Color(0.15f, 0.25f, 0.05f);
  256. cb_laythe.orbit.LAN = 0;
  257. cb_laythe.orbit.argumentOfPeriapsis = 0;
  258. cb_laythe.orbit.meanAnomalyAtEpoch = 1;
  259.  
  260. cb_laythe.bodyDescription = "Long known as Kerbin's sister moon, Laythe was seeded with life hundreds of millions of years ago when a large asteroid struck Kerbin - catapulting boulders with various life forms into orbit around Jool. Given its proximity to Kerbin, some of this impact debris found its way to Laythe, depositing a precious cargo of microbes and, according to some theories, whole plant seeds. This life quickly spread across the moon, until it became the lush green world we know today.\n\n(There are, however, fringe theorists who believe that life started on Laythe and was brought to Kerbin, but that's just absurd)";
  261.  
  262. cb_laythe.scienceValues.LandedDataValue = 3;
  263. cb_laythe.scienceValues.SplashedDataValue = 3;
  264. cb_laythe.scienceValues.InSpaceLowDataValue = 1.5f;
  265. cb_laythe.scienceValues.InSpaceHighDataValue = 1;
  266. cb_laythe.scienceValues.FlyingLowDataValue = 2.5f;
  267. cb_laythe.scienceValues.FlyingHighDataValue = 2;
  268. cb_laythe.scienceValues.RecoveryValue = 3;
  269.  
  270.  
  271. print("PlanetShifter: Shifting Laythe terrain");
  272. PQSLandControl cb_laythe_lc = cb_laythe.pqsController.gameObject.GetComponentInChildren<PQSLandControl>();
  273. if (cb_laythe_lc != null)
  274. {
  275. print("Found LandControl, spewing land classes...");
  276. foreach (PQSLandControl.LandClass lc in cb_laythe_lc.landClasses)
  277. {
  278. print(lc.landClassName);
  279. print(lc.color);
  280.  
  281. if (lc.landClassName == "Mud")
  282. {
  283. lc.color = new Color(0.35f, 0.25f, 0.2f);
  284. lc.noiseColor = new Color(0.26f, 0.27f, 0.15f);
  285. lc.noiseBlend = 0.8f;
  286. lc.noiseFrequency = 20;
  287. }
  288.  
  289. if (lc.landClassName == "BaseLand")
  290. {
  291. lc.color = new Color(0.16f, 0.185f, 0.15f);
  292. lc.noiseColor = new Color(0.14f, 0.15f, 0.02f);
  293. lc.noiseBlend = 0.2f;
  294. }
  295.  
  296. if (lc.landClassName == "IceCaps")
  297. {
  298. lc.latitudeRange.endStart = 0.09;
  299. lc.latitudeRange.endEnd = 0.1;
  300. //print("IceCap latitude whatsit: ss-" + lc.latitudeRange.startStart + " se-" + lc.latitudeRange.startEnd + " es-" + lc.latitudeRange.endStart + " ee-" + lc.latitudeRange.endEnd);
  301. }
  302. }
  303. }
  304.  
  305. PQSMod_VertexHeightMap cb_laythe_hm = cb_laythe.pqsController.gameObject.GetComponentInChildren<PQSMod_VertexHeightMap>();
  306. if (cb_laythe_hm != null && newLaytheHeight != null)
  307. {
  308. Destroy(cb_laythe_hm.heightMap); //obliterate the old heightmap
  309. cb_laythe_hm.heightMap = ScriptableObject.CreateInstance<MapSO>();
  310. cb_laythe_hm.heightMap.CreateMap(MapSO.MapDepth.Greyscale, newLaytheHeight); //turn it into something usable
  311. cb_laythe_hm.heightMapOffset = -400;
  312. cb_laythe_hm.heightMapDeformity = 7000; //tweak deformity
  313. Destroy(newLaytheHeight); //and then nuke the texture
  314. }
  315.  
  316. PQSMod_VertexHeightNoise cb_laythe_vhn = cb_laythe.pqsController.gameObject.GetComponentInChildren<PQSMod_VertexHeightNoise>();
  317. if (cb_laythe_vhn != null)
  318. {
  319. cb_laythe_vhn.deformity = 250;
  320. cb_laythe_vhn.frequency = 8;
  321. }
  322.  
  323. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement