Jump to content

[WIP] Kopernicus Expansion v0.2: comets, footprints, new PQSMods for Kopernicus


MrHappyFace

Recommended Posts

Hello, i got some problem with your addon.

If I manage to do well what I want with the stock planet, that's simply doesn't work with the kopernicus one :huh:

For exemple, i just change the target of @Body[Eve] in the glowing ocean exemple.

i just change the target from Eve to one of mine planet and nothing happen.

I change the files for modify Eve and that's work perfectly, so the problem doesn't come from my files but surely from the "targeting" system.

i really don't know what to do for this, if you have an idea... let me know (scuse my pity english)

Link to comment
Share on other sites

It's weekly development update time!

There aren't any screenshots because I mainly focused on the backend this week.

I worked on getting the creatures spawning in as parts, so that they'd persist through save loads, and respond correctly to time warp. This also has the added benefit of allowing me to include custom explosion effects, so that when they get overheated, or hit the ground too fast, they will explode in a cloud of blood (or magic dust, if you turn it off in the settings.)

I commited most of the development work I've done to the github repository, which was over 6000 lines of code, so you can check that out if you want to see more. (haha, funny git joke :D)

Link to comment
Share on other sites

And also, will aerial life in the atmosphere of gas giants be possible?

Yup, that's what the Squig is.

And what's the maximum size for a creature?

I'd imagine that it's 2.5km, the physics range, but there probably shouldn't be anything bigger than a few hundred meters, unless horrible bugs are fun for you.

Link to comment
Share on other sites

How dynamic will the aliens be? Can they attack our ships or Kerbals?

They can't attack your ships yet, but there is full BDArmory support now, including blood effects:

R53fLx4.gif

Gfycat: http://gfycat.com/SeparateSkeletalAsianlion

It's also a blood moon tonight, so hooray for bloody things!

There is a family friendly setting, if you want to turn off the blood effects.

Link to comment
Share on other sites

when do you predict the new version will come out?

Every time you ask, I push it back by a week :rolleyes:

Hey I dunno where to post this cuz kopernicus thread didn't tell, but how do I implement custom ground textures?

Next time, please don't ask generic Kopernicus questions in this thread, I answered you in the Kopernicus thread: http://forum.kerbalspaceprogram.com/threads/114649?p=2221230#post2221230

Link to comment
Share on other sites

Is it possible that you could add a feature i'd like to call "micro scatter" little things that only need to show up when really close, like blades of grass that wave in the wind or little boulders or crystals.... Maybe even add collision meshes, Though you might want to fix the stock scatter first for that matter :P

i cant believe squad was so lazy to leave out a collison mesh!

Link to comment
Share on other sites

Is it possible that you could add a feature i'd like to call "micro scatter" little things that only need to show up when really close, like blades of grass that wave in the wind or little boulders or crystals.... Maybe even add collision meshes, Though you might want to fix the stock scatter first for that matter :P

i cant believe squad was so lazy to leave out a collison mesh!

Dunno what you mean, but scatter collisions are automaticaly done by Kopernicus. Individual grass that is animated might be kind of memory intensive... We are already struggling with normal scatter afterall...

However, it would be awesome if we could generate scatter models based on a seed. PLZ and something like this:


Scatter
{
maxRadius = <max radius of scatter model>
maxHeight = <max height of model>
seed = <random seed>
color = <imput color in RGB numbers>
material = <if you want to specify a custom material>
type = <choose either tree, crystal or rock>
collidable = <true or false>
enabled = true
}

Link to comment
Share on other sites

Is it possible that you could add a feature i'd like to call "micro scatter" little things that only need to show up when really close, like blades of grass that wave in the wind or little boulders or crystals.... Maybe even add collision meshes, Though you might want to fix the stock scatter first for that matter :P

That's a pretty neat idea, I'll probably use it, thanks. :)

However, instead of making it only appear up close, I could just use particles. Grass is usually done with billboard textures, and particles ARE billboard textures, plus they're really, really optimized, so rendering thousands of them at a time wouldn't be a problem. I'd just need to manually position the particles, which isn't actually that hard. There is even support for UV animated particles, so waving grass could be done too.

Dunno what you mean, but scatter collisions are automaticaly done by Kopernicus. Individual grass that is animated might be kind of memory intensive... We are already struggling with normal scatter afterall...

However, it would be awesome if we could generate scatter models based on a seed. PLZ and something like this:


Scatter
{
[I]-snip-[/I]
}

I agree, the current implementation of ground scatter kind of sucks, and Kopernicus's implementation for configuring them is even worse. :P

Don't really know what to do about that though, I don't want to have to entirely rewrite LandControl just so I can have better scatter, and I can't really modify the stock code for scatter... Hmm :(

Edited by MrHappyFace
Link to comment
Share on other sites

That's a pretty neat idea, I'll probably use it, thanks. :)

However, instead of making it only appear up close, I could just use particles. Grass is usually done with billboard textures, and particles ARE billboard textures, plus they're really, really optimized, so rendering thousands of them at a time wouldn't be a problem. I'd just need to manually position the particles, which isn't actually that hard. There is even support for UV animated particles, so waving grass could be done too.

Well, hey calm down don't be sad. My idea was just Procedural Ground Scatter functioning on top of the existent system. Hope you manage to pull it of.BTW when wre you releasing the subteranean oceans? I'm right now overhauling the rest of Kerbol Plus for next update, and I have at least one moon waiting for your oceans to fill their interiors! (Sorry didn't mean to sound erotic)

Link to comment
Share on other sites

So I spent most of the last few days on a new feature, which I'm very happy about: Modular Noise

It adds a new PQS Mod to the game that allows you to mix noises together in virtually unlimited ways, by exposing almost all of LibNoise's (KSP's noise library) API to config files.

I'm sure KillAshley is going to love this...

I put together a tutorial for it here:

First, an example config:


PQS
{
Mods
{
ModularNoise
{
enabled = true
order = 10

deformity = 10000

finalNoise = PerlinNoise1
Noises
{
NOISE
{
name = PerlinNoise1
type = Perlin
frequency = 8
lacunarity = 2
persistence = 0.5
octaves = 5
seed = 123456
}
}
Operators
{
MULT
{
order = 0
applyTo = PerlinNoise1
X = 0.2
}
}
}
}
}

Let's go over each component of this config:

The first 2 lines are lines included in every PQS mod, whether it's enabled, and what position, or order, it is in the PQSMod list.

Next, there's the deformity property. It's the same as the deformity property in other PQSMods, It just determines the maximum height that this PQSMod's terrain will reach; in this case, 10 kilometers.

Now something interesting: the finalNoise property. It says which NOISE node is used to calculate the final value, which is then multiplied by deformity, and applied to the terrain.

Next, there's a Noise node, which can contain and arbitrary number ( ≥ 1 ) of NOISE nodes. This is basically a list of all the NOISE objects you can use. I'll explain it more later.

NOISE nodes describe NOISE objects. This config only has 1 NOISE object, which is named PerlinNoise1. You probably noticed that PerlinNoise1 is also what the finalNoise property is equal to. That means that the terrain is deformed based on whatever value is taken from PerlinNoise1.

Inside the NOISE node, there is a type and a name property, and some others.

The most important property is the type. There are 6 types of noise supported at the moment:

  1. Perlin noise
  2. Billow noise
  3. RidgedMultiFractal noise
  4. Voronoi noise
  5. Const noise
  6. ExDistPerlin noise

IMPORTANT NOTE: NOISE objects always return a value between 0 and 1, before operators are applied.

Noise Types

Perlin:

Perlin noise is just simple perlin noise. It looks like this:

jy6vGtV.png

It has 5 properties:

  1. seed: an integer between 0 and 2,147,483,647. The same seed will always output the same results.
  2. octaves: an integer between 1 and 30, determines how much detail is generated. The greater the number, the slower the terrain will generate, and the laggier your planet will be. Try to keep it below 8, but a value of 4 or 5 will suffice for most purposes.
  3. frequency: a number greater than 0 which determines how close together features are generated.
  4. lacunarity: a number greater than 0 which determines how much smaller features in one octave will be than the previous octave. The default value is 2
  5. persistence: a number between 0 and 1 which determines how large features in octaves will be compared to the previous octave. The default value is 0.5

These 5 properties are also used in Billow, RidgedMultiFractal, and ExDistPerlin noise types.

Billow:

Billow noise is just perlin noise with an absolute value function called on it. It looks like this:

T33rRzo.png

It has the exact same properties as Perlin noise.

RidgedMultiFractal:

RidgedMultiFractal noise (sometimes spelled RiggedMultiFractal) is a noise type that is very good for mountains. It looks like this:

gd7iBSI.png

It has the same properties as Perlin noise, except you don't need to set the persistence value.

Const:

Const noise isn't actually noise, it's just a constant value. It looks like this:

6hYoHsN.png

It has 1 property:

  • constantValue: whatever the constant value is. It can be any real number between -10304 and 1030. It's recommended you stay between -1 and 1

Voronoi:

Voronoi noise is very intersting. It's used to generate the Mun's procedural craters, among other things.

It can have 2 distinct looks, depending on how you configure it:

This:

4sUeJJ2.png

And this:

2917ZH9.png

