public static SplatDatabase Convert(IExportContainer container, ref SplatDatabase origin)
        {
            SplatDatabase instance = new SplatDatabase();

            if (SplatDatabase.HasTerrainLayers(container.ExportVersion))
            {
                instance.TerrainLayers = GetTerrainLayers(container, ref origin);
            }
            else
            {
                instance.Splats = origin.Splats.ToArray();
            }
            instance.AlphaTextures      = origin.AlphaTextures.ToArray();
            instance.AlphamapResolution = origin.AlphamapResolution;
            instance.BaseMapResolution  = origin.BaseMapResolution;
            if (SplatDatabase.HasColorSpace(container.ExportVersion))
            {
                instance.ColorSpace = origin.ColorSpace;
                instance.MaterialRequiresMetallic   = GetMaterialRequiresMetallic(container, ref origin);
                instance.MaterialRequiresSmoothness = GetMaterialRequiresSmoothness(container, ref origin);
            }
            return(instance);
        }
 private static bool GetMaterialRequiresSmoothness(IExportContainer container, ref SplatDatabase origin)
 {
     return(SplatDatabase.HasColorSpace(container.Version) ? origin.MaterialRequiresSmoothness : true);
 }