Jump to content

[1.2.2] Kopernicus PQS Library Expansion


Recommended Posts

Welcome to the Kopernicus Procedural Quad Sphere Library Expansion, or KLE for short.

So, you're probably wondering, TWG, what IS KLE? Allow me to tell you all about it.

KLE is a .dll file containing several scripts that add various new generation options to users. You see, KSP creates planets using something called 'Procedural Quad Sphere Mods'. Minmus, for example, is the product of the PQSMod 'VertexPlanet'. Gilly is the result of 'VertexSimplexHeightAbsolute'. KLE adds several new PQSMods, using the Microsoft C# coding language to give planet creators several new options, things that weren't possible before.

Users can also suggest custom PQSMods although, mind you, not everything is possible. No 'planet sculpters'.

Current PQSMods included:

AltitudeMath

Spoiler

Allows modders to apply a command with specified strength to the terrain.


AltitudeMath
{
	command				//Enum, the command you want to apply. Valid are 'Add', 'Subtract', 'Multiply', and 'Divide'.
	effect				//Double, the strength of the effect. (For example, if the command is 'Add', the formula is 'height + effect')
	effectIsPercentage		//Boolean, should the value of 'effect' be considered as a percentage? (Ergo, effect = 200 -> effect = 200%)
	enabled				//Boolean, should the mod be taken into account when building the terrain?
	order				//Simple loadorder value.
}

 

CoastlineSmoother

Spoiler

Applies an inversely exponential gradient to the terrain to smoothen the terrain between two specified altitude limiters. The closer the terrain altitude is to the lower altitude limiter, the stronger this effect becomes.


CoastlineSmoother
{
	startingAltitude		//Double, the starting altitude (m) of the mod's active range.
	endingAltitude			//Double, the ending altitude (m) of the mod's active range.
	strength			//Integer, the strength of the effect
	offset				//Double, this number is added to the affected terrain afterwards.
	enabled				//Boolean, should the mod be taken into account when building the terrain?
	order				//Simple loadorder value.
}

 

FlattenRange

Spoiler

Set two altitude limiters. All terrain in this specified range will be flattened to the value of flattenTo.


FlattenRange
{
	cutoffStart			//Double, the starting altitude of the range (in meters)
	cutoffend			//Double, the ending altitude of the range (in meters)
	flattenTo			//Double, the altitude that is flattened to
	cutoffStartToInfinity		//Boolean, if the starting altitude should be infinitely low
	cutoffEndToInfinity		//Boolean, if the ending altitude should be infinitely low
	enabled				//Boolean, should the mod be taken into account when building the terrain?
	order				//Simple loadorder value.
}

 

HeightColorMap3 (WIP)

Spoiler

HeightColorMap3
{
	//Same as HeightColorMap, but the altitude limiters for landclasses are in m.
	//Still in-dev, may not work yet.
}

 

HybridNoise (after a suggestion by @GregroxMun)

Spoiler

Generates a customizeable Hybrid Multifractal noise.


HybridNoise
{
	deformity	//Double, in meters, the maximum reach of the PQSMod
	seed		//Integer, generation seed
	frequency	//Frequency of the HybridMultifractal noise
	lacunarity	//Lacunarity of the HybridMultifractal noise
	octaves		//Integer, the amount of octaves of the HybridMultifractal noise
	quality		//Enumerator, can be 'High', 'Medium' or 'Low'.
	offset		//Float, not entirely sure what it does...
	enabled		//Boolean, should the mod be taken into account when building the terrain?
	order		//Simple loadorder value.
}

 

MapArtist

Spoiler

In-depth creation of planets using maps. Has an automatic heightmap smoothing feature.


