XenoSandboxGenerator

in #gamedev6 years ago (edited)

Logo.png

XenoSandboxGenerator:

The main goal of this Asset was it to be able to create the foundation for an Open-World/Sandbox map
with only one click. The generated Terrain chunks are Unity Terrains making it easy for level designers to make changes to them.

Example Result without changes:
Example.png

1. Scripts

1.1 GenerateTerrain + GenerateTerrainEditor:

These two scripts are the main logic of this Asset.

While "GenerateTerrain" handels everything related to map generation,

the "GenerateTerrainEditor" class draws a custom inspector for the "GenerateTerrain" class

to make it able to call the Generate method form the inspector while in Edit mode.

1.1.1 The Inspector:

In the Inspector there will be a lot of options you can customize and it can

be a bit overwhelming at first so we will go over each option step by step.

Inspector.png

  • Terrain Size:

The dimensions of the generated Sandbox

  • Height:

height cap for mountains on the Terrain

  • Details:

Details are Bumps in the Terrain. Large, Big, Medium and

Small Details will be overlayed/added.

Height controls the strength of these Bumps and Noise Scale

controls the frequency. A lower frequency will result in

wider bumps and a high frequency will produce dens/sharper

bumps.

  • Sub Options:

lets you tweak the final bumps by subtracting an amount

from the final results of the bumps before added together.

A negative value will add to the result.

  • Mult:

lets you multiply the result. For sharper Bumps x>1

and x<1 to smooth it out.

  • Exponent:

Raise the result to the power of this option.

  • Terrain Material:

Material used for all Terrain chunks (used for custom Shader)

  • Terrain Textures: see below!

  • Vegetation Textures: see below!

  • Grass Density:

the higher this value the more grass there will be placed.

  • Healthy Color:

tint used for healthy grass.

  • Dry Color:

tint used for dry grass.

  • Building Objects Section: see below!

  • Wall to close the map Section: see below!

  • Random Offset Seed:

Set the Seed for Unitys Random.

  • Holo Wall Material:

Set the Material for the Map restriction wall/border.

  • Holo Wall Height:

Set the height of the map restriction wall/border.

  • Currently used Seed:

Save this to save all numerical values you set.

The button below makes copying easy.

  • Generate Terrain:

Will start generating the Sandbox. Might take some time

depending on the size of the Sandbox/Terrain.

  • Recreate from Seed:

You can press the button "Paste Seed from Clipboard"

to paste a seed you have saved and the click on

"Recreate from Seed" to restore all numerical values from

the seed and generate a Sandbox based on these settings.
1.1.1.1 Terrain Textures:

Under Terrain Textures you can assign up to 16 Textures that will be used on the Terrain.
TerrainTextures.png
The Type of Texture will change by what opacity of the Texture will be Influenced:

  • Height Based:

Opacity controlled by the "Height Curve"

horizontal is Terrain height from 0%-100% (0-1)

vertical is opacity from 0%-100% (0-1)

  • Slope Based:

Opacity controlled by the "Angle Curve"

horizontal is Terrain slope from 0°-90° (0-1)

vertical is opacity from 0%-100% (0-1)

  • Height and Slope Mixed:

Controlled by value from Height Curve * value from Angle Curve.

  • Building Foundation:

Texture opacity is 1 where buildings are placed

and 0 everywhere else.

  • Edge Cliff:

Opacity is 1 on the Sandbox border area

and 0 everywhere else.

  • Normal Based:

Opacity based by the normal direction.

You can select the direction under "Normal"

Controlled by "Normal Curve".

horizontal is Terrain angle to the selected direction

from 0°-90°

vertical is opacity from 0%-100% (0-1)

1.1.1.2 Vegetation Textures:

Here you can assign grass textures to be used in terrain settings:
VegetationTextures.png

1.1.1.3 Building Objects & Map Border Wall (Wall to close the Map):
BuildingObjects.png
1.2 TerrainTexture:

Is just a class without methods so we can use Objects of type TerrainTexture in our

GenerateTerrain class.

2. Models

2.1 Border

2.1.1 Tower:

Simple Tower Object with albedo and normal both 4k

2.1.2 Wall:

Simple Wall Object as Map Border with 3 different 4k Texture sets for variation.

Each Texture set has albedo and normal.

2.2 Buildings:

All Buildings listed here have an albedo and normal map each 4k and 2 LOD models with a diffuse

map.

2.2.1 Container:

2.2.1.1 Container1 (completely open)

2.2.1.2 Container2 (one side closed)

2.2.1.3 ContainerClosed (completely closed)

2.2.2 Metal

2.2.3 Shed

2.3 Objects:

All Objects listed here have an albedo and normal map each 4k and 2 LOD models with a diffuse

map.

2.3.1 Barrel:

The Barrel also comes with a metalness map

2.3.2 Boulder

2.3.3 Rock

2.3.4 Stone

3. Prefabs:

3.1 Model Prefabs:

All Objects and Buildings are set up as prefabs with Materials, LODs, Colliders and Tags set up.

3.2 Trees:

Some simple trees made with Unitys tree Creation Tool (using textures in this package)

3.3 Sandbox Preset:

Prefab of an example Sandbox with everything set up already

(ready for drag and drop into your scene)

4. Scenes:

4.1 Small Example Scene

5. Shader:

5.1 HoloWall:

The HoloWall shader is a simple animated unlit shader for the map border.

5.2 XenoTerrain:

The XenoTerrain shader is a custom Terrain shader. (XenoTerrainAddPass will be used

automaticly when needed).

It has the following features:

  • distance blending to minimize tiling

  • noise overlay to minimize tiling

  • triplanar mapping for less distortion on steep areas of the terrain

  • hard blending between textures

6. Skybox:

Simple procedural Skybox for the Example Scene

7. Textures:

7.1 Ground Textures:

18 4k Ground Textures with Normal map

7.2 Vegetation Textures:

7.2.1 Grass Textures

7 custom grass Textures

7.2.2 Textures for Tree Creator:

-3 Bark textures with normal

-7 Leaf textures with normal


Thanks for the read and sry this looks ugly i markdown isnt the best for this.
If you want to view it as pdf click HERE

Asset Store

Sort:  

We need more stuff like this on Steemit!

thanks :) there is more to come its just a little work ^^

Congratulations @erarnitox! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 100 upvotes. Your next target is to reach 250 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest³ - SteemitBoard Contest Teaser
The new Steemfest³ Award is ready!

Support SteemitBoard's project! Vote for its witness and get one more award!

Thank you for sharing you game development post with us! You have received an upvote! Please visit our page @steemgg to learn more about how you can use our platform Steemgg, the first html5 gaming platform built on the Steem Blockchain to get more out of game development.

Congratulations @erarnitox! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 4000 upvotes. Your next target is to reach 5000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @erarnitox! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @erarnitox! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!