Esempio n. 1
0
        public int spikeOctave = 2; //

        override public float added(RTGWorld rtgWorld, float x, float y)
        {
            float noise = rtgWorld.simplex.octave(hillOctave).noise2(x / hillWavelength, y / hillWavelength);

            noise = TerrainBase.blendedHillHeight(noise);
            float spikeNoise = rtgWorld.simplex.octave(spikeOctave).noise2(x / spikeWavelength, y / spikeWavelength);

            spikeNoise = TerrainBase.blendedHillHeight(spikeNoise * noise);
            return(noise * hillHeight + spikeNoise * spikeHeight);
        }
Esempio n. 2
0
        override public float added(RTGWorld rtgWorld, float x, float y)
        {
            float noise = rtgWorld.simplex.octave(octave).noise2(x / wavelength, y / wavelength);

            noise = TerrainBase.blendedHillHeight(noise, hillBottomSimplexValue);
            if (subordinate == null)
            {
                return(noise * height);
            }
            return(noise * (height + subordinate.added(rtgWorld, x, y)));
        }
Esempio n. 3
0
        override public float added(RTGWorld rtgWorld, float x, float y)
        {
            float noise = rtgWorld.simplex.octave(hillOctave).noise2(x / mountainWavelength, y / mountainWavelength);

            noise = Math.Abs(noise);
            noise = TerrainBase.blendedHillHeight(noise, 0f);
            //transform to be more mountainous
            noise = TerrainBase.unsignedPower(noise, 1.7f);
            noise = 1f - (1f - noise) / (1f - adjustedBottom);
            float spikeNoise = rtgWorld.simplex.octave(spikeOctave).noise2((float)x / spikeWavelength, (float)y / spikeWavelength);

            spikeNoise  = Math.Abs(noise);
            spikeNoise  = TerrainBase.blendedHillHeight(noise, 0f);
            spikeNoise *= noise;
            return(noise * mountainHeight + spikeNoise * spikeHeight);
        }
        override public float added(RTGWorld rtgWorld, float x, float y)
        {
            float noise = rtgWorld.simplex.octave(hillOctave).noise2(x / mountainWavelength, y / mountainWavelength);

            noise = Math.Abs(noise);
            noise = TerrainBase.blendedHillHeight(noise, 0.2f);
            noise = 1f - (1f - noise) / (1f - adjustedBottom);
            float spikeNoise = rtgWorld.simplex.octave(spikeOctave).noise2(x / spikeWavelength, y / spikeWavelength);

            spikeNoise  = Math.Abs(noise);
            spikeNoise  = TerrainBase.blendedHillHeight(noise, 0.1f);
            spikeNoise *= spikeNoise;
            spikeNoise  = TerrainBase.blendedHillHeight(spikeNoise * noise);
            if (noise > 1.01)
            {
                throw new Exception();
            }
            if (spikeNoise > 1.01)
            {
                throw new Exception();
            }
            return(noise * mountainHeight + spikeNoise * spikeHeight);
        }