Back to mods
VS Terrain Diffusion project artwork

Vintage Story Mod DB · Vintage Story mod

VS Terrain Diffusion

This mod is in early development, and is provided here for the community to play around with and explore. World breaking changes should be expected. Only use this mod with a new world. I also recommend checking out this implementation of Terrain Diffusion by

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which VS Terrain Diffusion release should I use?

Updated 12 days ago
Latest stable file 0.11.3
Game version 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3
Loader Built-in Vintage Story mod system

VS Terrain Diffusion 0.11.3 targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is VS Terrain Diffusion required on the client, server, or both?

It must be installed on the client. Installation on the dedicated server is optional.

Client Required
Dedicated server Optional
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This release supports both sides, but the source does not require it on the server.

What else does VS Terrain Diffusion 0.11.3 need?

0.11.3. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

Config lib Optional for VS Terrain Diffusion 0.11.3
optional
Matching file found Matched file: 1.13.2
Rivers Optional for VS Terrain Diffusion 0.11.3
optional
Matching file found Matched file: 5.0.3
Algernon's Watersheds Optional for VS Terrain Diffusion 0.11.3
optional
Matching file found Matched file: 7.0.4

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add VS Terrain Diffusion without breaking your instance.

Built for VS Terrain Diffusion 0.11.3. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.11.3. It targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    It must be installed on the client. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.11.3. It opens that exact file at the source.

About this project

What does VS Terrain Diffusion add?

This mod is in early development, and is provided here for the community to play around with and explore. World breaking changes should be expected. Only use this mod with a new world.

 

I also recommend checking out this implementation of Terrain Diffusion by Alyis: Terra Loom

 

Description

Generates Vintage Story worlds with Terrain Diffusion;
a neural heightmap model trained on real Earth topography.

 

Recent Updates

  • Added some terrain diffusion options to the new world customization menu (v 0.10.1)
  • Pass through the vanilla forestation noise map to vary tree density (v 0.10.2)
  • Add coarse model pooling under "Terrain Intensity" to make terrain more intense and interesting (v 0.10.2)
  • Fix river canyon walls not following rock slope rules (v 0.10.2)
  • Fix a bug which allowed selection of an fp16 coarse model, which doesnt exist (v 0.10.3)
  • Fixed some climate bugs (v 0.11.0)
  • Optimized chunk generation via sparse sampling of ocean map (v 0.11.0)
  • Added tons of buttons and dials to tweak the world's look and feel (v 0.11.0)
  • Fixed crashing with ChunkLOD (Although ChunkLOD isnt exactly happy about it) (v 0.11.0)
  • Added in support for a lowered sea level at y=128 to make more room for terrain (v 0.11.0)
  • Fixed stone appearing on shallow slopes due to a narrow slope calculation (v 0.11.1)
  • Fixed chunk regen sometimes producing slightly different terrain (v 0.11.2)
  • Fixed altitude temperature compensation not being correctly applied (v 0.11.2)
  • Fixed rivers not showing in debug heightmap (v 0.11.2)
  • Fixed dedicated servers failing to resolve dependency paths if a relative data path is used (v 0.11.3)

 

Known Issues

  • The very large biomes can make gameplay difficult, some easy tuning knobs are needed here. (Set Terrain Intensity to 2x in world settings)
  • This mod is completely untested on macOS (I dont have a system to do so), and coreml support only works in theory.
  • Rivers will sometimes end before the ocean.
  • The int8 decoder model is being auto selected on windows if a gpu inferrence device is not detected. The Int8 decoder should require explicit selection. (High priority)
  • River conditioning is too strong in areas with low terrain, causing wide swaths of perfectly flat terrain.

 

Requirements

  • ~2.3 GB of disk for the model files, downloaded once on first launch
  • ~3 GB of extra VRAM while the models are resident

 

Platform Device used automatically

Notes

Linux CUDA Needs CUDA runtime 12 or 13 and cuDNN9; Should auto install when creating your first world.
Windows DirectML Any modern GPU; no extra install
macOS CoreML No extra install
Anything else CPU Works, but slow

 

The matching ONNX Runtime native library is downloaded on first use (a few MB for CPU/DirectML,
~300 MB for CUDA). Nothing has to be installed by hand.

 

If you have an NVIDIA 3000 series or newer, you can try out TensorRT-RTX (Tested with Linux and Win11, Win10 may have issues atm.). It will speed things up significantly.

Technically, anything with support for compute capability 7.5 or later should work. If you have an NVIDIA 2000 series, give it a try.

Just set Inference Device when creating a new world.

 

Recommended Mods

 

Recommended World Settings.

This mod is extremely configurable, but here's what I like to use.

