notchris / noteditor

A simple multi-platform 3D editor built with threejs / webgl.
https://notchris.net/noteditor
11 stars 1 forks source link

Noise Functions #14

Open circuitbone opened 4 years ago

circuitbone commented 4 years ago

• Perlin Noise • SImplex Noise

These functions can be used to attain random terrain heights.

These functions can be used to attain random object placement.

Placing objects under a noise function can be thought of as a generator to the editor user.

Placing objects under a noise function can be thought of a test unit for the developer.

Greatly reduces labour

Placement of objects can be restricted to levels of the terrain.

Rocks on all levels Trees on rough grass on rough grass on grass Seaweed on seabed

circuitbone commented 4 years ago

Review https://github.com/josephg/noisejs

circuitbone commented 4 years ago

Coding concept

circuitbone commented 4 years ago

Perlin Object Placement in Unity for a quick example.

PerlinCubes.cs

Add some objects to the GameObject Array.

An empty game object prefab can be used here as well.

PerlinCubes.cs.zip

circuitbone commented 4 years ago

HeightMap Layers Legend for object placement

circuitbone commented 4 years ago

another noise call can now place objects within the sub layers

circuitbone commented 4 years ago

Checker Patterns for the grass layer to mimic mowed fairways