Interesting Terrains
This mod has been discontinued but has been picked up by Freak2121 and transformed into Interesting Eroded Terrain.
Current version: 0.5.2
Supported DFUnity version: 0.10.27
Nexus page: Interesting Eroded Terrain
Source code: Interesting Terrains on GitHub
Known issues
Until this mod reaches v. 1.0.0, issues are to be expected. As issues are found, either by myself or the community, they're listed in this section. Unless otherwise noted, the intention is that the issues are fixed in the next release.
- Unintended terrain appearing around the player's ships
A mod that aims to make the landscape of Daggerfall Unity more interesting by procedurally adding geological features such as mountains, cliffs, and dunes to the existing terrain heightmaps at appropriate places in the world.
Currently, these landscape types are featured (though more may be added in the future):
- Swiss Mountains (alpine-style fold mountains, for the densest mountain areas)
- Jordan Mountains ("regular"-style mountains - varies between fold and fault types, and is repurposed for hills)
- IQ Mountains (sparsely placed fold mountains for non-mountainous areas - invented by math genius Inigo Quilez)
- Swiss Canyons (a modified variety of swiss mountains for canyons with cliffs)
- Dunes
- Bumpy Terrain (smooth bumps for non-mountainous areas)
- Rocky terrain (sharp bumps for mountainous areas)
Hills are mainly found in woodland hills areas, such as the Ilessan Hills and the area between the Wrothgarian Mountains and Wayrest, but can, like mountains, be found to a lesser degree in the rest of the world. Except in the desert; in the desert areas, hills are replaced by dunes.
At places, the original terrain is preserved and used as its own "flatlands" landscape type. Furthermore, the original terrain is preserved at oceans and beaches.
This mod also textures the terrain differently, making cliffs and mountains have a rock texture and at the same time create more interesting grass-dirt variations than the vanilla game offers. There are no more random patches of rock on flat terrain, as they now have mountains and cliffs to serve their purpose.
Purpose and motivation
For a long time, I've been interested in the relationship between procedural generation and nature. While real-life topology appears random and chaotic at a glance, it actually follows natural laws of self-similarity quite closely; if you zoom in on a coastline, for instance, you will find smaller versions of its shape repeating itself. This relationship exists everywhere in nature, from the shaping of continents and mountain ranges down to the segmentation of leaves and grass blades. Mathematical simulations of this phenomenon are referred to as "fractals", and are most famously illustrated in the Mandelbrot sequence.
For some time I've been experimenting with procedurally generating terrains in Unity using so-called fractional Brownian Motion, which is a fractaline noise generator algorithm that iteratively generates self-similar noise patterns while offering fine-grained control over the self-similarity aspect and, by using derivatives in the noise sampling process, makes it possible to simulate naturally occurring phenomena such as hydraulic erosion. The self-similarity and erosion make all the difference between odd looking tall hills and something that the human eyes instantly recognize as mountains.
I've loved Daggerfall since the first time I played it but always found the terrain to be highly uninteresting. Therefore I wanted to introduce this enhanced terrain generation algorithm to the game, but in a way that conforms to the original coastlines and various climate types in Daggerfall, to be both as compatible and lore-friendly as possible, while at the same time introducing enough different landscape types (and variations within each landscape type) to make the world look both natural and interestingly varied. Since the fBM algorithms are quite heavy, and several different fBM algorithms are used to compose the various landscape types, the GPU is used to perform the calculations; the GPU is an often under-utilized super computer that vastly outperforms the CPU when it comes to tasks like this.
Compatibility
Known compatibilities:
- Distant Terrain (disable Improved Terrain Sampler)
- Tedious Travel (be cautious when traveling in mountainous areas, as you can still die from fall damage)
- Airships (requires manual intervention when flying across mountainous areas)
- Realtime Reflection (oddities do occur - will investigate)
- D.R.E.A.M.
- Realistic Grass
- Realistic Wagon
- New Cannon Locations
- Windmills of Daggerfall
- High Resolution Terrain Textures and Splat Terrain Texturing
- Mountains and Hills (when both are loaded, one will completely overtake the other depending on load order)
- New Locations/Location Loader, and mods depending on it (it currently doesn't support terrains with a max height that's different from vanilla terrains)
- Basic Roads (Interesting Terrains currently doesn't smooth the roads, but plans are on the drawing board)
I have attempted to test Daggerfall Skyshards and Warm Ashes v4 on 0.10.25a, but couldn't get either to work even with Interesting Terrains disabled. If anyone has those two mods successfully enabled, I'd be very interested to know if they're compatible with Interesting Terrains.
Technical details
This mod utilizes a custom Terrain Sampler, which dispatches the job to a compute shader on the main thread, rather than running an async CPU job.
The base tilemap generation has been overtaken by the terrain sampler, which now generates the tileData that the GenerateTileDataJob normally does - a clone of the default TerrainTexturer, in which the afforementioned job has been omitted, has been implemented. If you're the author of a mod that uses a custom TerrainTexturer, and would like to access the generated tileData, there's a mod message handler in place that will provide it as a byte array. Check out the InterestingTerrainTexturer class on GitHub for more info.
Changelog
Version 0.5.2
- Fixed: Faulty location heights on Linux
- Fixed a bug where terrain blending for terrains close to each other glitches
- Improved transition between terrain and locations
- Improved rough heightmap generation (better accuracy in Distant Terrain)
- Implemented initial Basic Roads support (still in extremely early stage - doesn't meet compatibility criteria)
- Updated for DFUnity 0.10.27
- Fix: Location blending is now handled by the mod
- Fix: Texturing around locations now performs properly
- Compatibility: Now works with Distant Terrain
- Misc: Removed 'tui' and 'tss' commands, as the game already has features to make them obsolete
- Fix: Removed bug that caused faulty terrain generation when using localization that doesn't use "." as decimal separator
- Major overhaul: Interesting Terrains is now implemented as a custom Terrain Sampler, making it an organic part of the game's terrain generation flow, rather than a post-processing job. This provides better compatibility with the game itself, and better compatibility with other mods in general.
- Addition: Two new mountain types added, and hills are now a modified (smoothed) version of one of them.
- Tweak: The landscape generator now properly follows the natural laws of mountain formation.
- Fix: Removed Tedious Travel compatibility workarounds, as they caused issues. Fast traveling through mountains is now at your own risk!
A couple of console commands has been added, primarily for my own development-related benefits, but I've left them in the release version because why not. Don't save any important game after using any of these, as I cannot guarantee what would happen in the long run.
- clearnoon: Forwards the time to midday, sets the weather to sunny, and kills all enemies.
- speedy: Toggles "speedy" mode. When enabled, move speed and jump speed are greatly increased, and God Mode is enabled. Takes a number as an optional parameter, which multiplies the movement speed increase for even faster (or slower) speeds.