Landcover 40% to 60%
Landcover scale 300% to 400%
World Height 512 (Generally the higher, the better. You can try 768, 1024 and beyond. The mod is designed to (hopefuly) work with any world height.)
Terrain Intensity Off Set this to 2x if you want more intense terrain with less expansive distances. You may also need to increase world height, as things usually get taller as well.
Resolution 7.5 m/block. For a world height of 512 and below, consider smaller scales (i.e. 10 m/block or 15 m/block) to ensure mountains dont get crushed against the world ceiling.
Sea Level 128 This sets sea level to 128 for all world heights. More room for terrain without the need to sell a kidney for more ram. Also keeps mining manageable.
Detail Redraw 35 to 45 Use 45 for more small scale detail. Higher values result in more local variation, but lower quality.
Altitude Cooling 200% Higher values will cause temperatures to drop more rapidly with altitude.
River Valley Depth 30% This is how much terrain is flattened where the rivers mod plans to place a river.

 

The model generates terrain and climates that best fit the selected landcover (land-ocean ratio), landcover scale (landmass size), global temperature, global precipitation, etc. These are provided as conditioning inputs to the coarse model. Changing these in the world settings will change the the kind of terrain the model produces.

 

Configuration

A detailed description of every parameter in ModConfig/vsterraindiffusion.json can be found in the GitHub Repo.

If you previously used an older version of the mod (before version 0.9.1), either delete vsterraindiffusion.json or manually change RainfallBias to 0 to apply the new climate adjustments.

If using the rivers mod, change RiverSpawnChance to 0.1 or even 0.05. Without this too many rivers are generated, and force the model to generate very flat terrain.

Also, give this rivers config a try (Adapted from Arcanum3000's river config). Paste it into rivers.json.

Spoiler!
{
  "disableFlow": false,
  "minForkAngle": 10,
  "forkVariation": 35,
  "normalAngle": 20,
  "valleyStrengthMax": 1.0,
  "valleyStrengthMin": 0.4,
  "noiseExpansion": 1.5,
  "riverPaddingBlocks": 128,
  "minSize": 14.0,
  "maxSize": 50.0,
  "minNodes": 8,
  "maxNodes": 20,
  "riverGrowth": 3.0,
  "downhillError": 1,
  "minLength": 150,
  "lengthVariation": 200,
  "zoneSize": 256,
  "zonesInRegion": 128,
  "riverSpawnChance": 0.1,
  "riverSplitChance": 0.1,
  "lakeChance": 0.1,
  "segmentsInRiver": 3,
  "segmentOffset": 40.0,
  "baseDepth": 0.1,
  "riverDepth": 0.022,
  "heightBoost": 8,
  "topFactor": 1.0,
  "riverOctaves": 3,
  "riverFrequency": 0.0075,
  "riverLacunarity": 3.0,
  "riverGain": 0.3,
  "riverDistortionStrength": 10,
  "riverSpeed": 4.0,
  "maxValleyWidth": 150.0,
  "oceanThreshold": 30.0,
  "fixGravityBlocks": true,
  "boulders": true,
  "gravelBeaches": true,
  "RegionSize": 32768,
  "ChunksInRegion": 1024,
  "ChunksInZone": 8
}

 

Known Compatible Mods

  • Algernon's Watersheds
  • Better Ruins
  • Farseer
  • Terrain Slabs
  • Continental World
  • Rivers (I recommend you don't use this with watersheds if you want decent, tunnel-free results)
  • Algernon's Terrain Sampler

 

WIP

  • Fix rivers ending before the ocean.
  • Compatibility with algernon's terrain sampler (if possible).
  • A higher resolution coarse model to allow finer control over conditioning of terrain details. This would allow river valley conditioning (i.e. flattening) to condition a track of land less than 512 blocks wide.
  • Proper FP16 models to vastly speed things up, while preserving realism and detail. May require me to properly train a new FP16 model based on the original model's dataset, or extensive teacher-student distillation.
  • Investigate generating lakes where model outputs coincide with a flat, moist region.
  • Terrain diffusion settings in the world creation menu.
  • A customizable lower sea level to make more room for terrain, and bring out detail.
  • More localized variation for forestation.
  • Implement a better gpu limiter via the use of smaller tile sizes.
  • Add ROCm support with MiGraphX for AMD GPUs (so they work on linux).
  • Add more fun and variety (lakes, bogs, craters, etc).
  • Implement and train a new coarse model which predicts monthly climate rather than yearly average.
  • Compute proper Köppen climate classification from climate, and use that to determine custom biomes.

 

Suggestions and bug/issue reports are welcome! Feel free to leave them in a comment below.

Please include your game version, mod version, and other mods you're using if you can. Including your OS, and GPU hardware also helps. 

 

For complex questions, configuration advice, bug reports, suggestions, etc. I've set up a discord here.

Project description from Vintage Story Mod DB.

Pick your setup

VS Terrain Diffusion releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

23 available setups

Showing the newest 12 of 23 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

VS Terrain Diffusion versions and loaders

23 of 23 releases match

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.