Example #1
0
        public MyVoxelMaterialDefinition GetMaterialForPosition(ref Vector3 pos, float lodSize, out byte biomeValue, bool preciseOrePositions)
        {
            MaterialSampleParams @params;

            biomeValue = 0;
            this.GetPositionParams(ref pos, lodSize, out @params, false);
            MyVoxelMaterialDefinition material = null;
            float num = !preciseOrePositions ? ((@params.SurfaceDepth / Math.Max((float)(lodSize * 0.5f), (float)1f)) + 0.5f) : (@params.SurfaceDepth + 0.5f);

            if (this.m_oreMap != null)
            {
                List <PlanetOre> list;
                byte             key = this.m_oreMap.Faces[@params.Face].GetValue(@params.Texcoord.X, @params.Texcoord.Y);
                if (this.m_ores.TryGetValue(key, out list))
                {
                    using (List <PlanetOre> .Enumerator enumerator = list.GetEnumerator())
                    {
                        while (true)
                        {
                            if (!enumerator.MoveNext())
                            {
                                break;
                            }
                            PlanetOre current = enumerator.Current;
                            if ((current.Start <= -num) && ((current.Start + current.Depth) >= -num))
                            {
                                return(current.Material);
                            }
                        }
                    }
                }
            }
            PlanetMaterial layeredMaterialForPosition = this.GetLayeredMaterialForPosition(ref @params, out biomeValue);
            float          num2 = @params.SurfaceDepth / lodSize;

            if (!layeredMaterialForPosition.HasLayers)
            {
                if (num2 >= -layeredMaterialForPosition.Depth)
                {
                    material = layeredMaterialForPosition.Material;
                }
            }
            else
            {
                VoxelMaterial[] layers = layeredMaterialForPosition.Layers;
                for (int i = 0; i < layers.Length; i++)
                {
                    if (num2 >= -layers[i].Depth)
                    {
                        material = layeredMaterialForPosition.Layers[i].Material;
                        break;
                    }
                }
            }
            if (material == null)
            {
                material = this.m_subsurfaceMaterial.FirstOrDefault;
            }
            return(material);
        }
Example #2
0
        public void Close()
        {
            if (m_providerForRules == this)
            {
                m_providerForRules = null;
            }

            // Clear to speed up collection

            m_blendingTileset    = null;
            m_subsurfaceMaterial = null;
            m_generator          = null;
            m_biomeMap           = null;
            m_biomes             = null;
            m_materials          = null;
            m_planetShape        = null;
            m_ores = null;

            m_materialMap  = null;
            m_oreMap       = null;
            m_biomeMap     = null;
            m_occlusionMap = null;

            Closed = true;
        }
Example #3
0
        public PlanetMaterial GetLayeredMaterialForPosition(ref MaterialSampleParams ps, out byte biomeValue)
        {
            if (ps.DistanceToCenter < 0.01)
            {
                biomeValue = 0xff;
                return(this.m_defaultMaterial);
            }
            byte           key             = 0;
            PlanetMaterial defaultMaterial = null;
            byte           num2            = 0;

            if (this.m_biomeMap != null)
            {
                num2 = this.m_biomeMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
            }
            if (this.m_biomePixelSize < ps.LodSize)
            {
                if (this.m_materialMap != null)
                {
                    key = this.m_materialMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
                }
            }
            else if (this.m_materialMap != null)
            {
                key = this.ComputeMapBlend(ps.Texcoord, ps.Face, ref m_materialBC, this.m_materialMap.Faces[ps.Face]);
            }
            this.m_materials.TryGetValue(key, out defaultMaterial);
            if ((defaultMaterial == null) && (this.m_biomes != null))
            {
                List <PlanetMaterialRule> list = m_rangeBiomes[key];
                if ((list != null) && (list.Count != 0))
                {
                    float height = (ps.SampledHeight - this.m_planetShape.MinHillHeight) * this.m_invHeightRange;
                    foreach (PlanetMaterialRule rule in list)
                    {
                        if (rule.Check(height, ps.Latitude, ps.Longitude, ps.Normal.Z))
                        {
                            defaultMaterial = rule;
                            break;
                        }
                    }
                }
            }
            if (defaultMaterial == null)
            {
                defaultMaterial = this.m_defaultMaterial;
            }
            biomeValue = num2;
            return(defaultMaterial);
        }
