Skip to content

shniqq/terrain-generation

Repository files navigation

Dependencies:

Automatically resolvable via OpenUPM:

Due to a limitation by Unity on git dependencies, the following packages have to be manually added by adding each repository URL to your project's manifest.json:

Usage:

Create an instance of the TerrainGenerationPreset scriptable object. Add entries to the Heightmap Texture, Terrain Layers, Terrain Trees, Terrain Details and Generic Modifiers tabs by instantiating new interface implementations via the dropdown menu as shown below: Examplatory usage of the TerrainGenerationPreset scriptable object

Some examples how this can look like below:

Heightmap Texture Terrain Layers Terrain Details Generic Modifiers
Heightmap Texture Example Terrain Layers Example Terrain Details Example Generic Modifiers Example

You can also extend the available modifiers by implementing the respective interfaces, e.g. ITextureModifier, IFloatValueProvider, etc.

Next, add the TerrainGenerator component to a GameObject in your scene and add your previously created TerrainGenerationPreset instance. Tweak the remaining parameters to your liking.

TerrainGenerator Script attached to a GameObject

Then, either call the GenerateTerrain or GenerateTerrainAsync methods, or click the Generate Terrain button during play mode.

Depending on your paramters, this should result in something like this:

Example of Terrain Generation happening

About

Experimental Terrain Generation for Unity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages