I am trying to figure out what is the correct way to bake materials in the approximate hlod mode.
In \Engine\Plugins\Experimental\MeshModelingToolsetExp\Source\GeometryProcessingAdapters\Private\ApproximateActorsImpl.cpp if there is no override material you choose FullMaterialBakeOutputMaterial_PackedMRS or FullMaterialBakeOutputMaterial (based on spec+metallic+rougheness packing).
However, if I want to force one of these materials, I get a warning in ProxyMaterialUtilities.cpp:
Warning: Material FullMaterialBakeOutputMaterial_PackedMRS is missing required Material Parameters UseBaseColor+BaseColorTexture+BaseColorConst|UseDiffuse+DiffuseTexture+DiffuseConst, UseNormal, UseMetallic+MetallicTexture+MetallicConst, UseRoughness+RoughnessTexture+RoughnessConst, UseSpecular+SpecularTexture+SpecularConst, UseOpacity+OpacityTexture+OpacityConst, UseOpacityMask+OpacityMaskTexture+OpacityMaskConst, UseAmbientOcclusion+AmbientOcclusionTexture+AmbientOcclusionConst, UseEmissiveColor+EmissiveColorTexture+EmissiveColorConst|UseEmissive+EmissiveTexture+EmissiveConst, PackedTexture, PackMetallic, PackSpecular, PackRoughness
So the engine ignores my override and choose the default flatten material. This material is made for MergeActor tool and not HLOD. HLOD code does not properly set all static booleans (such as UseSpecular, UseAmbientOcclusion and so on). So the entire system works only if specular, roughness, metal map are baked.
I don’t understand what should be your HLODMaterial default value too: you choose GEngine->DefaultHLODFlattenMaterial in UHLODBuilderMeshApproximateSettings, but then revert to GEngine->DefaultFlattenMaterial in UHLODBuilderMeshApproximate::Build.
[Attachment Removed]