It has 4 properties:

  • seed: an integer between 0 and 2,147,483,647. The same seed will always output the same results.
  • frequency: a number greater than 0 that determines how large the cells are. Similar to the frequency property in Perlin noise
  • displacement: a number between 0 and 1. determines how much cells are offset.
  • voronoiUseDistance: a true/false value that determines which one of those looks the noise will have. True will use the second one, and False will use the first one.

Keep in mind that if you don't have voronoiUseDistance set to true, there will be sudden changes in terrain height, which can result in really ugly cliffs.

ExDistPerlin:

ExDistPerlin (short for Exponentially Distributed Perlin) is a derivative of Perlin noise, created by a professor at UNT, which is exactly the same as Perlin noise, except for the fact that instead of having linearly distributed gradients, it has exponentially distributed gradients. This means that terrain features will be less evenly spaced, and will more closely model real life terrain. I highly suggest you look at the linked page, because the images explain it better than me.

image coming soon...

It has the same properties as Perlin noise, but with one extra property: mu

The mu property determines how the terrain features are distributed. A higher mu value means that there will be more flatter terrain, and less mountainous terrain. The default value is 1.0146, and a value of 1 is the same as regular perlin noise.

Operators

After the list of NOISEs, there is another list, called Operators, that contains all of the operators used. An operator is a basic function that can be applied to a NOISE object, such as MULT (multiplies it by X) or CLAMP (clamps the noise value between two values).

Every operator has at lease 2 properties:

  1. order: the order in the list this operator is in
  2. applyTo: the name of the NOISE object this operator affects. Operators can only affect this NOISE object, even if it uses 2 or more NOISE's.

In the example config, there is one operator, a MULT operator, which is in order 0 (is executes first) and it applies to PerlinNoise1.

There are currently 15 operators supported:

  1. ADD
  2. MULT
  3. MIN
  4. MAX
  5. EXPONENT
  6. ABS
  7. CLAMP
  8. CURVE
  9. DEFORMITYCURVE
  10. LATITUDECURVE
  11. LONGITUDECURVE
  12. SCALE
  13. TURBULENCE
  14. BLEND
  15. SELECT

I find that all of this is best explained with a flowchart:

This flowchart depitcts the config below


PQS
{
Mods
{
ModularNoise
{
enabled = true
order = 10

deformity = 8000

finalNoise = Blender
Noises
{
NOISE
{
name = PerlinNoise1
type = Perlin
frequency = 8
lacunarity = 2
persistence = 0.5
octaves = 5
seed = 123456
}
NOISE
{
name = RidgedMultiFractal1
type = RidgedMultiFractal
frequency = 3
lacunarity = 1.6
octaves = 6
seed = 654321
}
NOISE
{
name = Blender
type = Const
constantValue = 0.4
}
}
Operators
{
ADD
{
order = 1
applyTo = PerlinNoise1
X = 0.2
}
ADD
{
order = 1
applyTo = RidgedMultiFractal1
X = 0.6
}
BLEND
{
order = 2
applyTo = Blender
firstNoise = PerlinNoise1
secondNoise = RidgedMultiFractal1
}
}
}
}
}

5jSIZkC.png

In the flowchart, rounded rectangles are NOISE objects and ovals are operators.

ADD:

The ADD operator is a simple operator that adds a value to a noise. It can also add one NOISE's value to it's own value.

It has 2 properties:

  • applyFrom: the name of a noise to add to applyTo's value. It will also normalize the two values, meaning that if applyTo and applyFrom are equal to 1, then they will still be 1, because they were normalized.
  • X: If applyFrom is not set, then X is added to applyTo's value instead of applyFrom. It is a number that can have decimals.

NOTE: You can do subtraction by using a negative X value in this operator, or by using a MULT operator on applyFrom's NOISE object, with an X value of -1.

MULT:

The MULT operator is a simple operator that multiplies a value to a noise. It can also multiply it's own value by another NOISE's value.

It has 2 properties:

  • applyFrom: the name of a noise to multiply with applyTo's value.
  • X: If applyFrom is not set, then X is added to applyTo's value instead of applyFrom. It is a number that can have decimals.

MIN:

The MIN operator is an operator that selects the minimum of 2 NOISE object's values.

It has 1 property:

  • applyFrom: the name of the second NOISE object. Keep in mind that this will only affect applyTo's value, and not applyFrom's

MAX:

The MAX operator is an operator that selects the maximum of 2 NOISE object's values.

It has 1 property:

  • applyFrom: the name of the second NOISE object. Keep in mind that this will only affect applyTo's value, and not applyFrom's

NOTE: If you want to set a minimum or maximum hard value for a NOISE object, use CLAMP.

EXPONENT:

The EXPONENT operator is an operator that sets applyTo's value to the power of either X, or applyFrom's value

