Jump to content

[1.8.1-1] [PLEASE FORK ME] Kopernicus & KittopiaTech


Thomas P.

Recommended Posts

On 12/06/2016 at 3:52 AM, Astrofox said:

Say, how does one create rings for planets?

EDIT:

I mean textures - ring textures. Sorry for the confusion...

Whoops.

with photoshop and patience. :P

seriously though, it's not too hard, but it can be frustrating, just take your time and give it a try.

Edited by KillAshley
Link to comment
Share on other sites

On 6/11/2016 at 10:10 PM, Fireheart318 said:

I've been messing around trying to figure out how to apply heightmaps and I can't get it to work! Here's my code: http://pastebin.com/G1dUqbHR I'm trying to MODIFY the Mun for now

 

21 hours ago, Enceos said:

This question belongs to the Kopernicus thread.

@Red Iron Crown would you move it please?

 

Merged.

 

Link to comment
Share on other sites

On 12.6.2016 at 4:10 AM, Fireheart318 said:

I've been messing around trying to figure out how to apply heightmaps and I can't get it to work! Here's my code: http://pastebin.com/G1dUqbHR I'm trying to MODIFY the Mun for now

I already told you IN THE OTHER THREAD that I won't support this config, because it is a nightmare and a straight Kittopia export. Stop asking for support for this config. I dearly hope that noone is insane enough to try to support it anyways.

Link to comment
Share on other sites

@Fireheart318 Seeing as Thomas is getting tired of this, I'll try to explain what you're doing.

 

First off, you're using a Kittopia export and those things don't work. Next, in the first line, you have '[!Kopernicus]' which means that your config automatically disables itself if Kopernicus is installed, ergo, it won't work whatever you do.

Also, I don't think that you have any idea of what you're actually trying to do here. You're actually trying to create a NEW Mun rather than editing the stock one, and since there can be only one body named 'Mun', stuff will inevitably crash. Try this config instead:

@Kopernicus:AFTER[Kopernicus]
{
	@Body[Mun]
	{
		@Template
		{
			removePQSMods = PQSMod_VertexHeightMap
		}
		@PQS
		{
			Mods
			{
				VertexHeightMap
				{
					map = [FILEPATH]
					offset = 0
					deformity = 7500
					scaleDeformityByRadius = False
					order = 10
					enabled = True
				}
			}
		}
	}
}

Now, what am I doing in this config? With the first line, '@Kopernicus:AFTER[Kopernicus]' I adress ModuleManager and tell it to load this config after the Kopernicus plugin itself, which means that when this config is loaded Kopernicus is awake and can tell KSP what to do with the config.

Next, I write '@body[Mun]'. With this line I'm actually saying 'Edit body named 'Mun''. Easy, right?

With '@Template' I can edit Mun's PQSMods as if I'm creating a new planet with the Mun template. Next I tell Kopernicus to remove the PQSMod VertexHeightMap.

I then adress the PQS applied to Mun ('@PQS'), then adress the Mods (there are PQSMaterials, PQSMods, etc), and then I add a new mod: I re-add VertexHeightMap. The VertexHeightMap I added is identical to the one applied to Mun by default save for the fact that I can tell it to load a different heightmap.

But adding a heightmap is very, very easy, I actually don't see what problem you could possibly be having with it. All it takes is writing

PQS
{
	Mods
	{
		VertexHeightMap
		{
			[MOD STUFF HERE]
		}
	}
}

in your planet's config. A quick note though: unless your heightmap is extremely large your planet WILL end up blocky if you use a heightmap only, so therefore also use the mods VertexHeightNoise and VertexSimplexHeightAbsolute, as well as color mods because otherwise your planet will be completely black.

And lastly I totally agree with @Thomas P.: You really should do some research first because you seem to be diving in head first with no idea of what you're doing at all. I'm not saying that that's wrong, I'm saying that it'll likely lead to a lot of frustration. @KillAshley has written various example configs you can use as study, and aside from that I've written a few guides that should help you get started and explain the basics of config writing, what does the planet need and what does what mean.

Don't let all these confusing looking codes discourage you, it's actually really easy since Kopernicus and PQSMods are like a game with predetermined rules, once you know the rules, you'll find yourself making configs by the truckload with no effort at all. If you need any more help, feel free to ask here or shoot me a PM.

Link to comment
Share on other sites

17 minutes ago, Waz said:

Weird thought: is it possible to put scatter mesh boulders into planetary rings? With colliders? Was the Voyager intro the best of any Star Trek?

Oh, my... very clever!

Link to comment
Share on other sites

2 hours ago, Waz said:

Weird thought: is it possible to put scatter mesh boulders into planetary rings? With colliders? Was the Voyager intro the best of any Star Trek?

I was just about to ask if this was possible. Neat!

 

But I was also about to ask if non-spherical bodies are able to be generated yet. Pear-shaped maybe?

