public Translate( CoherentNoise.Generator source, Vector3 value ) { _generator = new CoherentNoise.Generation.Displacement.Translate(source, value); }
public Gain( TerrainGenerator source, float gain ) { _generator = new CoherentNoise.Generation.Modification.Gain(source.GetGenerator(), gain); }
public Modify( TerrainGenerator source, Func <float, float> modifier ) { _generator = new CoherentNoise.Generation.Modification.Modify(source.GetGenerator(), modifier); }
public Min( TerrainGenerator source1, TerrainGenerator source2 ) { _generator = new CoherentNoise.Generation.Combination.Min(source1.GetGenerator(), source2.GetGenerator()); }
public TexturePattern( Texture2D texture, TextureWrapMode wrapMode ) { _generator = new CoherentNoise.Generation.Patterns.TexturePattern(texture, wrapMode); }
public Rotate( CoherentNoise.Generator source, Quaternion value ) { _generator = new CoherentNoise.Generation.Displacement.Rotate(source, value); }
public Blend( TerrainGenerator source1, TerrainGenerator source2, TerrainGenerator weight ) { _generator = new CoherentNoise.Generation.Combination.Blend(source1.GetGenerator(), source2.GetGenerator(), weight.GetGenerator()); }
public InverseLerp( TerrainGenerator source, float lowerBound, float upperBound ) { _generator = new InverseLerpGenerator(source.GetGenerator(), lowerBound, upperBound); }
public ValueNoise( int seed = 0, float frequency = 1 / 100f, int period = 0, bool use2D = false ) { _generator = ChooseGenerator(seed, frequency, period, use2D); }
public VoronoiPits( int seed = 0, int period = 0, float frequency = 1 / 240f, bool use2D = false ) { _generator = ChooseGenerator(seed, period, frequency, use2D); }
public Curve( TerrainGenerator source, AnimationCurve animationCurve ) { _generator = new ThreadSafeGenerator(() => { AnimationCurve curveClone = new AnimationCurve(animationCurve.keys); return(new CoherentNoise.Generation.Modification.Curve(source.GetGenerator(), curveClone)); }); }
public BrokenLands( AnimationCurve animationCurve ) { TerrainGenerator ridgeNoise = new RidgeNoise(seed: 23, frequency: 1 / 3000f, octaveCount: 11) * 10; TerrainGenerator cliffs = new Curve(new Gain(new PinkNoise(seed: 11, frequency: 1 / 800f, octaveCount: 5), .35f), animationCurve) * 3f; TerrainGenerator cliffs2 = new Curve(new PinkNoise(seed: 13, frequency: 1 / 1000f, octaveCount: 6), animationCurve) * 1.5f; TerrainGenerator terrain = (ridgeNoise + cliffs + cliffs2) * 25f; _generator = terrain.GetGenerator(); }
// 3D Constructor public VoronoiCells( Func <int, int, int, float> cellValueSource, int seed = 0, int period = 0, float frequency = 1 / 240f ) { _generator = new CoherentNoise.Generation.Voronoi.VoronoiCells(seed, cellValueSource) { Frequency = frequency, Period = period }; }
public void Generate() { if (randomize) { seed = Random.Range(0, Mathf.Abs(Random.seed)); Debug.Log("Using " + seed + " to make skybox"); } noise = GetNoise(seed); System.Func <float, float, Color> func = GetColor; tex = TextureMaker.Make(size, size, func, TextureFormat.RGB24); image.texture = tex; }
public Turbulence( CoherentNoise.Generator source, int seed = 0, float power = 1f, float frequency = 1f, int octaveCount = 6 ) { _generator = new CoherentNoise.Generation.Displacement.Turbulence(source, seed) { Power = power, Frequency = frequency, OctaveCount = octaveCount }; }
public BillowNoise( int seed = 0, float persistance = 0.5f, float frequency = 1 / 240f, float lacunarity = 2.17f, int octaveCount = 6 ) { _generator = new ThreadSafeGenerator(() => new CoherentNoise.Generation.Fractal.BillowNoise(seed) { Frequency = frequency, Lacunarity = lacunarity, OctaveCount = octaveCount, Persistence = persistance } ); }
public RidgeNoise( int seed = 0, float frequency = 1 / 240f, float lacunarity = 2.17f, float exponent = 1f, float offset = 1f, float gain = 2f, int octaveCount = 6 ) { _generator = new ThreadSafeGenerator(() => new CoherentNoise.Generation.Fractal.RidgeNoise(seed) { Frequency = frequency, Lacunarity = lacunarity, Exponent = exponent, Offset = offset, Gain = gain, OctaveCount = octaveCount, } ); }
public Function( Func <float, float, float, float> function ) { _generator = new CoherentNoise.Generation.Function(function); }
public InverseLerpGenerator(CoherentNoise.Generator source, float lowerBound, float upperBound) { this.source = source; this.lowerBound = lowerBound; this.upperBound = upperBound; }
public Identity( TerrainGenerator source ) { _generator = source.GetGenerator(); }
public Cache( TerrainGenerator source ) { _generator = new CoherentNoise.Generation.Cache(source.GetGenerator()); }
public SwapYZGenerator(CoherentNoise.Generator source) { this.source = source; }
public Constant( float value ) { _generator = new CoherentNoise.Generation.Constant(value); }
public FuzzyBorders() { TerrainGenerator ridgeNoise = new RidgeNoise(seed: 23, frequency: 1 / 3000f, octaveCount: 11) * 10; _generator = ridgeNoise.GetGenerator(); }
///<summary> /// Blend two settings generators using third one as weight ///</summary> ///<param name="source">Source settings</param> ///<param name="other">Noise to blend</param> ///<param name="weight">Blend weight</param> ///<returns></returns> public static Generator Blend(this Generator source, Generator other, Generator weight) { return new Blend(source, other, weight); }
public float GetValue(Point point) { CoherentNoise.Generator gen = GetGenerator(); return(gen.GetValue(point.GetPosition())); }