It has 1 property:

  • applyFrom: the name of the second NOISE object. Keep in mind that this will only affect applyTo's value, and not applyFrom's
  • X: the hard value that will be used if applyFrom is not set.

ABS:

The ABS operator is an operator that puts applyTo's value though an Absolute Value function.

This operator has no extra properties.

CLAMP:

The CLAMP operator is an operator that clamps applyTo's value between a minimum and a maximum.

It has 2 properties:

  • min: the minimum value
  • max: the maximum value

NOTE: Keep in mind that the minimum should be less than the maximum, or else things will break. :P

CURVE:

The CURVE operator is an operator that puts applyTo's value though a curve. The curve should be in the shape of whatever prominent terrain feature you need. If your curve looks like the image below, then your terrain will have plateaus.

slope.png

It has 1 property:

  • Curve: the curve that this noises's output will be put though

DEFORMITYCURVE:

The DEFORMITYCURVE operator is an operator that allows you to modify the deformity based on the preexisting height of the terrain. This way, you could make a noise that only gets applied in high areas.

It has 1 property:

  • DeformityCurve: the curve that this noises's output will be put though

LATITUDECURVE:

The LATITUDECURVE operator is an operator that puts applyTo's value though a curve, based on it's latitude. This allows you to have the poles of the planet (or some other arbitrary latitude range) not affected by this noise at all.

It has 2 properties:

  • LatitudeCurve: the curve that this noises's output will be put though, based on the latitude

LONGITUDECURVE:

The LONGITUDECURVE operator is an operator that puts applyTo's value though a curve, based on it's longitude. This allows you to have a range of longitudes on the planet (or some other arbitrary latitude range) not affected by this noise at all.

It has 2 properties:

  • LongitudeCurve: the curve that this noises's output will be put though, based on the longitude

SCALE:

The SCALE operator is an operator that pertubes applyTo's value so that you can

It has 3 properties:

  • XScale: the scale along the X axis.
  • YScale: the scale along the Y axis. Larger values will squish the planet's terrain pole to pole, and smaller values will stretch it.
  • ZScale: the scale along the Z axis.

NOTE: this does not actually stretch or squish the planet itself, just the terrain's shape. It's not a replacement for VertexHeightOblate.

TURBULENCE:

The TURBULENCE operator is an operator that randomly pertubes applyTo's value.

It has 6 properties:

  • seed: the same as a NOISE object's seed
  • frequency: the frequency of the pertubations. smaller values will result in larger scale pertubations.
  • lacunarity: the same as Perlin noise's lacunarity value. the default is 1.5
  • persistence: the same as Perlin noise's persistence value. the default is 0.5
  • roughness: an integer between 1 and 30. a good value is 3 or 4. similar to Perlin noise's octaves value.
  • power: a number greater than or equal to 0 that determines how powerful the pertubations are. A good value should be between 0 and 0.5. anything more, and there are diminishing returns. 0 means that the pertubations don't appear.

NOTE: this is the most resource intensive operator. Use it with care.

BLEND:

The BLEND operator is an operator that blends two noises together into applyTo's value. It selects between the 2 values using applyTo's value, so if applyTo's value is 0.4, it samples the first noise at 40%, and the second noise at 60%. This is where Const type NOISE objects are most useful, because you can use them to have a constant blend between the two values.

It has 2 properties:

  • firstNoise: the name of the first NOISE object
  • secondNoise: the name of the second NOISE object

It looks like this:

hKaDKGj.png

In that image, the bottom noise is applyTo, and the other two are firstNoise and secondNoise.

SELECT:

The SELECT operator is an operator that blends between two noises based on applyTo's value. It selects between the 2 values using applyTo's value.

It has 5 properties:

  • firstNoise: the name of the first NOISE object
  • secondNoise: the name of the second NOISE object
  • falloff: how large the gradient between the two noises is.
  • min: the minimum value for secondNoise to be set
  • max: the maximum value for secondNoise to be set

It looks like this:

zWlQfSh.png

In that image, the bottom noise is applyTo, and the other two are firstNoise and secondNoise.

Images from http://www.draw.io and http://libnoise.sourceforge.net

Also, to avoid a double post...

Help me, I have 0.4 Kopernicus, but...

http://i.imgur.com/ss7wxAm.png

The UI and stuff works, except the planets don't.

I'm not sure what's going on there, but it looks like an issue with the texture rather than the shader. Try converting the image to a .png file. If you had a texture with solid colors like that, then you'd get that look.

Also, KopernicusExpansion does not officially support Kopernicus 0.4 yet. This is in development, so don't expect perfection. :P

For what it's worth, send me your output_log.txt folder (found in KSP/KSP_data/ folder) and I'll see what might have happened

Edited by MrHappyFace
fixed images
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...