Link to comment
Share on other sites

14 minutes ago, BigFatStupidHead said:

I was just about to ask if this was possible. Neat!

 

But I was also about to ask if non-spherical bodies are able to be generated yet. Pear-shaped maybe?

they were able to be generated back even in PFCE days, heightmaps are pretty easy to make & implement :wink:

Link to comment
Share on other sites

19 hours ago, The White Guardian said:

@KillAshley has written various example configs you can use as study, and aside from that I've written a few guides that should help you get started and explain the basics of config writing, what does the planet need and what does what mean.

Don't let all these confusing looking codes discourage you, it's actually really easy since Kopernicus and PQSMods are like a game with predetermined rules, once you know the rules, you'll find yourself making configs by the truckload with no effort at all. If you need any more help, feel free to ask here or shoot me a PM.

Can you direct me to @KillAshley? I can't find the configs. The ones I could find, written by ThomasKerman make little sense to me. Apparently whatever I do deletes the Mun. There's gotta be an easier way to do that and why would you want to?!

Link to comment
Share on other sites

21 minutes ago, Fireheart318 said:

Can you direct me to @KillAshley? I can't find the configs. The ones I could find, written by ThomasKerman make little sense to me. Apparently whatever I do deletes the Mun. There's gotta be an easier way to do that and why would you want to?!

Ummm... I never wrote any real example configs.. The KopernicusExample repository is maintained by @KillAshley, not by me. You might be looking at my old Kopernicus fork, which is out of date and completely broken. I already sent you the link to the correct examples, and it is in the OP too.

Link to comment
Share on other sites

54 minutes ago, Thomas P. said:

Ummm... I never wrote any real example configs.. The KopernicusExample repository is maintained by @KillAshley, not by me. You might be looking at my old Kopernicus fork, which is out of date and completely broken. I already sent you the link to the correct examples, and it is in the OP too.

That's probably it https://github.com/Kopernicus/Kopernicus/blob/master/Kopernicus/Kopernicus/Configuration/ModLoader/VertexHeightMap.cs. Can you just link me to the configs? I've spent a while looking through @KillAshely's posts but couldn't find them. *Facepalms*

Link to comment
Share on other sites

17 hours ago, Fireheart318 said:

That's probably it https://github.com/Kopernicus/Kopernicus/blob/master/Kopernicus/Kopernicus/Configuration/ModLoader/VertexHeightMap.cs. Can you just link me to the configs? I've spent a while looking through @KillAshely's posts but couldn't find them. *Facepalms*

Just literally read the OP

Quote

Examples
Selectively copy folders inside KopernicusExamples/ into a GameData/KopernicusExamples/ folder. There are a number of examples of how to use Kopernicus. You have to download the examples from their GitHub repository: https://github.com/Kopernicus/KopernicusExamples/

I actually wonder how you could've missed this.

Link to comment
Share on other sites

Hi,

This is an edited export from KittopiaTech (modified the !Kopernicus thing) but this is the starting point for my entry for the Creativity marathon and I cant get it to load.

Error:
 

