Пример #1
0
        public TerrainModule(int seed)
        {
            this.seed = seed;

            RidgedMultifractal mountains = new RidgedMultifractal();

            mountains.Seed      = seed;
            mountains.Frequency = 0.5;

            Billow hills = new Billow();

            hills.Seed      = seed;
            hills.Frequency = 2;

            ScaleBiasOutput scaleHill = new ScaleBiasOutput(hills);

            scaleHill.Scale = 0.04;
            scaleHill.Bias  = 0;

            ScaleBiasOutput scaleMountain = new ScaleBiasOutput(mountains);

            scaleMountain.Scale = 1.5;

            Perlin selectorControl = new Perlin();

            selectorControl.Seed        = seed;
            selectorControl.Frequency   = 0.10;
            selectorControl.Persistence = 0.25;

            Select selector = new Select(selectorControl, scaleMountain, scaleHill);

            selector.SetBounds(0, 1000);
            selector.EdgeFalloff = 0.5;
            module = selector;
        }
Пример #2
0
        public TerrainModule(int seed)
        {
            this.seed = seed;

            RidgedMultifractal mountains = new RidgedMultifractal();
            mountains.Seed = seed;
            mountains.Frequency = 0.5;

            Billow hills = new Billow();
            hills.Seed = seed;
            hills.Frequency = 2;

            ScaleBiasOutput scaleHill = new ScaleBiasOutput(hills);
            scaleHill.Scale = 0.04;
            scaleHill.Bias = 0;

            ScaleBiasOutput scaleMountain = new ScaleBiasOutput(mountains);
            scaleMountain.Scale = 1.5;

            Perlin selectorControl = new Perlin();
            selectorControl.Seed = seed;
            selectorControl.Frequency = 0.10;
            selectorControl.Persistence = 0.25;

            Select selector = new Select(selectorControl, scaleMountain, scaleHill);
            selector.SetBounds(0, 1000);
            selector.EdgeFalloff = 0.5;
            module = selector;
        }