-
Notifications
You must be signed in to change notification settings - Fork 3
NGP 3DEP Workflow

If you have not completed Developer Set‐up, do that first
At this point you should have all packages installed, and a directory created with the script inside that you want to work in.

To gather heightmap data we're going to use https://apps.nationalmap.gov/downloader/.
You may have to create an account to download the tiles.
Select the area of interest, select Elevation Products (3DEP) and search products, find the tile you want to download and hit Download Link (TIF)
Place this tif file inside of the same folder as the script.

Inside of the _workflow.py, replace the bottom command with workflows.NGP_3DEP("HEIGHTMAP", "MY_MODPATH")
where HEIGHTMAP is the heightmap name, and MY_MODPATH is the path to your textures folder.
For my example this is:
workflows.NGP_3DEP("USGS_13_n27w100_20240925.tif", "Sol-Addons/PluginData/03_Earth/Tiles")

To gather colormap data we're going to be using SASPlanet.
To start, I highly advise pressing
on the top bar and pressing z15. A grid should appear, this will disappear as we start to download our imagery.
I also suggest you press View > Lat/Long Grid > 1°
On the top bar press the
down arrow and select by coordinate, then press the button

For this example I'm using USGS_13_n27w100_20240925. The coordinates listed in the 3DEP images are the upper left corner, meaning the first Lat should just be the same, and the first Long should be the same.
The second lat will be the lat -1, so N26 in this case, and the second long will be the long -1, or 99 in this case. Press apply.

Zooming in should yield something similar to this.
In the selection manager, go to the download section, on the left press 15. I personally check Close download window once finish but this is personal preference. Press start.
After the window disappears, hit the green selection button again, and press apply.
Go to the stitch section, input the path to your work directory into the save to box, the colormap name must be the coords followed by _color.tif
For USGS_13_n27w100_20240925 -> n27w100_color.tif``
Select which mapping service you'd like to use, I traditionally use Google - Satellite, select Zoom: 15, Press Start.
Your working directory should now look like this

Open a terminal and use python _workflow.py and the script should start.
You should be left with:

The text file the script generates is not recognized by KSP itself, but can simply be put in a module manager patch.
The raw output from the script:
BoundedDecal
{
heightMap = Sol-Addons/PluginData/03_Earth/Tiles/n27w100_Height.dds
colorMap = Sol-Addons/PluginData/03_Earth/Tiles/n27w100_Color.dds
offset = 42.361211566338596
deformity = 1478.4522392614633
maxLong = -99
minLong = -100
maxLat = 27
minLat = 26
order = 21
}
To turn this into a module manager patch we can wrap our BoundedDecal in:
@Kopernicus:AFTER[RealSolarSystem]
{
@Body[Earth]
{
@PQS
{
@Mods
{
// PQS Mods go here
}
}
}
}
Giving us the final form
@Kopernicus:AFTER[RealSolarSystem]
{
@Body[Earth]
{
@PQS
{
@Mods
{
BoundedDecal
{
heightMap = Sol-Addons/PluginData/03_Earth/Tiles/n27w100_Height.dds
colorMap = Sol-Addons/PluginData/03_Earth/Tiles/n27w100_Color.dds
offset = 42.361211566338596
deformity = 1478.4522392614633
maxLong = -99
minLong = -100
maxLat = 27
minLat = 26
order = 21
}
}
}
}
}
After placing our .DDS textures at the specified locations, the game should load our tiles properly.