[LOG 17:31:55]: Exception Was Recorded: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.First[CBAttributeMapSO] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.First[CBAttributeMapSO] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 
  at Kopernicus.Utility.FindMapSO (System.String url, Boolean cbMap) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.MapSOParser_RGB`1[CBAttributeMapSO].SetFromString (System.String s) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Parser.CreateObjectFromConfigNode (System.Type type, .ConfigNode node, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Loader.Kopernicus.Configuration.IParserEventSubscriber.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0 

Planet CFG (do not look in here if you are wanting ideas for the Creativity marathon)

Spoiler

// KittopiaTech - a Kopernicus Visual Editor

@Kopernicus:AFTER[Kopernicus]
{
	Body
	{
		name = Fall
		Template
		{
			name = Moho
			removeAllPQSMods = true
		}
		Properties
		{
			description = When Kerbal scientists found a stripped gas giant around Larinax, they immediatly turned turned towards Kerbol to see if there was one nearby. Turns out, there was.
			radius = 200000
			geeASL = 0.67
			rotates = True
			rotationPeriod = 36000
			tidallyLocked = False
			initialRotation = 0
			inverseRotThresholdAltitude = 100000
			albedo = 0.1
			emissivity = 0.9
			coreTemperatureOffset = 0
			isHomeWorld = False
			timewarpAltitudeLimits = 0 0 0 20000 50000 50000 60000 70000
			biomeMap = BUILTIN/moho_biome
			Biomes
			{
				Biome
				{
					name = North Pole
					value = 0
					color = 1,0.682353,0,1
				}
				Biome
				{
					name = Northern Sinkhole Ridge
					value = 0
					color = 1,0,0.4705882,1
				}
				Biome
				{
					name = Northern Sinkhole
					value = 0
					color = 1,0.9176471,0,1
				}
				Biome
				{
					name = Midlands
					value = 0
					color = 0.3882353,0.2627451,0.07843138,1
				}
				Biome
				{
					name = Western Lowlands
					value = 0
					color = 1,0,0,1
				}
				Biome
				{
					name = Central Lowlands
					value = 0
					color = 0,1,0.04705882,1
				}
				Biome
				{
					name = Highlands
					value = 0
					color = 0.1372549,0.3921569,0.1686275,1
				}
				Biome
				{
					name = Minor Craters
					value = 0
					color = 0.4980392,0.7058824,0,1
				}
				Biome
				{
					name = South Western Lowlands
					value = 0
					color = 0,1,0.9411765,1
				}
				Biome
				{
					name = South Eastern Lowlands
					value = 0
					color = 0.04705882,0,1,1
				}
				Biome
				{
					name = Canyon
					value = 0
					color = 0.9764706,0.6392157,0.6392157,1
				}
				Biome
				{
					name = South Pole
					value = 0
					color = 0.9882353,0,1,1
				}
			}
			ScienceValues
			{
				landedDataValue = 2
				splashedDataValue = 2
				flyingLowDataValue = 11
				flyingHighDataValue = 8
				inSpaceLowDataValue = 7
				inSpaceHighDataValue = 6
				recoveryValue = 7
				flyingAltitudeThreshold = 12000
				spaceAltitudeThreshold = 140000
			}
		}
		Orbit
		{
			referenceBody = Sun
			inclination = 0.5
			eccentricity = 0.02
			semiMajorAxis = 9000000000
			longitudeOfAscendingNode = 0
			argumentOfPeriapsis = 0
			meanAnomalyAtEpoch = 0
			meanAnomalyAtEpochD = 0
			epoch = 0
			color = 0.1980392,0.1098039,0.1058824,1
			cameraSmaRatioBounds = 0.03 25
		}
		PQS
		{
			Mods
			{
				VertexSimplexHeightAbsolute
				{
					name = H1
					seed = 47538
					deformity = 7000
					octaves = 3
					persistence = 0.5
					frequency = 1
					enabled = true
					order = 1
				}
				VertexSimplexHeightAbsolute
				{
					name = H2
					seed = 387925
					deformity = 5
					octaves = 3
					persistence = 0.5
					frequency = 1
					enabled = true
					order = 2
				}
				HeightColorMap
				{
					blend = 0.2
					enabled = true
					order = 3
					LandClasses
					{
						Class
						{
							name = Base
							altitudeStart = 0
							altitudeEnd = 0.1
							color = 0.53,0.17,0.02,1.0
							lerpToNext = true
						}
						Class
						{
							name = Lowlands
							altitudeStart = 0.1
							altitudeEnd = 0.2
							color = 0.47,0.28,0.03,1.0
							lerpToNext = true
						}
						Class
						{
							name = Midlands
							altitudeStart = 0.2
							altitudeEnd = 0.5
							color = 0.75,0.38,0.098,1.0
							lerpToNext = true
						}
						Class
						
						{
							name = ScorchedHighlands
							altitudeStart = 0.5
							altitudeEnd = 0.8
							color = 1.0,0.59,0.34,1.0
							lerpToNext = true
						}
					}
				}
			}
		}
	}
}

 

 

Link to comment
Share on other sites

33 minutes ago, RA3236 said:

Turns out its the biomes :) 

(MapSO is attributed to biomes by the look of it.)

yes, biomes and heightmaps cannot be loaded BUILTIN

if you want to use those you need to use the template that carries them

Link to comment
Share on other sites

5 minutes ago, RA3236 said:

Yeah, KittopiaTech did that. Thanks anyway.

Kittopiatech exports are more a window inside ksp rather than examples on how to write cfgs

The numbers can usually be trusted, but everything else should be written by hand

Link to comment
Share on other sites

45 minutes ago, Sigma88 said:

Kittopiatech exports are more a window inside ksp rather than examples on how to write cfgs

The numbers can usually be trusted, but everything else should be written by hand

Yeah. Gotta remember that :) 

Link to comment
Share on other sites

2 hours ago, Sigma88 said:

Kittopiatech exports are more a window inside ksp rather than examples on how to write cfgs

The numbers can usually be trusted, but everything else should be written by hand

Well, I actually want to thank you for this, Sigma. You have no idea how helpful those exports are when editing planets, especially the stock ones. So Kittopia exports are quite handy but unpractical if you want to load them up. Kittopia adds '!Kopernicus' for a reason...

Link to comment
Share on other sites

7 hours ago, Sigma88 said:

yes, biomes and heightmaps cannot be loaded BUILTIN

if you want to use those you need to use the template that carries them

Really? I'm using

biomeMap = BUILTIN/dres_biome

in my Dres space program, and the biomes all -seem- to work correctly. Is there something subtle going on there I should notice? Heightmaps definitely need to be imported though.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...