free portfolio site templates

Terrain 2D Tutorial

Basic usage, features & sample results

Terrain2D

Terrain2D

Creates physics and textures according to the selected shape.

Once you define a terrain material, you can use it on any spline.

Additionally customizable on every shape:
- tint color
- shaders & materials
- 2D order and 3D 
- physics other than the stablished in the material
...and more...

Terrain 2D Component

Applies the Terrain2D Material to a spline/shape and provides local properties.

This allows to adapt the material to every situation without affecting the 2DMaterial

To avoid Z-fight on different splines.

Since each spline using the same material will create meshes using the same Order in Layer independently of their position, this could create sprites to overlap.

Use this value to modify the Order of created elements in the current object. This will avoid any overlapping elements between splines.

Select a different render material, and  add color tint to the current object.

Select if the Colliders defined in the material should be created based on the 2DMaterial, or not created at all or define a new configuration other than the defined in the 2DMaterial.

* Only for lines (non-loop shapes).

Creates a fill-texture polygon based on the line, similar to extruding points.

Ideal for scenarios extending beyond the screen view

Mesh can be created in any direction and length, and shape can be controlled in diferent ways:

 - offset each point
 - offset only first and last point
 - extend each point until X position in the world
 - extend each point until Y position in the world

Point Width: Control the SIze of the (ground, wall,ceiling) texture at any given point on the spline.

Split Paths: Change how the textures converge at corners.

Polygon Mesh Subdivision: increase the points amount to generate a bigger density of polygons on the fill mesh.

Change Sort: Allows you to use a different sort for the textures (ground, wall, ceiling, fill) other than the defined in the 2dMaterial. This could be 2D, 3D, both and assign new position/layer.

Mobirise

Terrain2D Material

The common settings that will be used in the splines  (art & physics)

- Size of sprites,
- Offset to match the visuals with the physics
- Select the material/shader to use

- Layers and Order in Layer:
Controls what is in front of what on your art:
- per segment ( ground, wall, ceiling, fill, corners)

Drag the textures you want to use as the base of your terrains.

You can select multiple sprites per segment.

(By deafult the order of sprites is randomized on each spline, but you can select a specific order if you like)

You can set sprites that overlap the material where different segments connect.

Each corner sprite can have and offset (x,y) to fit exactly the position you want.

Use corners as a normal Sprite or as a Mesh using the same materials and shaders than the rest of the terrain.

Polygon:
Creates a PolygonCollider2D on the spline
Edge:
Adds a EdgeCollider2D around the spline

** Special colliders per Segment:
Each segment can define its own EdgeCollider2D, with individual settings ( materials, readius, is trigger, used by effector)
So walls can have different collisions than ground, for example.

Mobirise

GUIDES

Kolibri2d - 2020         Extra art by : ASKA animation , Freepik & Unity Asset store