MapArtist
{
	heightMap		//MapSO, the heightmap used
	colorMap		//MapSO, the colormap used
	heightmapDeformity	//Double, the deformity of the heightmap
	scaleDeformityByRadius	//Boolean, should the deformity of the heihgtmap be multiplied by the radius of the sphere
	addSimplexNoise		//Boolean, if true, generates a simplex noise as well
	smoothHeihgtMap		//Boolean, generate an automatic secondary simplex noise to reduce heightmap blockiness
	offset			//Double, raises the entire terrain of a planet by the given amount
	smoothDeformity		//Double, the deformity of the smoother simplex. If set to zero or not specified, deformity is calculated

	//Values used by addSimplexNoise
	seed			//Integer, generation seed used by the simplex noise
	deformity		//Double, deformity used by the simplex noise (m)
	octaves			//Integer, the amount of octaves of the simplex
	persistence		//Double, the persistence of the simplex
	frequency		//Double, the frequency of the simplex

	enabled			//Boolean, should the mod be taken into account when building the terrain?
	order			//Simple loadorder value.
}

 

SimplexNoiseRange

Spoiler

Generate a simplex noise but only within the specified altitude range.


SimplexNoiseRange
{
	seed		//Integer, the generation seed of the simplex
	deformity	//Double, the deformity of the terrain (m)
	persistence	//Double, the persistence of the simplex
	octaves		//Double, the octaves of the simplex
	rangeStart	//Double, the stating altitude in meters
	rangeEnd	//Double, the ending altitude in meters
	frequency	//Double, the frequency of the simplex
	enabled		//Boolean, should the mod be taken into account when building the terrain?
	order		//Simple loadorder value.
}

 

SmoothenAltitude

Spoiler

Set a starting and ending altitude. Terrain in this range is lowered or raised slightly to the value in the center of the range.


SmoothenAltitude
{
	maxAltitude 		//Double, the maximum altitude in meters
	minAltitude		//Double, the minimum altitude in meters
	strength		//Double, the strength of the effect
	limitEffectTorange	//If only terrain with altitudes in the range is affected, or if the whole planet should be affected
	enabled			//Boolean, should the mod be taken into account when building the terrain?
	order			//Simple loadorder value.
}

 

VertexCanyons

Spoiler

One of the biggest mods I ever wrote, VertexCanyons uses a virtual SimplexNoise to select parts of the terrain and generate noise inside. As the title suggests, this can be used for canyons but overall it can be used in many ways.


VertexCanyons
{
	//Note: 'internal noise' -> the noise inside the 'canyons'.
	noiseSeed		//Integer, the seed of the internal noise
	noiseDeformity		//Double, the deformity of the internal noise
	noiseFrequency		//Double, the frequency of the internal noise
	noisePersistence	//Double, the persistence if the internal noise
	noiseLacunarity		//Double, the lacunarity of the internal noies
	noiseOctaves		//Integer, the octaves of the internal noise
	noiseMode		//QualityMode, can be 'High', 'Medium' or 'Low'
	noiseType		//Enumerator, can be 'Perlin', 'Billow', 'RiggedMultifractal' or 'Voronoi'. Defines the type of the internal noise

	canyonSeed		//Integer, the seed of the canyon placement simplex
	canyonThreshold		//Double, can be used to increase or decrease the canyon size
	canyonOctaves		//Double, the octaves of the canyon placement simplex
	canyonPersistence	//Double, the persistence of the canyon placement simplex
	canyonFrequency		//Double, the frequency of the canyon placement simplex
	canyonSize		//Double, Scale the canyons

	addCanyonDepth		//Double, value is added to the affected terrain. Use to offset the canyons
	multiplyCanyonBy	//Double, multiplies the canyon depth by the given number

	addColor		//Boolean, should the inside of the canyons be recolored
	canyonColor		//Color, the color of the canyons
	colorBlend		//Float, the amount of color applied

	enabled			//Boolean, should the mod be taken into account when building the terrain?
	order			//Simple loadorder value.
}

 

VertexNoiseRange

Spoiler

Like VertexHeightNoise (although it also can create HybridMultifractal noise), but you can set altitude limiters