Example #4
0
 public void Close()
 {
     this.m_blendingTileset    = null;
     this.m_subsurfaceMaterial = null;
     this.m_generator          = null;
     this.m_biomeMap           = null;
     this.m_biomes             = null;
     this.m_materials          = null;
     this.m_planetShape        = null;
     this.m_ores        = null;
     this.m_materialMap = null;
     this.m_oreMap      = null;
     this.m_biomeMap    = null;
     this.Maps          = null;
     this.Closed        = true;
 }
Example #5
0
 public MyPlanetMaterialProvider(MyPlanetGeneratorDefinition generatorDef, MyPlanetShapeProvider planetShape, MyCubemap[] maps)
 {
     this.m_materials = new Dictionary <byte, PlanetMaterial>(generatorDef.SurfaceMaterialTable.Length);
     for (int i = 0; i < generatorDef.SurfaceMaterialTable.Length; i++)
     {
         byte num2 = generatorDef.SurfaceMaterialTable[i].Value;
         this.m_materials[num2] = new PlanetMaterial(generatorDef.SurfaceMaterialTable[i], generatorDef.MinimumSurfaceLayerDepth);
     }
     this.m_defaultMaterial    = new PlanetMaterial(generatorDef.DefaultSurfaceMaterial, generatorDef.MinimumSurfaceLayerDepth);
     this.m_subsurfaceMaterial = (generatorDef.DefaultSubSurfaceMaterial == null) ? this.m_defaultMaterial : new PlanetMaterial(generatorDef.DefaultSubSurfaceMaterial, generatorDef.MinimumSurfaceLayerDepth);
     this.m_planetShape        = planetShape;
     this.Maps          = maps;
     this.m_materialMap = maps[0];
     this.m_biomeMap    = maps[1];
     this.m_oreMap      = maps[2];
     if (this.m_materialMap != null)
     {
         this.m_mapResolutionMinusOne = this.m_materialMap.Resolution - 1;
     }
     this.m_generator      = generatorDef;
     this.m_invHeightRange = 1f / (this.m_planetShape.MaxHillHeight - this.m_planetShape.MinHillHeight);
     this.m_biomePixelSize = ((float)((planetShape.MaxHillHeight + planetShape.Radius) * 3.1415926535897931)) / ((this.m_mapResolutionMinusOne + 1) * 2f);
     this.m_hashCode       = generatorDef.FolderName.GetHashCode();
     if ((this.m_generator.MaterialGroups != null) && (this.m_generator.MaterialGroups.Length != 0))
     {
         this.m_biomes = new Dictionary <byte, PlanetBiome>();
         foreach (MyPlanetMaterialGroup group in this.m_generator.MaterialGroups)
         {
             this.m_biomes[group.Value] = new PlanetBiome(group, this.m_generator.MinimumSurfaceLayerDepth);
         }
     }
     if (MyHeightMapLoadingSystem.Static != null)
     {
         this.m_blendingTileset = MyHeightMapLoadingSystem.Static.GetTerrainBlendTexture(this.m_generator.MaterialBlending);
     }
     this.m_ores = new Dictionary <byte, List <PlanetOre> >();
     foreach (MyPlanetOreMapping mapping in this.m_generator.OreMappings)
     {
         MyVoxelMaterialDefinition material = GetMaterial(mapping.Type);
         if (material != null)
         {
             PlanetOre item = new PlanetOre {
                 Depth          = mapping.Depth,
                 Start          = mapping.Start,
                 Value          = mapping.Value,
                 Material       = material,
                 ColorInfluence = mapping.ColorInfluence
             };
             if (mapping.ColorShift != null)
             {
                 item.TargetColor = new Vector3?(mapping.ColorShift.Value.ColorToHSV());
             }
             if (!this.m_ores.ContainsKey(mapping.Value))
             {
                 List <PlanetOre> list1 = new List <PlanetOre>();
                 list1.Add(item);
                 List <PlanetOre> list = list1;
                 this.m_ores.Add(mapping.Value, list);
             }
             this.m_ores[mapping.Value].Add(item);
         }
     }
     this.Closed = false;
 }
