Procedural Planets

Integrated Sebastian Lague's Planet Generator
Created Tour function in SectorRenderer which makes the camera follow each terrestrial planet in turn
This commit is contained in:
Reinier Vens 2020-12-05 23:43:02 +00:00
commit 53a91351b7
332 changed files with 11904 additions and 78 deletions

View file

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu (menuName = "Celestial Body/Earth-Like/Earth Shape")]
public class EarthShape : CelestialBodyShape {
[Header ("Continent settings")]
public float oceanDepthMultiplier = 5;
public float oceanFloorDepth = 1.5f;
public float oceanFloorSmoothing = 0.5f;
public float mountainBlend = 1.2f; // Determines how smoothly the base of mountains blends into the terrain
[Header ("Noise settings")]
public SimpleNoiseSettings continentNoise;
public SimpleNoiseSettings maskNoise;
public RidgeNoiseSettings ridgeNoise;
public Vector4 testParams;
protected override void SetShapeData () {
var prng = new PRNG (seed);
continentNoise.SetComputeValues (heightMapCompute, prng, "_continents");
ridgeNoise.SetComputeValues (heightMapCompute, prng, "_mountains");
maskNoise.SetComputeValues (heightMapCompute, prng, "_mask");
heightMapCompute.SetFloat ("oceanDepthMultiplier", oceanDepthMultiplier);
heightMapCompute.SetFloat ("oceanFloorDepth", oceanFloorDepth);
heightMapCompute.SetFloat ("oceanFloorSmoothing", oceanFloorSmoothing);
heightMapCompute.SetFloat ("mountainBlend", mountainBlend);
heightMapCompute.SetVector ("params", testParams);
//
}
}