VertexNoiseRange
{
	noiseType	//Enumerator, the type of noise used. Can be 'RiggedMultifractal', 'Perlin', 'Billow' or 'HybridMultifractal'
	seed		//Integer, the generation seed used
	deformity	//Double, the deformity of the noise
	octaves		//Double, the octavesof the noise
	frequency	//Double, the frequency of the noise
	lacunarity	//Double, the lacunarity of the noise
	persistence	//Double, the persistence of the noise
	offset		//Float, not sure what it does...
	rangeStart	//Double, the starting altitude
	rangeEnd	//Double, the ending altitude
	mode		//QualityMode, can be 'High', 'Medium' or 'Low'
	enabled		//Boolean, should the mod be taken into account when building the terrain?
	order		//Simple loadorder value.
}

 

Special mods:

ParadiseSpike - an in-dev mod aiming to generate something like this:

image20-1024x768.jpg

In-dev PQSMods:

- Templator, enter a planet type and it generates a base planet.

- And many more that I forgot about...

 

DOWNLOAD

SpaceDock

SOURCE

GitHub

Edited by The White Guardian
Source code now available.
Link to comment
Share on other sites

cool, I'll see that compatibility for the altitude related mods gets added to SD as soon as I have some time

 

btw, I'm not sure the paradise spike is possible with PQS, you would need to assign 3 different height values to the same lon-lat

and iirc that's not possible

Link to comment
Share on other sites

1 hour ago, Sigma88 said:

cool, I'll see that compatibility for the altitude related mods gets added to SD as soon as I have some time

 

btw, I'm not sure the paradise spike is possible with PQS, you would need to assign 3 different height values to the same lon-lat

and iirc that's not possible

Alright!

 

No, I also don't think I can get it to curve like that. Never heard of procedural caves in KSP, so right now I'm working on creating a script that generates large chunks of rock in a similar-ish fashion. Perhaps a lightly deformed Voronoi noise on top for the fractured terrain?

Currently I'm using a Simplex noise for placement with a separate, optional limiter that limits the effect to areas below 0m only, ergo limit the effect to coastlines. I'll add a second limiter statement when I get home so they don't get generated all over the ocean floor (although they'd make for some sweet reefs now that I think of it)

 

Anyhow, the result will probably be something closer to this in terms of formation shape:

Sparse_Reef_03-Sandstone_Fort.jpg

 

Though, caves... best option right now is an OCD mesh plus PQSCity I suppose. Only other option would be a rework of how the PQS-system works...

Edited by The White Guardian
Link to comment
Share on other sites

1 hour ago, Sigma88 said:

Does this require kopernicus?

And, if not, will you use the kopernicus node to assign pqsmods to each planet?

It's scripts heavily use Kopernicus, so that's a nope. This is an extension for Kopernicus, not a replacement for Kopernicus. For example it uses Kopernicus' ModLoader. (I didn't steal anything, I can simply reference Kopernicus' DLL files and tell KSP to use Kopernicus' ModLoader.)

public class VertexCanyons : ModLoader<PQSMod_VertexCanyons>

 

Edited by The White Guardian
Link to comment
Share on other sites

39 minutes ago, The White Guardian said:

Tagging some people that I think may find this interesting:

@Thomas P., @ProtoJeb21, @KillAshley, @GregroxMun, @CaptRobau, @Agent-Daniel_46

Great great great job my friend! I am super excited for this, and if you will, may I bundle your package of PQS mods with Kerbol Origins and use it to improve the existing celestial bodies? I am really excited for the canyons PQS mod, AltitudeMath and MapArtist! Thank you for creating this! :D

Link to comment
Share on other sites

I have a few requests. I don't know how practical they are, but nonetheless here they are:

PQSMod_RandomMapDecal: An alternaitve to voronoiCraters. It randomly places map decals on the planet.

  • MaxDeformity = Maximum height deformation.
  • MinDeformity =  Minimum height deformation.
  • MaxRadius = Maximum size of map decals. (If MaxDeformity is 1000, then a decal with the MaxRadius should be 1000 if RadiusDeformityRelationship = 0)
  • MinRadius = Minimum size of map decals. (If MinDeformity is 200, then a decal with the MinRadius should be 200 if RadiusDeformityRelationship = 0)
  • Map = The heightmap texture for the decal. This can be used to place craters, volcanoes, bumps, blocks, or anything you can put in a heightmap.
  • Count = How many decals should be placed.
  • Seed = Seed for pseudo-random generator.
  • RadiusDeformityRelationship = From 0-1, how much variation in the relationship between Deformity and Radius can there be in units of deformity percent.
  • Order = Where should it be in the PQSMod Order. This is important so you can lay several of these mods on top of each other to establish an order of events.