Example #6
0
        public void GetMaterialForPositionDebug(ref Vector3 pos, out MyPlanetStorageProvider.SurfacePropertiesExtended props)
        {
            MaterialSampleParams @params;

            this.GetPositionParams(ref pos, 1f, out @params, true);
            props.Position      = pos;
            props.Gravity       = [email protected];
            props.Material      = this.m_defaultMaterial.FirstOrDefault;
            props.Slope         = @params.Normal.Z;
            props.HeightRatio   = this.m_planetShape.AltitudeToRatio(@params.SampledHeight);
            props.Depth         = @params.SurfaceDepth;
            props.Latitude      = @params.Latitude;
            props.Longitude     = @params.Longitude;
            props.Altitude      = @params.DistanceToCenter - this.m_planetShape.Radius;
            props.GroundHeight  = @params.SampledHeight + this.m_planetShape.Radius;
            props.Face          = @params.Face;
            props.Texcoord      = @params.Texcoord;
            props.BiomeValue    = 0;
            props.MaterialValue = 0;
            props.OreValue      = 0;
            props.EffectiveRule = null;
            props.Biome         = null;
            props.Ore           = new PlanetOre();
            props.Origin        = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Default;
            PlanetMaterial defaultMaterial = null;

            if (this.m_oreMap != null)
            {
                List <PlanetOre> list;
                props.OreValue = this.m_oreMap.Faces[@params.Face].GetValue(@params.Texcoord.X, @params.Texcoord.Y);
                if (this.m_ores.TryGetValue(props.OreValue, out list))
                {
                    foreach (PlanetOre ore in list)
                    {
                        props.Ore = ore;
                        if ((ore.Start <= [email protected]) && ((ore.Start + ore.Depth) >= [email protected]))
                        {
                            props.Material = ore.Material;
                            props.Origin   = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Ore;
                            break;
                        }
                    }
                }
            }
            if (@params.DistanceToCenter >= 0.01)
            {
                byte key = 0;
                if (this.m_biomePixelSize < @params.LodSize)
                {
                    if (this.m_materialMap != null)
                    {
                        key = this.m_materialMap.Faces[@params.Face].GetValue(@params.Texcoord.X, @params.Texcoord.Y);
                    }
                }
                else if (this.m_materialMap != null)
                {
                    key = this.ComputeMapBlend(@params.Texcoord, @params.Face, ref m_materialBC, this.m_materialMap.Faces[@params.Face]);
                }
                this.m_materials.TryGetValue(key, out defaultMaterial);
                props.Origin        = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Map;
                props.MaterialValue = key;
                if ((defaultMaterial == null) && (this.m_biomes != null))
                {
                    PlanetBiome biome;
                    this.m_biomes.TryGetValue(key, out biome);
                    props.Biome = biome;
                    if ((biome != null) && biome.IsValid)
                    {
                        foreach (PlanetMaterialRule rule in biome.Rules)
                        {
                            if (rule.Check(props.HeightRatio, @params.Latitude, @params.Longitude, @params.Normal.Z))
                            {
                                defaultMaterial = rule;
                                props.Origin    = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Rule;
                                break;
                            }
                        }
                    }
                }
                if (defaultMaterial == null)
                {
                    defaultMaterial = this.m_defaultMaterial;
                    props.Origin    = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Default;
                }
                byte num2 = 0;
                if (this.m_biomeMap != null)
                {
                    num2 = this.m_biomeMap.Faces[@params.Face].GetValue(@params.Texcoord.X, @params.Texcoord.Y);
                }
                props.BiomeValue = num2;
                float num3 = @params.SurfaceDepth + 0.5f;
                if (!defaultMaterial.HasLayers)
                {
                    if (num3 >= -defaultMaterial.Depth)
                    {
                        props.Material = defaultMaterial.Material;
                    }
                }
                else
                {
                    VoxelMaterial[] layers = defaultMaterial.Layers;
                    for (int i = 0; i < layers.Length; i++)
                    {
                        if (num3 >= -layers[i].Depth)
                        {
                            props.Material = defaultMaterial.Layers[i].Material;
                            break;
                        }
                    }
                }
                props.EffectiveRule = defaultMaterial;
            }
        }
