AB4D Forum

Full Version: DXEngine material differences
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'd like to ask about how PBR and MultiMapMaterial works. 
1. PBR is physically based and can be done using specular or metallic workflow. From the properties (and samples shown) I assumed it uses the metallic workflow. Am I correct? Is there a requirement for the textures? Like should they be alpha premultiplied, use alpha channel for colors etc.
2. MultiMapMaterial is standard blinn-phong? Is there a restriction for the textures? For example, can the specular color (reflected light) be non-white?

We currently use MultiMapMaterial because few of our textures use standard diffues, normal and specular textures for blinn-phong (though our artist started to use PBR specular workflow). I've attached the textures used. He created the textures like this - albedo (diffuse) is simply color of the metal but the real color is defined in specular map (the color is given by reflection of the light - paint or lacquer). From the images attached, it seems that the MultiMapMaterial does not use the specular color at all. Even if MMM is not PBR it should not differ that much and the reflected color should still be used, or do I misunderstand the behavior?

Thanks,
Roman Janovsky

Used textures (will be deleted after a month):

[Image: https://ibb.co/GTZZWRK]
[Image: https://ibb.co/vXs44rH]
[Image: https://ibb.co/Sw4b6PD]
[Image: https://ibb.co/tz3JV8G]
[Image: https://ibb.co/fx2x8s0]
(Used this way since I could not attach the images to the post).
1) 
PBR is using metallic workflow. 
As it can be seen from the source code in the PhysicallyBasedRendering/PBRModelViewer.xaml.cs file (line 530), the base color texture can contain alpha color and can be alpha-premultiplied or not.
In case of using texture without alpha color, the PhysicallyBasedMaterial.BlendState should be set to CommonStates.Opaque and PhysicallyBasedMaterial.HasTransparency need to be set to false.
In case of using alpha texture, PhysicallyBasedMaterial.HasTransparency to true and set the BlendState to CommonStates.PremultipliedAlphaBlend or CommonStates.NonPremultipliedAlphaBlend.

2)
MultiMapMaterial is using blinn-phong shading. The specula map only defines the amount of specula color and not the color - you can set the specular color by setting the MultiMapMaterial.SpecularColor - but you can set only one color for the whole material.
So the specular map defines an intensity of some multiplier. Is it multiplying the resulting specular power, or is it modifying the shininess. Like 
1. specular = pow(specAngle, shininess) * intensity;
or
2. specular = pow(specAngle, shininess * intensity);
or even
3. specular = pow(specAngle, intensity);