PQSMod_LandControlMap: LandControl, but land class locations are defined by reading colors off of a map instead of the very confusing latitude and longitude system. (Essentially like a biome map) This could be used for adding biome-specific scatters to a planet made from a color map instead of the confusing LandControl system.  This would be a fairly major breakthrough for surface detail of mod planets the way most of them tend to be made. It could also be used to add more procedural detail to a hand-painted map than would be possible using hand-painted maps, as the height colors can still be used and they would smoothly blend into the rest of the planet.

PQSMod_Ellipsoid: VertexHeightOblate doesn't actually produce a true oblate spheroid. This PQSMod would allow you to make a planet into an oblate spheroid, prolate spheroid, or triaxial ellipsoid. This can be used to produce asteroids and true oblate planets.

  • ScaleDeformityByRadius = What it says on the tin. Boolean.
  • AxisA = Deformity along the A axis of the ellipsoid.
  • AxisB = Deformity along the B axis of the ellipsoid.
  • AxisC = Deformity along the C axis of the ellipsoid.

PQSMod_OffsetTerrain: Takes the whole planet's terrain and rotates it by longitude and/or lattitude. Could be immensely useful for the production of procedural + mapped tidally locked planets with ice caps.

PQSMod_Rivers: Digs into a planet to produce rivers or canyons that reach down to a specific altitude (below zero on an ocean planet and they would become rivers)

PQSMod_MapDecalLonLat: Map decal, but with longitude and latitude as the definition for placement.

PQSMod_FlattenMountain: Select a height, and anything above that is flattened to it. Can be ordered so mods can be put on top. The opposite of FlattenOcean. Can be used to create mesas or plains.

Link to comment
Share on other sites

23 minutes ago, GregroxMun said:

PQSMod_RandomMapDecal: An alternaitve to voronoiCraters. It randomly places map decals on the planet.

Good idea! I'll see how I can make this work. Problem is I have no idea how MapDecal loads it's maps in a 'localized' fashion instead of pasting them over the entire terrain, but if SQUAD could do it then it's definitely possible.

24 minutes ago, GregroxMun said:

PQSMod_LandControlMap: LandControl, but land class locations are defined by reading colors off of a map instead of the very confusing latitude and longitude system.

That was actually the very first PQSMod I tried to create, placing terrain scatters by reading a biome map, and I'm still trying to create it. Problem is the terrain scatters, those are HARD. I have yet to go on the IRC and ask Thomas if, instead, I can hitch a ride on LandControl's scatter configuration in some way to make the process easier. Back in the day I had called it 'Kartographer'.

26 minutes ago, GregroxMun said:

PQSMod_Ellipsoid

Alright, I'll look into it!

26 minutes ago, GregroxMun said:

PQSMod_OffsetTerrain

Yikes, uh... okay, I have no idea how that's gonna work. Maybe... now that I think of it, I feel a plan forming. Perhaps data.vertHeight isn't the only thing I can alter in the override void called when KSP builds the terrain.

27 minutes ago, GregroxMun said:

PQSMod_Rivers

That'd probably be similar to VertexCanyons but with a more smooth approach, not sure how I could create something like that at this point but I'll look into it regardless.

28 minutes ago, GregroxMun said:

PQSMod_MapDecalLonLat

Once I figure out the process behind MapDecals I'll definitely give this a go. Didn't MapDecals use Lat-Lon already though? Or was that a Vector3? I can't remember...

30 minutes ago, GregroxMun said:

PQSMod_FlattenMountain

KillAshley's Kerbol Plus already has the exact same mod so I'll probably have to get a different name to avoid conflicts but that's definitely the easiest mod on this list, will have that one done within half an hour.

Link to comment
Share on other sites