Example #7
0
        public MyPlanetMaterialProvider(MyPlanetGeneratorDefinition generatorDef, MyPlanetShapeProvider planetShape)
        {
            m_materials = new Dictionary <byte, PlanetMaterial>(generatorDef.SurfaceMaterialTable.Length);

            for (int i = 0; i < generatorDef.SurfaceMaterialTable.Length; ++i)
            {
                byte materialValue = (byte)generatorDef.SurfaceMaterialTable[i].Value;

                m_materials[materialValue] = new PlanetMaterial(generatorDef.SurfaceMaterialTable[i]);
            }

            m_defaultMaterial = new PlanetMaterial(generatorDef.DefaultSurfaceMaterial);

            if (generatorDef.DefaultSubSurfaceMaterial != null)
            {
                m_subsurfaceMaterial = new PlanetMaterial(generatorDef.DefaultSubSurfaceMaterial);
            }
            else
            {
                m_subsurfaceMaterial = m_defaultMaterial;
            }

            m_planetShape = planetShape;

            MyCubemap[] maps;
            MyHeightMapLoadingSystem.Static.GetPlanetMaps(generatorDef.FolderName, generatorDef.Context, generatorDef.PlanetMaps, out maps);


            m_materialMap  = maps[0];
            m_biomeMap     = maps[1];
            m_oreMap       = maps[2];
            m_occlusionMap = maps[3];

            if (m_biomeMap != null)
            {
                m_mapResolutionMinusOne = m_biomeMap.Resolution - 1;
            }

            m_generator = generatorDef;

            m_invHeightRange = 1 / (m_planetShape.MaxHillHeight - m_planetShape.MinHillHeight);

            m_biomePixelSize = (float)((planetShape.MaxHillHeight + planetShape.Radius) * Math.PI) / ((float)(m_mapResolutionMinusOne + 1) * 2);

            m_hashCode = generatorDef.FolderName.GetHashCode();

            // Material groups

            if (m_generator.MaterialGroups != null && m_generator.MaterialGroups.Length > 0)
            {
                m_biomes = new Dictionary <byte, PlanetBiome>();

                foreach (var group in m_generator.MaterialGroups)
                {
                    m_biomes.Add(group.Value, new PlanetBiome(group));
                }
            }

            m_blendingTileset = MyHeightMapLoadingSystem.Static.GetTerrainBlendTexture(m_generator.MaterialBlending);

            m_ores = new Dictionary <byte, PlanetOre>();

            foreach (var mapping in m_generator.OreMappings)
            {
                var mat = GetMaterial(mapping.Type);
                if (mat != null)
                {
                    if (m_ores.ContainsKey(mapping.Value))
                    {
                        string message = String.Format("Value {0} is already mapped to another ore.", mapping.Value);
                        Debug.Fail(message);
                        MyLog.Default.WriteLine(message);
                    }
                    else
                    {
                        m_ores[mapping.Value] = new PlanetOre()
                        {
                            Depth    = mapping.Depth,
                            Start    = mapping.Start,
                            Value    = mapping.Value,
                            Material = mat
                        };
                    }
                }
            }

            Closed = false;
        }
