Jump to content

[Early development, 0.24] Kopernicus Planetary System Modifier


Recommended Posts

Confirmed, the same happened to me. I even reorbited after hyperedit landing on mun, and re-landed from high mun orbit - when the detailed ground unloads, and the ground showed up normally. This is a really weird bug, haha. But yes, when loading or going to the ships from the tracking center, the mun is completely black.

I think I solved this, check out the development dll. You'll also need to grab the updated System.cfg. Basically I just wrote a custom material for the moon that mimics the Mun's material except for the bits that were causing problems (globalDensity parameter)

https://github.com/BryceSchroeder/Kopernicus/tree/development/Distribution

Ok Tek, I'm doing something wrong converting the planet over from KopernicusTech. Here's my CFG;

http://pastebin.com/yvk8ZbP3

But I keep getting this during the game loading:

AddonLoader: Instantiating addon 'Injector' from assembly 'Kopernicus'

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

IndexOutOfRangeException: Array index is out of range.
at Kopernicus.Configuration.Loader.Generate () [0x00000] in <filename unknown>:0

at Kopernicus.Injector.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelWasLoaded(Int32)

(Filename: Line: -1)

And then as soon as I go to the map view this gets spammed incessantly;

InvalidOperationException: Operation is not valid due to the current state of the object
at System.Linq.Enumerable.First[StarComponent] (IEnumerable`1 source) [0x00000] in <filename unknown>:0

at Kopernicus.StarLightSwitcher.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

And nothing show up. IDK if I'm just putting the files in the wrong place or what?

kopernicus.dll is at GameData/Kopernicus/Kopernicus.dll

And the planet is at GameData/Pactus/KopernicusPlanet.cfg with the normal, height, and texture maps in the locations defined in KopernicusPlanet.cfg

Any ideas?

I just copied your custom planet example and plugged in the information I had from the planet which was working, and tried to adapt it to Kopernicus's syntax, but no dice. :\

Could you post the Kopernicus.log, the log of whatever body you made, and the config? You can find them in KSPRoot/Logs/. I've added a custom logging system which outputs a default log for the mod and per body logs during loading so you can see what happens.

Link to comment
Share on other sites

This is the whole log;

[LOG 21:33:32]: Logger "Kopernicus" was created

[LOG 21:33:32]: Injector.Awake(): Begin

[LOG 21:33:35]: [Kopernicus]: RuntimeUtility Started

[LOG 21:33:35]: StarLightSwitcher.Awake(): Begin

[LOG 21:41:22]: Injector.OnDestroy(): Complete

The CFG was posted as a pastebin link in my last post.

Link to comment
Share on other sites

Can it be a subfolder of PluginData?

Yes, you can have any folder structure under PluginData/ that you want. Anything that is a subdirectory/file of PluginData/ is ignored by the game's loader.

- - - Updated - - -

Pre-Alpha 6 (0.0.6) is released

https://github.com/BryceSchroeder/Kopernicus/releases/tag/pre-alpha-06

- - - Updated - - -

This is the whole log;

[LOG 21:33:32]: Logger "Kopernicus" was created

[LOG 21:33:32]: Injector.Awake(): Begin

[LOG 21:33:35]: [Kopernicus]: RuntimeUtility Started

[LOG 21:33:35]: StarLightSwitcher.Awake(): Begin

[LOG 21:41:22]: Injector.OnDestroy(): Complete

The CFG was posted as a pastebin link in my last post.

I've looked over the planet config and found a few errors.

When specifying textures and maps, drop the GameData/ prefix, it's assumed by the mod. Also, in the flatten ocean PQS mod config, you specified "falsed" not "false". This caused an exception. After those changes it fired up just fine on 0.0.6.

Link to comment
Share on other sites

I've looked over the planet config and found a few errors.

When specifying textures and maps, drop the GameData/ prefix, it's assumed by the mod. Also, in the flatten ocean PQS mod config, you specified "falsed" not "false". This caused an exception. After those changes it fired up just fine on 0.0.6.

That's all that you did? Because I did that and I still can't get it to work on 06. Can you send me the one you got fixed so I can compare it to mine and see what I'm missing? I'm getting really frustrated and thinking it's got to be something with the file structure maybe, but i just don't get it. The Kopernicus folder is in GameData, and the Pactus folder is in GameData as well. that's correct right?

Edit; The bone example planet w/o any other changes doesn't work either. One thing I'm noticing, module manager isn't applying any patches. (Yes, I have it installed, it just says 0 patches applied)

Edited by Yargnit
Link to comment
Share on other sites

That's all that you did? Because I did that and I still can't get it to work on 06. Can you send me the one you got fixed so I can compare it to mine and see what I'm missing? I'm getting really frustrated and thinking it's got to be something with the file structure maybe, but i just don't get it. The Kopernicus folder is in GameData, and the Pactus folder is in GameData as well. that's correct right?

Edit; The bone example planet w/o any other changes doesn't work either. One thing I'm noticing, module manager isn't applying any patches. (Yes, I have it installed, it just says 0 patches applied)

Yup, it's all i did. I substituted for my own textures for testing purposes, but here's the config changed as above.

https://gist.github.com/Teknoman117/d78888940cc3fe35553c

Could you just install the base config of kopernicus (no mm, updated System.cfg, updated DLL) with no mods and see what happens? If the kopernicus log is still borked then something is wrong with Kopernicus or your KSP install is damaged.

Edited by Teknoman117
Link to comment
Share on other sites

Ok, I'm making progress... When I downloaded kopernicus.dll earlier, I literally downloaded kopernicus.dll. I didn't know I needed other files with it. And when I got .06 I just overwrote it.

It's still not working but I'm getting different errors now.

Both your example planer, and mine are erroring here now in you logs;

[LOG 01:15:00]: [Kopernicus]: Body.PostApply(ConfigNode): Generating scaled space mesh: Impa
[LOG 01:15:00]: Exception Was Recorded: Object reference not set to an instance of an object
at PQSMod_VertexHeightMap.OnVertexBuildHeight (.VertexBuildData data) [0x00000] in <filename unknown>:0
at Kopernicus.Configuration.Body.ComputeScaledSpaceMesh (.PSystemBody body) [0x00000] in <filename unknown>:0
at Kopernicus.Configuration.Body.PostApply (.ConfigNode node) [0x00000] in <filename unknown>:0
at Kopernicus.Configuration.Parser.LoadObjectFromConfigurationNode (System.Object o, .ConfigNode node) [0x00000] in <filename unknown>:0
at Kopernicus.Configuration.Parser.CreateObjectFromConfigNode[Body] (.ConfigNode node) [0x00000] in <filename unknown>:0
at Kopernicus.Configuration.Loader.Generate () [0x00000] in <filename unknown>:0

Edit; I got mine to work!

But your example planet still doesn't work funny enough.

Edited by Yargnit
Link to comment
Share on other sites

Did you put the example planet folder in a subfolder called KopernicusExamples/ in GameData/?

Typing this out makes this seem like a stupid idea...

That would be a no... this is what happens when I'm when I get back out of bed and back on my computer after seeing on my tablet you'd replied to me, when I'm tired and frustrated. :\

Now if you could tell me why my scaled space looks like this: http://i.imgur.com/Lp6Ty3n.png :\ If it helps, my normals look like this: http://i.imgur.com/yYg7ejH.png and not the almost totally gray things you have?

Link to comment
Share on other sites

That would be a no... this is what happens when I'm when I get back out of bed and back on my computer after seeing on my tablet you'd replied to me, when I'm tired and frustrated. :\

Now if you could tell me why my scaled space looks like this: http://i.imgur.com/Lp6Ty3n.png :\ If it helps, my normals look like this: http://i.imgur.com/yYg7ejH.png and not the almost totally gray things you have?

Lol. I got back out of bed to post that config when I read the KSP forums on my tablet.....

- - - Updated - - -

That would be a no... this is what happens when I'm when I get back out of bed and back on my computer after seeing on my tablet you'd replied to me, when I'm tired and frustrated. :\

Now if you could tell me why my scaled space looks like this: http://i.imgur.com/Lp6Ty3n.png :\ If it helps, my normals look like this: http://i.imgur.com/yYg7ejH.png and not the almost totally gray things you have?

Oh, Unity has a different normals format. Dunno why but its stupid. Let me go bug NathanKell, he has a tool I think...

Link to comment
Share on other sites

Kopernicus may have cached an older scaled space mesh on you. Delete the GameData/Kopernicus/Cache folder to clear them. Or if you're editing the PQS a lot, we currently have a intermediate solution of creating an empty file called "DEBUG" in the Cache folder to prevent kopernicus from loading cached versions.

Link to comment
Share on other sites

so with the whole PluginData structure, is it alright to have multiple PluginData folders? Im reorganising my mod as i port from kopernicustech and wanted to do this:


GameData->New_Horizons->KopernicusFiles->NewHorizonPlanets->Arin->PluginData
->Textures
->Astid->PluginData
->Textures
->Atell->PluginData
->Textures
->Derso->PluginData
->Textures

would that work properly? or should i only have one PluginData folder?

Link to comment
Share on other sites

so with the whole PluginData structure, is it alright to have multiple PluginData folders? Im reorganising my mod as i port from kopernicustech and wanted to do this:


GameData->New_Horizons->KopernicusFiles->NewHorizonPlanets->Arin->PluginData
->Textures
->Astid->PluginData
->Textures
->Atell->PluginData
->Textures
->Derso->PluginData
->Textures

would that work properly? or should i only have one PluginData folder?

This works just fine

- - - Updated - - -

Ok, clearing the cache has gotten me to this point: http://i.imgur.com/1d4PBhB.png So it's showing elevation, it's just ugly as hell lol.

I'll see if I can track down a tool to convert them to unity normal maps in the morning. Excerpt from the unity forums "However, in all other cases it appears, Unity uses a specialized coding, storing the x-fraction in a, and the y-fraction in g. red and blue are ignored. I guess this is done to allow encoding of 16bit normal maps, where it would store the 16bit x-fraction in b+a, and the y-fraction in r+g."

Link to comment
Share on other sites

I'll see if I can track down a tool to convert them to unity normal maps in the morning. Excerpt from the unity forums "However, in all other cases it appears, Unity uses a specialized coding, storing the x-fraction in a, and the y-fraction in g. red and blue are ignored. I guess this is done to allow encoding of 16bit normal maps, where it would store the 16bit x-fraction in b+a, and the y-fraction in r+g."

That was almost in a language i understood... ;) BTW, reverse rotating planets seem extremely buggy. (At least my guess is that's the cause) While flying in and out of the atmosphere after landing I had a tendency to... warp to other locations on the map. Sometimes embedded in the ground even, causing an instant explosion. People had sad KopTech has issues also, but I never experienced this one myself with the planet in it.

I'm going to call it there. 3 hours later than I intended, but at least I got something working. Thanks for all your help man. :D Get some sleep yourself ;)

Link to comment
Share on other sites

well from what i can tell from porting New Horizons to kopernicus, using just kopernicus and not koptech has fixed the issue i had of ships dissapearing from Kerbin's SOI when quitting the game. Thast the best thing i could've hoped for, YAY! (now to wait for the contract bug to be fixed........)

Link to comment
Share on other sites

It works very well for the Mun, tough i'm still fighting the darkness on my test planet (one without a template).

This is what KSP-log says (the "[sTX][bEL]" part was added by me, couldn't copy/paste these additional chars):

[WRN 17:16:35.781] Cannot find preset 'Default' for pqs 'Nautilus'
[LOG 17:16:35.812] [CelestialBody]: Kerbin's solar day length is 1d, 0h, 0m long. sidereal day length is 5h, 59m, 59s long
[WRN 17:16:35.859] HighlightingSystem : Framebuffer depth data is not available and can't be used to occlude highlighting. Highlighting occluders enabled.
[EXC 17:16:35.906] NullReferenceException: Object reference not set to an instance of an object
Kopernicus.Injector.PostSpawnFixups ()
EventVoid.Fire ()
PSystemManager+[STX][BEL].MoveNext ()

I only have the Sun, Kerbin and my test planet with the following config:

@Kopernicus:AFTER[Kopernicus]
{
Body
{
name = Nautilus
flightGlobalsIndex = 20

Properties
{
description = Nautilus description
radius = 54200
mass = 2.365E+18
geeASL = 0.537
rotationPeriod = 88642.6848
rotates = true
tidallyLocked = false
initialRotation = 0
isHomeWorld = false
timewarpAltitudeLimits = 0 30000 30000 60000 100000 300000 600000 800000
}

ScienceValues
{
landedDataValue = 8
splashedDataValue = 1
flyingLowDataValue = 5
flyingHighDataValue = 5
inSpaceLowDataValue = 7
inSpaceHighDataValue = 5
recoveryValue = 5
flyingAltitudeThreshold = 12000
spaceAltitudeThreshold = 140000
}

Orbit
{
referenceBody = Kerbin
inclination = 2
eccentricity = 0
semiMajorAxis = 24986000
longitudeOfAscendingNode = 0
argumentOfPeriapsis = 0
meanAnomalyAtEpoch = 0
epoch = 0
color = 1,0,0.25,1
}

ScaledVersion
{
type = Vacuum
fadeStart = 95000
fadeEnd = 97000

Material
{
texture = Nautilus/Textures/Color
normals = Nautilus/Textures/Normals
shininess = 0.95
specular = 0.5,0.5,0.5,1.0
}
}

PQS
{
maxQuadLengthsPerFrame = 0.03
minLevel = 2
maxLevel = 12
minDetailDistance = 8

// Custom PQS material
materialType = AtmosphericOptimized
Material
{
saturation = 1
contrast = 1
tintColor = 0.6,0.6,0.6,0.000

powerNear = 0.75
powerFar = 0.75
groundTexStart = 0
groundTexEnd = 40000

steepPower = 1
steepTexStart = 20000
steepTexEnd = 50000
steepTex = BUILTIN/lunar cliff face
steepBumpMap = BUILTIN/Cliff (Layered Rock)_NRM
steepNearTiling = 1
steepTiling = 2

lowTex = BUILTIN/RockyGround
lowBumpMap = BUILTIN/RockyGround2
lowNearTiling = 1200
lowMultiFactor = 5
lowBumpNearTiling = 1200
lowBumpFarTiling = 5

midTex = BUILTIN/RockyGround
midBumpMap = BUILTIN/RockyGround2
midNearTiling = 1000
midMultiFactor = 4
midBumpNearTiling = 1000
midBumpFarTiling = 4

highTex = BUILTIN/RockyGround
highBumpMap = BUILTIN/RockyGround2
highNearTiling = 800
highMultiFactor = 3
highBumpNearTiling = 800
highBumpFarTiling = 3

lowStart = 0.2
lowEnd = 0.4
highStart = 0.6
highEnd = 0.7

globalDensity = -8E-06
}
Mods
{
VertexColorMap
{
map = Nautilus/Textures/Color.png
order = 500
enabled = true
}
VertexHeightMap
{
map = Nautilus/Textures/Height.png
offset = -1000.0
deformity = 1000.0
scaleDeformityByRadius = false
order = 20
enabled = true
}
VertexSimplexHeight
{
seed = 670000
deformity = 1700.0
octaves = 12.0
persistence = 0.5
frequency = 4.0
enabled = true
order = 21
}
VertexSimplexNoiseColor
{
seed = 45
blend = 1.0
colorStart = 0.768656731,0.6996614,0.653089464,1
colorEnd = 0,0,0,1
octaves = 12.0
persistence = 0.5
frequency = 2.0
enabled = true
order = 200
}
HeightColorMap
{
blend = 0.7
order = 201
enabled = true
}
VertexHeightNoise
{
noiseType = RiggedMultifractal
deformity = 1000.0
seed = 5906
frequency = 2.0
lacunarity = 2.5
persistance = 0.5
octaves = 4
mode = Low
enabled = true
order = 22
}
VertexSimplexHeightAbsolute
{
seed = 4234
deformity = 400
octaves = 6.0
persistence = 0.5
frequency = 18.0
enabled = true
order = 30
}
AltitudeAlpha
{
atmosphereDepth = 4000.0
invert = false
enabled = false
order = 999999999
}
AerialPerspectiveMaterial
{
globalDensity = -0.00001
heightFalloff = 6.75
atmosphereDepth = 150000
DEBUG_SetEveryFrame = true
cameraAlt = 0
cameraAtmosAlt = 0
heightDensAtViewer = 0
enabled = true
order = 100
}
FlattenOcean
{
oceanRadius = 1.0
enabled = true
order = 25
}
}
}
}
}

I don't know if that is of any help, but the darkness fades away if an object is nearer than 100km. I suppose in the map view the nearest zoom is further away than that, as the darkness persist's there even when landed.

Also, after a planet is loaded for the first time (the creation of the .bin in the cache) it looks hideous like this (the white is some weird reflection of light). It's my colormap without anything applied. Same thing with the 100km distance, and after a restart of KSP (when it reads the .bin from the cache) it applies the mesh and shaders, thus creating the darkness.

FxHS8EB.png

Hope this is any help, because otherwise it seems to work great. And, for the time being, this darkness is kind of a nice "feature", we can discover our own planets ;)

Link to comment
Share on other sites

lol the only reason i know that is because i did the same thing as you, kept ramping it up until i realised it was only getting worse, so i put it down and voila!

you can also set colors for the shine aswell, i made my planets that are closest to the sun have a more yellow-is hue, whereas the further ones are whiter, the specular option is just another RGB option

Link to comment
Share on other sites

well from what i can tell from porting New Horizons to kopernicus, using just kopernicus and not koptech has fixed the issue i had of ships dissapearing from Kerbin's SOI when quitting the game. Thast the best thing i could've hoped for, YAY! (now to wait for the contract bug to be fixed........)

There is a tentative fix for that bug in the 0.0.6 release. As I personally have no idea what the bug looks like in game, i'm relying on those who saw it to go and test it for me.

Link to comment
Share on other sites

lol the only reason i know that is because i did the same thing as you, kept ramping it up until i realised it was only getting worse, so i put it down and voila!

you can also set colors for the shine aswell, i made my planets that are closest to the sun have a more yellow-is hue, whereas the further ones are whiter, the specular option is just another RGB option

Well, when I saw shiniess, I just thought that a planet doesn't need it and so I always turned it to 0. Also I didn't know about what you can do with those specular RGB values...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...