Edit: @GregroxMun already finished FlattenMountains. Behold the code:

 	public class PQSMod_AltitudeLimiter : PQSMod
    {
        public Double maxAltitude = 2000;
        public override void OnVertexBuildHeight(PQS.VertexBuildData data)
        {
            if (data.vertHeight >= maxAltitude + sphere.radius)
                data.vertHeight = maxAltitude + sphere.radius;
        }
    }


    [RequireConfigType(ConfigType.Node)]
    public class AltitudeLimiter : ModLoader<PQSMod_AltitudeLimiter>
    {
        [ParserTarget("maxAltitude", optional = true)]
        public NumericParser<double> maxAltitude
        {
            get { return mod.maxAltitude; }
            set { mod.maxAltitude = value; }
        }
    }

That's all it takes. The first part is the C# behavior script. As you can see, it has the value 2000 by default although this is overridden by the value entered in a config - provided a value is specified, otherwise 2000 will be used.

Public override void OnVertexBuildHeight -> activates when KSP builds the planet's deformity

The function translated to English:

"If the data in this specific area is greater than the value of maxAltitude plus the radius of the sphere (data.vertHeight counts from the planet center), then the value of the altitude here is, after the PQSMod is applied, equal to the value of maxAltitude plus the radius of the sphere."

 

The second part is the loader, Kopernicus' ModLoader will search for the node 'AltitudeLimiter' in a config and when it does, will look for the text 'maxAltitude' and replace the value of maxAltitude in the PQSMod script with the value specified in the config.

 

...

 

And then I realize that I only learned all of this in May. A month ago I would have no idea how to do such a thing... Anyhow, I'll release a new version tomorrow.

 

Link to comment
Share on other sites

Exception!

[LOG 09:03:19]: PQSLoader.PostApply(ConfigNode): Added PQS Mod => PQSMod_VertexHeightMap
[LOG 09:03:19]: Parsing Target deformity in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Double])
[LOG 09:03:19]: Parsing Target seed in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Int32])
[LOG 09:03:19]: Exception Was Recorded: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Kopernicus.NumericParser`1[System.Int32].SetFromString (System.String s) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.PQSLoader.Kopernicus.IParserEventSubscriber.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.CreateObjectFromConfigNode (System.Type type, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Loader.Kopernicus.IParserEventSubscriber.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0 
[LOG 09:03:19]: Inner Exception Was Recorded: Value is too large
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

It seems as if Kopernicus has trouble loading up HybridNoise. It's listed in the OP above, but is it in the DLL? (there's no way for me to check, so that's why i'm asking :) )

Here's my PQS { Mods part of the config:

Mods
            {	
				VertexHeightMap
				{
					map = Olei/PluginData/Fume_height.png
					offset = -500
					deformity = 5000
					scaleDeformityByRadius = False
					order = 10
					enabled = True
				}
				//VertexHeightNoiseVertHeightCurve2
				//{
				//	deformity = 8000
				//	ridgedAddFrequency = 35
				//	ridgedAddLacunarity = 4
				//	ridgedAddOctaves = 6
				//	ridgedAddSeed = 134713
				//	ridgedMode = Low
				//	ridgedSubFrequency = 27
				//	ridgedSubLacunarity = 4
				//	ridgedSubOctaves = 6
				//	ridgedSubSeed = 34544
				//	simplexFrequency = 50
				//	simplexHeightEnd = 2000
				//	simplexHeightStart = 500
				//	simplexOctaves = 4
				//	simplexPersistence = 0.6
				//	simplexSeed = 1346666
				//	order = 32
				//	enabled = True
				//	name = HeightNoiseV2
				//	simplexCurve
				//	{
				//		key = 0 0 0 0
				//		key = 0.3 0.1 0 0
				//		key = 0.4 0.2 0 0
				//		key = 0.5 0.3 1.659658 1.659658
				//		key = 1 0.5 3.005844 3.005844
				//	}
				//}
				HybridNoise
				{
					deformity = 5000	//Double, in meters, the maximum reach of the PQSMod
					seed = 3141592654	//Integer, generation seed
					frequency = 20	//Frequency of the HybridMultifractal noise
					lacunarity = 2	//Lacunarity of the HybridMultifractal noise
					octaves = 8		//Integer, the amount of octaves of the HybridMultifractal noise
					quality = Medium		//Enumerator, can be 'High', 'Medium' or 'Low'.
					offset = 0.1		//Float, not entirely sure what it does...
					enabled = True		//Boolean, should the mod be taken into account when building the terrain?
					order = 50		//Simple loadorder value.
				}
				VertexColorMap
				{
					map = Olei/PluginData/Fume_color.png
					order = 110
					enabled = True
				}
			}
        }

 

Link to comment
Share on other sites

4 minutes ago, Gameslinx said:

Exception!


[LOG 09:03:19]: PQSLoader.PostApply(ConfigNode): Added PQS Mod => PQSMod_VertexHeightMap
[LOG 09:03:19]: Parsing Target deformity in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Double])
[LOG 09:03:19]: Parsing Target seed in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Int32])
[LOG 09:03:19]: Exception Was Recorded: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Kopernicus.NumericParser`1[System.Int32].SetFromString (System.String s) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.PQSLoader.Kopernicus.IParserEventSubscriber.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.CreateObjectFromConfigNode (System.Type type, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectMemberFromConfigurationNode (System.Reflection.MemberInfo member, System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node, System.String modName, Boolean getChilds) [0x00000] in <filename unknown>:0 
  at Kopernicus.Configuration.Loader.Kopernicus.IParserEventSubscriber.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0 
[LOG 09:03:19]: Inner Exception Was Recorded: Value is too large
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

It seems as if Kopernicus has trouble loading up HybridNoise. It's listed in the OP above, but is it in the DLL? (there's no way for me to check, so that's why i'm asking :) )