Example #8
0
        public PlanetMaterial GetLayeredMaterialForPosition(ref MaterialSampleParams ps, out byte spawnsItems, ref byte occlusion)
        {
            if (ps.DistanceToCenter < 0.01)
            {
                spawnsItems = 255;
                occlusion   = 0;
                return(m_defaultMaterial);
            }

            Byte           roundedMaterial = 0;
            PlanetMaterial voxelMaterial   = null;
            byte           spawns          = 0;

            bool computeOcclusion = m_occlusionMap != null && ps.SurfaceDepth > -(ps.LodSize * 2) && occlusion != 0;

            if (m_biomeMap != null)
            {
                spawns = m_biomeMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
            }

            if (m_biomePixelSize < ps.LodSize)
            {
                if (m_materialMap != null)
                {
                    roundedMaterial = m_materialMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
                }

                if (computeOcclusion)
                {
                    occlusion = m_occlusionMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
                }
                else
                {
                    occlusion = 0;
                }
            }
            else
            {
                if (m_biomeMap != null)
                {
                    roundedMaterial = ComputeMapBlend(ps.Texcoord, ps.Face, ref m_materialBC,
                                                      m_materialMap.Faces[ps.Face]);
                }

                if (computeOcclusion)
                {
                    occlusion = ComputeMapBlend(ps.Texcoord, ps.Face, ref m_occlusionBC,
                                                m_occlusionMap.Faces[ps.Face]);
                }
                else
                {
                    occlusion = 0;
                }
            }
            m_materials.TryGetValue(roundedMaterial, out voxelMaterial);

            if (MyFakes.ENABLE_DEFINITION_ENVIRONMENTS && voxelMaterial == null && m_biomes != null)
            {
                var rules = m_rangeBiomes[roundedMaterial];

                if (rules != null && rules.Count != 0)
                {
                    float height = (ps.SampledHeight - m_planetShape.MinHillHeight) * m_invHeightRange;

                    foreach (var rule in rules)
                    {
                        if (rule.Check(height, ps.Latitude, ps.Longitude, ps.Normal.Z))
                        {
                            voxelMaterial = rule;
                            break;
                        }
                    }
                }
            }

            if (voxelMaterial == null)
            {
                voxelMaterial = m_defaultMaterial;
            }

            spawnsItems = spawns;

            return(voxelMaterial);
        }
Example #9
0
        public MyVoxelMaterialDefinition GetMaterialForPosition(ref Vector3 pos, float lodSize, out byte biomeValue, ref byte occlusion)
        {
            biomeValue = 0;

            MaterialSampleParams ps;

            GetPositionParams(ref pos, lodSize, out ps);

            MyVoxelMaterialDefinition def = null;

            float oreDepth = ps.SurfaceDepth / Math.Max(lodSize * .5f, 1f) + .5f; // Hack to preserve position for ore detector.

            // Ore depositis from map come first.
            if (m_oreMap != null)
            {
                byte      ore = m_oreMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
                PlanetOre om;
                if (m_ores.TryGetValue(ore, out om))
                {
                    if (om.Start <= -oreDepth && om.Start + om.Depth >= -oreDepth)
                    {
                        occlusion = 0;
                        return(om.Material);
                    }
                }
            }

            PlanetMaterial voxelMaterial = GetLayeredMaterialForPosition(ref ps, out biomeValue, ref occlusion);


            // Extend depth to compensate for lod rounding
            float voxelDepth = ps.SurfaceDepth / lodSize;

            // Check layers
            if (voxelMaterial.HasLayers)
            {
                var layers = voxelMaterial.Layers;

                for (int i = 0; i < layers.Length; i++)
                {
                    if (voxelDepth >= -layers[i].Depth)
                    {
                        def = voxelMaterial.Layers[i].Material;
                        break;
                    }
                }
            }
            // Check single layered
            else
            {
                if (voxelDepth >= -voxelMaterial.Depth)
                {
                    def = voxelMaterial.Material;
                }
            }

            if (def == null)
            {
                def = m_subsurfaceMaterial.FirstOrDefault;
            }

            return(def);
        }
