Skip to content

pkmniako/Kopernicus_VertexMitchellNetravaliHeightMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check the wiki for updated information.

Better Heightmap Algorithm for Kerbal Space Program

Mod for Kerbal Space Program that adds a custom PQS Mod which implements a variant of VertexHeightMap using Mitchell-Netravali Filtering instead of Bilineal Filtering.

This reduces the amount of pixelization at cliffs and other decently-detailed areas of a heightmap.

This mod still requires testing (Just in case), so use it with caution.


Usage

With a compiled .dll file inside the GameData, you can use the VertexMitchellNetravaliHeightMap PQS Mod in Kopernicus Configuration Files.

The PQSs mod also contains two new parameters: B and C. These control what type of filtering is done. Values B = 1/3, C = 1/3 and B = 1, C = 0 have been tested and yield decent results (Though the later is by far the most smooth).

An example of a VertexMitchellNetravaliHeightMap node:

VertexMitchellNetravaliHeightMap
{
	map = 000_TESTING/PluginData/Niko_height.png
	offset = -1920
	deformity = 7100
	scaleDeformityByRadius = false
	order = 1
	enabled = true

	B = 0.33333333
	C = 0.33333333
}

By default, B and C are equal to 1/3.



Comparison

VertexMitchellNetravaliHeightMap, B = 1, C = 0

VertexHeightMap, Stock



Compilation

Make sure all .dll paths at VertexBilinealHeightMap/VertexBilinealHeightMap.csproj are correct, then run either the Makefile provided or dotnet build --configuration Release -o bin.



Mathematics

Taked from Wikipedia, using Mitchell's and Netravali's cubic alternate resampling formula:

Formula from Wikipedia

About

KSP PQS Heightmap mod that uses Mitchell-Netravali Interpolation

Resources

License

Stars

Watchers

Forks

Packages

No packages published