Skip to content

PQSMods supported in the cfg

NathanKell edited this page Apr 16, 2014 · 1 revision

First, some background on PQSMods. The way PQS works is that when it's about to build a vertex for the quad (quads are the basic building blocks of the PQS, a subdividable chunk of terrain), it first creates a vertex at planetary_radius from the center of the planet. Then it calls each PQSMod to see how that vertex is changed, in the order specified (each PQSMod has an int order field; lowest called first).

PQSMods modify how the PQS is built/updated/etc. Here, we're interested in PQSMods that modify how vertices are built.

VertexHeightmap has a low order and goes early. Given the vertex's original position it will look up the corresponding texel in the heightmap. The vertex's new elevation will be original_elevation + heightMapOffset + heightMapDeformity * white_level_of_texel. That becomes the new elevation of the vertex and is passed on to the next PQSMod in order.

VertexSimplexHeight passes the vertex elevation to a multilevel simplex noise function. output elevation = input + deformity * simplex_evaluation. For frequency and persistence see http://libnoise.sourceforge.net/glossary/

The VoronoiCraters mods do the procedural craters on the moon. deformity works like always, frequency works like for perlin or simplex noise. Don't change it much or you'll be losing hundreds of megabytes of RAM (a doubled frequency here cost ~700MB!)