Ejemplo n.º 1
0
        protected override void CreateScene()
        {
            viewport.BackgroundColor = ColorEx.White;
            viewport.OverlaysEnabled = false;

            gen           = new Multiverse.Generator.Generator();
            gen.Algorithm = GeneratorAlgorithm.HybridMultifractalWithSeedMap;
            gen.LoadSeedMap("map.csv");
            gen.OutsideMapSeedHeight   = 0;
            gen.SeedMapOrigin          = new Vector3(-3200, 0, -5120);
            gen.SeedMapMetersPerSample = 128;
            gen.XOff                = -0.4f;
            gen.YOff                = -0.3f;
            gen.HeightFloor         = 0;
            gen.FractalOffset       = 0.1f;
            gen.HeightOffset        = -0.15f;
            gen.HeightScale         = 300;
            gen.MetersPerPerlinUnit = 800;

            lodSpec     = new LODSpec();
            lodSpecPrev = new LODSpecPrev();

            // water plane setup
            Plane waterPlane = new Plane(Vector3.UnitY, 10f * oneMeter);

            waterMesh = MeshManager.Instance.CreatePlane(
                "WaterPlane",
                waterPlane,
                60 * 128 * oneMeter, 90 * 128 * oneMeter,
                20, 20,
                true, 1,
                10, 10,
                Vector3.UnitZ);

            Debug.Assert(waterMesh != null);

            SetupScene();
        }
Ejemplo n.º 2
0
        protected override void CreateScene()
        {
            viewport.BackgroundColor = ColorEx.White;
            viewport.OverlaysEnabled = false;

            gen = new Multiverse.Generator.Generator();
            gen.Algorithm = GeneratorAlgorithm.HybridMultifractalWithSeedMap;
            gen.LoadSeedMap("map.csv");
            gen.OutsideMapSeedHeight = 0;
            gen.SeedMapOrigin = new Vector3(-3200, 0, -5120);
            gen.SeedMapMetersPerSample = 128;
            gen.XOff = -0.4f;
            gen.YOff = -0.3f;
            gen.HeightFloor = 0;
            gen.FractalOffset = 0.1f;
            gen.HeightOffset = -0.15f;
            gen.HeightScale = 300;
            gen.MetersPerPerlinUnit = 800;

            lodSpec = new LODSpec();
            lodSpecPrev = new LODSpecPrev();

            // water plane setup
            Plane waterPlane = new Plane(Vector3.UnitY, 10f * oneMeter);

            waterMesh = MeshManager.Instance.CreatePlane(
                "WaterPlane",
                waterPlane,
                60 * 128 * oneMeter, 90 * 128 * oneMeter,
                20, 20,
                true, 1,
                10, 10,
                Vector3.UnitZ);

            Debug.Assert(waterMesh != null);

            SetupScene();
        }