Jump to content

Planet surface loading badly, Sunlight hitting wrong face of planet, and Textures not loading


Recommended Posts

I'm trying my hand at making a planet for KSP and have been getting lots of problems.

first, here is an image of what I'm talking about when I say the planet surface is loading badly: image, image, image

 

Secondly, when viewing the planet in Scaled Space, the sunlight is lighting the incorrect side of the planet (as you can see in this image)

 

Thirdly, it appears the textures for my planet are not loading in Scaled Space (and look even worse in flight), even though I have them linked in the config. I'll be honest, all my maps are the same texture because I'm super bad at texturing and wanted something quick to just make sure the planet was working (they're all grayscale heightmaps, but I figured that wouldn't be an issue. I'd just have a black-and-white planet).

 

Fourthly, my heightmap isn't effecting my planet's height mesh very much. Is there a way to increase the effect of my heightmap.

 

I'll also include an image of my heightmap (which is also the same as my normal and texture maps)

https://imgur.com/b2Zspyp

and a copy of my config here in a spoiler bar.

Spoiler

@Kopernicus:AFTER[Kopernicus]
{
    Body
    {
        name = Delta
        cacheFile = TEST\cache\Delta.bin
        

        Template
        {
            name = Dres
            removeAllPQSMods = true
            removeOcean = true
            removeAtmosphere = true
        }


        Properties
        {
            description = Moon of [planet name undesided]. Thought to be much older than it's mother planet, evidence of intense geologic activity has been discovered by telescopes orbiting Kerbin.
            radius = 5000000
            geeASL = 0.2
            rotationPeriod = 36000
            rotates = true
            initialRotation = 0
            tidallyLocked = false
            isHomeWorld = false
            timewarpAltitudeLevels = 0 5000 30000 60000 100000 300000 600000 800000
            sphereOfInfluence = 500000000
            ScienceValues
            {
                landedDataValue = 19
                inSpaceLowDataValue = 9
                inSpaceHighDataValue = 8
                spaceAltitudeThreshold = 100000
            }
        }


        biomeMap = TEST\PluginData\biomeMap_Delta.dds
        Biomes
        {
            Biome
            {
                name = Ventura Basin
                value = 1.4
                color =
            }
            
            Biome
            {
                name = Jaspen Seabed
                value = 1.9
                color = 
            }

            Biome
            {
                name = Shoreline
                value = 1.3
                color = 
            }

            Biome
            {
                name = Plateau
                value = 1.8
                color = 
            }

            Biome
            {
                name = Peaks
                value = 2.3
                color = 
            }

            Biome
            {
                name = Tectonic Ridge
                value = 2.5
                color = 
            }

            Biome
            {
                name = Almacca South Flipped Pole
                displayName = Almacca
                value = 3.6
                color = 
            }

            Biome
            {
                name = Dreznov North Flipped Pole
                display Name = Dreznov
                value = 3.4
                color = 
            }
        }


        Orbit
        {
            referenceBody = Sun
            inclination = .07
            eccentricity = .05
            semiMajorAxis = 20000000000
            longitudeOfAscendingNode = 120
            argumentOfPeriapsis = 12
            meanAnomalyAtEpochD = 275
            color = 0, .15, .28, .6
        }


        ScaledVersion
        {
            type = Vacuum
            fadeStart = 29000
            fadeEnd = 30000
            sphericalModel = false
            deferMesh = false
            invisible = false
            Material
            {
                texture = TEST\PluginData\textureMap_Delta.dds
                normals = TEST\PluginData\normalMap_Delta.dds
                shininess = 0.3
            }
        }


        PQS
        {
            Mods
            {
                VertexHeightMap
                {
                    map = TEST\PluginData\heightMap_Delta.dds
                    offset = -1000
                    deformity = 12500
                    scaleDeformityByRadius = false
                    order = 20
                    enabled = true
                }
                VertexHeightNoiseVertHeightCurve2
                {
                    deformity = 100
                    ridgedAddSeed = 123456
                    ridgedAddFrequency = 12
                    ridgedAddLacunarity = 2
                    ridgedAddOctaves = 4
                    ridgedSubSeed = 654321
                    ridgedSubFrequency = 12
                    ridgedSubLacunarity = 2
                    ridgedSubOctaves = 4
                    simplexCurve
                    {
                        key = 0 0 0.1466263 0.1466263
                        key = 0.7922793 0.2448772 0.6761706 1.497418
                        key = 1 1 6.106985 6.106985
                    }
                    simplexHeightStart = 0
                    simplexHeightEnd = 6500
                    simplexSeed = 123456
                    simplexOctaves = 4
                    simplexPersistence = 0.6
                    simplexFrequency = 12
                    enabled = true
                    order = 200
                }
                HeightColorMap
                {
                    blend = 1
                    order = 500
                    enabled = true
                    LandClasses
                    {
                        Class
                        {
                            name = Bottom
                            altitudeStart = 0
                            altitudeEnd = 0.7
                            color = 0.1,0.1,0.1,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Base
                            altitudeStart = 0.7
                            altitudeEnd = 0.75
                            color = 0.7,0.55,0.2,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Low
                            altitudeStart = 0.75
                            altitudeEnd = 0.85
                            color = 0.7,0.6,0.4,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Grad
                            altitudeStart = 0.85
                            altitudeEnd = 0.95
                            color = 1.0,0.9,0.7,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = High
                            altitudeStart = 0.95
                            altitudeEnd = 2
                            color = 0.95,0.95,0.9,1.0
                            lerpToNext = false
                        }
                    }
                }
            }
        }
    }
}

I have the Biome classes defined but currently do not have a biome map. My PQS mods are simply copy and pasted from this tutorial

My guess is that the issue is in my PQS mods, but I really have no idea what I'm doing with those

I'll also add, I am using Wilbur to get the height map, GIMP to edit it, and Visual Studio to config

Link to comment
Share on other sites

  • 2 weeks later...

Let's see....

Spoiler

@Kopernicus:AFTER[Kopernicus]
{
    Body
    {
        name = Delta
        cacheFile = TEST\cache\Delta.bin
        

        Template
        {
            name = Dres
            removeAllPQSMods = true
            removeOcean = true
            removeAtmosphere = true //You don't need this because Dres doesn't have an atmosphere in the first place.
        }


        Properties
        {
            description = Moon of [planet name undesided]. Thought to be much older than it's mother planet, evidence of intense geologic activity has been discovered by telescopes orbiting Kerbin.
            radius = 5000000 //At the moment, your planet/moon is 5,000,000 m in radius (which is really big). Kerbin is only 600,000 m in radius. Maybe this is what you want, I'm just making note of it.
            geeASL = 0.2
            rotationPeriod = 36000
            rotates = true
            initialRotation = 0
            tidallyLocked = false
            isHomeWorld = false
            timewarpAltitudeLevels = 0 5000 30000 60000 100000 300000 600000 800000
            sphereOfInfluence = 500000000 //If you exclude this, the game will calculate it for you. Again, maybe this was intentional.
            ScienceValues
            {
                landedDataValue = 19
                inSpaceLowDataValue = 9
                inSpaceHighDataValue = 8
                spaceAltitudeThreshold = 100000
            }
        }


        biomeMap = TEST\PluginData\biomeMap_Delta.dds
        Biomes
        {
            Biome
            {
                name = Ventura Basin
                value = 1.4
                color =
            }
            
            Biome
            {
                name = Jaspen Seabed
                value = 1.9
                color = 
            }

            Biome
            {
                name = Shoreline
                value = 1.3
                color = 
            }

            Biome
            {
                name = Plateau
                value = 1.8
                color = 
            }

            Biome
            {
                name = Peaks
                value = 2.3
                color = 
            }

            Biome
            {
                name = Tectonic Ridge
                value = 2.5
                color = 
            }

            Biome
            {
                name = Almacca South Flipped Pole
                displayName = Almacca
                value = 3.6
                color = 
            }

            Biome
            {
                name = Dreznov North Flipped Pole
                display Name = Dreznov
                value = 3.4
                color = 
            }
        }


        Orbit
        {
            referenceBody = Sun
            inclination = .07
            eccentricity = .05
            semiMajorAxis = 20000000000
            longitudeOfAscendingNode = 120
            argumentOfPeriapsis = 12
            meanAnomalyAtEpochD = 275
            color = 0, .15, .28, .6
        }


        ScaledVersion
        {
            type = Vacuum
            fadeStart = 29000
            fadeEnd = 30000
            sphericalModel = false //You can leave out this...
            deferMesh = false //...and this...
            invisible = false //...and this....your planet should function as normal by default, don't worry.
            Material //Make sure you don't have any typos or wrong file paths here. That's most likely why the surface is all wonky.
            {
                texture = TEST\PluginData\textureMap_Delta.dds //Scaled Space, will mess with terrain loading if wrong.
                normals = TEST\PluginData\normalMap_Delta.dds //Normal map, will mess with how the sun reflects off your planet/moon if wrong. I recommend using KittopiaTech to generate the normal map for you.
                shininess = 0.3
            }
        }


        PQS //Make sure your height map is varied in darkness/lightness. That way, the PQS mods will be more apparent.
        {
            Mods
            {
                VertexHeightMap 
                {
                    map = TEST\PluginData\heightMap_Delta.dds //Again, check for typos and wrong file paths. This might be why PQS mods don't seem to work for you.
                    offset = -1000
                    deformity = 12500 //Plenty high enough to make huge mountains.
                    scaleDeformityByRadius = false
                    order = 20 //Be careful with the "order". I'm not entirely sure, but messing around with the order can mess up how your planet/moon loads.
                    enabled = true
                }
                VertexHeightNoiseVertHeightCurve2
                {
                    deformity = 100
                    ridgedAddSeed = 123456
                    ridgedAddFrequency = 12
                    ridgedAddLacunarity = 2
                    ridgedAddOctaves = 4
                    ridgedSubSeed = 654321
                    ridgedSubFrequency = 12
                    ridgedSubLacunarity = 2
                    ridgedSubOctaves = 4
                    simplexCurve
                    {
                        key = 0 0 0.1466263 0.1466263
                        key = 0.7922793 0.2448772 0.6761706 1.497418
                        key = 1 1 6.106985 6.106985
                    }
                    simplexHeightStart = 0
                    simplexHeightEnd = 6500
                    simplexSeed = 123456
                    simplexOctaves = 4
                    simplexPersistence = 0.6
                    simplexFrequency = 12
                    enabled = true
                    order = 200
                }
                HeightColorMap
                {
                    blend = 1
                    order = 500
                    enabled = true
                    LandClasses
                    {
                        Class
                        {
                            name = Bottom
                            altitudeStart = 0
                            altitudeEnd = 0.7
                            color = 0.1,0.1,0.1,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Base
                            altitudeStart = 0.7
                            altitudeEnd = 0.75
                            color = 0.7,0.55,0.2,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Low
                            altitudeStart = 0.75
                            altitudeEnd = 0.85
                            color = 0.7,0.6,0.4,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = Grad
                            altitudeStart = 0.85
                            altitudeEnd = 0.95
                            color = 1.0,0.9,0.7,1.0
                            lerpToNext = true
                        }
                        Class
                        {
                            name = High
                            altitudeStart = 0.95
                            altitudeEnd = 2
                            color = 0.95,0.95,0.9,1.0
                            lerpToNext = false
                        }
                    }
                }
            }
        }
    }
}

Other than the points mentioned in the spoiler box above, everything seems fine.

Edited by wpetula
Link to comment
Share on other sites

On 8/22/2021 at 11:58 AM, wpetula said:

Other than the points mentioned in the spoiler box above, everything seems fine.

Thanks for the response!

 

I assume there must be some issues with my texture maps. It seems like, from your points, that is the only place where there could be serious issues.

Link to comment
Share on other sites

On 8/23/2021 at 6:24 PM, wpetula said:

I just noticed something.

Here's one of your file paths: TEST\PluginData\heightMap_Delta.dds 

Try reversing the slashes. So, for the file path above, it would be: TEST/PluginData/heightMap_Delta.dds 

Ah shoot! Nice catch, I thought to myself "you know these slashes might be the wrong way around" but didn't even think about it!

Link to comment
Share on other sites

@wpetula figured I'd tag you to ask a little question.

 

I think I figured out the issue with the lighting coming from the wrong direction. I rebuilt the ScaleSpace textures with Kittopia Tech and this fixed the lighting issue. Any idea how I can force it to do this on load/implement a fix in my config? thanks

Link to comment
Share on other sites

If you go into the KittopiaTech folders, you can retrieve the new textures it generated. You only need the normal map, as using the height map will mess with your landscape. Copy the KittopiaTech texture into your mod folder and use it instead.

If your celestial body has oceans, there's an extra step. The KittopiaTech color map will look different than your color map; it's what I call a "water map". Copy the water map into your mod folder, then go into the config and change the ScaledSpace color map from yours to KittopiaTech's. You do not need to change the files paths in the PQS section. If all goes well, your world will have oceans when viewed from space, and the oceans will be shiny as opposed to the land.

Edited by wpetula
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...