Here's my PQS { Mods part of the config:


Mods
            {	
				VertexHeightMap
				{
					map = Olei/PluginData/Fume_height.png
					offset = -500
					deformity = 5000
					scaleDeformityByRadius = False
					order = 10
					enabled = True
				}
				//VertexHeightNoiseVertHeightCurve2
				//{
				//	deformity = 8000
				//	ridgedAddFrequency = 35
				//	ridgedAddLacunarity = 4
				//	ridgedAddOctaves = 6
				//	ridgedAddSeed = 134713
				//	ridgedMode = Low
				//	ridgedSubFrequency = 27
				//	ridgedSubLacunarity = 4
				//	ridgedSubOctaves = 6
				//	ridgedSubSeed = 34544
				//	simplexFrequency = 50
				//	simplexHeightEnd = 2000
				//	simplexHeightStart = 500
				//	simplexOctaves = 4
				//	simplexPersistence = 0.6
				//	simplexSeed = 1346666
				//	order = 32
				//	enabled = True
				//	name = HeightNoiseV2
				//	simplexCurve
				//	{
				//		key = 0 0 0 0
				//		key = 0.3 0.1 0 0
				//		key = 0.4 0.2 0 0
				//		key = 0.5 0.3 1.659658 1.659658
				//		key = 1 0.5 3.005844 3.005844
				//	}
				//}
				HybridNoise
				{
					deformity = 5000	//Double, in meters, the maximum reach of the PQSMod
					seed = 3141592654	//Integer, generation seed
					frequency = 20	//Frequency of the HybridMultifractal noise
					lacunarity = 2	//Lacunarity of the HybridMultifractal noise
					octaves = 8		//Integer, the amount of octaves of the HybridMultifractal noise
					quality = Medium		//Enumerator, can be 'High', 'Medium' or 'Low'.
					offset = 0.1		//Float, not entirely sure what it does...
					enabled = True		//Boolean, should the mod be taken into account when building the terrain?
					order = 50		//Simple loadorder value.
				}
				VertexColorMap
				{
					map = Olei/PluginData/Fume_color.png
					order = 110
					enabled = True
				}
			}
        }

 

I think you don't know what an integer is exactly XD