Example #10
0
        public unsafe void GetMaterialForPositionDebug(ref Vector3 pos, out MyPlanetStorageProvider.SurfacePropertiesExtended props)
        {
            byte spawns = 0;

            MaterialSampleParams ps;

            GetPositionParams(ref pos, 1.0f, out ps, true);

            props.Position = pos;
            props.Gravity  = ps.Gravity;

            props.Material = m_defaultMaterial.FirstOrDefault;

            props.Slope       = ps.Normal.Z;
            props.HeightRatio = m_planetShape.AltitudeToRatio(ps.SampledHeight);
            props.Depth       = ps.SurfaceDepth;
            props.Latitude    = ps.Latitude;
            props.Longitude   = ps.Longitude;
            props.Altitude    = ps.DistanceToCenter - m_planetShape.Radius;

            props.Face     = ps.Face;
            props.Texcoord = ps.Texcoord;


            props.BiomeValue     = 0;
            props.MaterialValue  = 0;
            props.OcclusionValue = 0;
            props.OreValue       = 0;

            props.EffectiveRule = null;
            props.Biome         = null;
            props.Ore           = new PlanetOre();

            props.Origin = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Default;

            PlanetMaterial voxelMaterial = null;

            // Ore depositis from map come first.

            if (m_oreMap != null)
            {
                props.OreValue = m_oreMap.Faces[ps.Face].GetValue(ps.Texcoord.X, ps.Texcoord.Y);
                PlanetOre om;
                if (m_ores.TryGetValue(props.OreValue, out om))
                {
                    props.Ore = om;
                    if (om.Start <= -ps.SurfaceDepth && om.Start + om.Depth >= -ps.SurfaceDepth)
                    {
                        props.Material = om.Material;
                        props.Origin   = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Ore;
                    }
                }
            }

            if (ps.DistanceToCenter < 0.01)
            {
                return;
            }

            Byte roundedMaterial = 0;

            if (m_biomePixelSize < ps.LodSize)
            {
                if (m_materialMap != null)
                {
                    m_materialMap.Faces[ps.Face].GetValue((int)ps.Texcoord.X, (int)ps.Texcoord.Y, out roundedMaterial);
                }

                if (m_occlusionMap != null)
                {
                    m_occlusionMap.Faces[ps.Face].GetValue((int)ps.Texcoord.X, (int)ps.Texcoord.Y, out props.OcclusionValue);
                }
            }
            else
            {
                if (m_biomeMap != null)
                {
                    roundedMaterial = ComputeMapBlend(ps.Texcoord, ps.Face, ref m_materialBC,
                                                      m_materialMap.Faces[ps.Face]);
                }

                if (m_occlusionMap != null)
                {
                    props.OcclusionValue = ComputeMapBlend(ps.Texcoord, ps.Face, ref m_occlusionBC,
                                                           m_occlusionMap.Faces[ps.Face]);
                }
            }

            m_materials.TryGetValue(roundedMaterial, out voxelMaterial);
            props.Origin = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Map;

            props.MaterialValue = roundedMaterial;

            if (voxelMaterial == null && m_biomes != null)
            {
                PlanetBiome b;

                m_biomes.TryGetValue(roundedMaterial, out b);

                props.Biome = b;

                // When the sample material is zero calculate the material using the definition rules;
                if (MyFakes.ENABLE_DEFINITION_ENVIRONMENTS && b != null && b.IsValid)
                {
                    foreach (var rule in b.Rules)
                    {
                        if (rule.Check(props.HeightRatio, ps.Latitude, ps.Longitude, ps.Normal.Z))
                        {
                            voxelMaterial = rule;
                            props.Origin  = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Rule;
                            break;
                        }
                    }
                }
            }

            if (voxelMaterial == null)
            {
                voxelMaterial = m_defaultMaterial;
                props.Origin  = MyPlanetStorageProvider.SurfacePropertiesExtended.MaterialOrigin.Default;
            }

            props.BiomeValue = spawns;

            // calc depth with what we already have
            float voxelDepth = ps.SurfaceDepth + .5f;

            // Check layers

            if (voxelMaterial.HasLayers)
            {
                var layers = voxelMaterial.Layers;

                for (int i = 0; i < layers.Length; i++)
                {
                    if (voxelDepth >= -layers[i].Depth)
                    {
                        props.Material = voxelMaterial.Layers[i].Material;
                        break;
                    }
                }
            }
            // Check single layered
            else
            {
                if (voxelDepth >= -voxelMaterial.Depth)
                {
                    props.Material = voxelMaterial.Material;
                }
            }

            props.EffectiveRule = voxelMaterial;
        }