The seed you entered is too high. The maximum value for an int32 is 2147483647. Placed under each other:

3141592654 - your entry

2147483647 -  max int32 value according to Microsoft

Hence why the log reads:

[LOG 09:03:19]: Parsing Target seed in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Int32])
[LOG 09:03:19]: Exception Was Recorded: Exception has been thrown by the target of an invocation.

Translated:

"I am about to parse the seed of the mod"

"Error! I can't read this, it's too great! Mind blown! I repeat, mind blown!"

Edited by The White Guardian
Link to comment
Share on other sites

10 minutes ago, The White Guardian said:

I think you don't know what an integer is exactly XD

The seed you entered is too high. The maximum value for an int32 is 2147483647. Placed under each other:

3141592654 - your entry

2147483647 -  max int32 value according to Microsoft

Hence why the log reads:

[LOG 09:03:19]: Parsing Target seed in (KLE.HybridNoise) as (Kopernicus.NumericParser`1[System.Int32])
[LOG 09:03:19]: Exception Was Recorded: Exception has been thrown by the target of an invocation.

Translated:

"I am about to parse the seed of the mod"

"Error! I can't read this, it's too great! Mind blown! I repeat, mind blown!"

Ahhh darn. Simple mistake on my behalf.

I tried to enter the numbers of Pi that i could remember as a celebratory seed. Looks like I need to knock off a few numbers. Cheers :)

Link to comment
Share on other sites

@GregroxMun about to write PQSMod_Ellipsoid. I'm going for a Vector3 approach when it comes to the axis deformity, so it needs to be entered as:

deformity = (A), (B), (C)

Which is then internally torn apart to three separate Double values which are then, if enabled, multiplied by the sphere deformity.

Edited by The White Guardian
Link to comment
Share on other sites

tFK5h9j.png

Hybrid noise is working really well for me, I love it :)

I just combined it with a Heightcurve2 PQSMod to add a bit more sharpness to the terrain (using persistence)

Edited by Gameslinx
Link to comment
Share on other sites

It may be worth adding altitude controls (height start and height end) for the Hybrid Noise, perhaps borrowing the altitude curve that VertexHeightNoiseVertHeightCurve2 uses to control the distribution of noise, otherwise this happens:

pl12UKy.png

(If you're confused, I mean this:)

					simplexHeightEnd = 2000
					simplexHeightStart = 500
					
					simplexCurve
					{
						key = 0 0 0 0
						key = 0.3 0.1 0 0
						key = 0.4 0.2 0 0
						key = 0.5 0.3 1.659658 1.659658
						key = 1 0.5 3.005844 3.005844
					}

 

Edited by Gameslinx
Link to comment
Share on other sites

  • 2 weeks later...

Will release an update this afternoon, featuring procedural rivers and, if I can get it done by then, CustomNoise.

CustomNoise operates similar to RiggedMultifractal, Perlin and Billow, except the ModuleBase (the noise itself) is integrated in the PQSMod and takes commands from the user, allowing the user to create a custom noise. Advanced stuff!

Link to comment
Share on other sites

  • 1 month later...
8 hours ago, SAS123 said:

I like stumbling onto new things. It really makes my day!

Thanks, and a big thank you for all of the motivation you've been giving me. So... any suggestions for PQSMods? Not everything is possible, but I'll try my best!

On 5/20/2017 at 2:06 PM, Gameslinx said:

It may be worth adding altitude controls (height start and height end) for the Hybrid Noise, perhaps borrowing the altitude curve that VertexHeightNoiseVertHeightCurve2 uses to control the distribution of noise, otherwise this happens:

pl12UKy.png

(If you're confused, I mean this:)


					simplexHeightEnd = 2000
					simplexHeightStart = 500
					
					simplexCurve
					{
						key = 0 0 0 0
						key = 0.3 0.1 0 0
						key = 0.4 0.2 0 0
						key = 0.5 0.3 1.659658 1.659658
						key = 1 0.5 3.005844 3.005844
					}

 

Sorry for being so late with responding to this, I just don't know how to use Floatcurves in C# atm, but I'll try my best.

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...