I've been learning about the metallic-roughness PBR workflow and am trying to figure out the best way to implement it in Terragen. Basically following up on
this thread and making a few tweaks to the shading network that Matt recommends.
The three main maps are basecolor (albedo), metallic, and roughness. The basecolor map stores both the diffuse color (for dielectrics) and specular color (for metals). The metallic map is just a mask used to keep the two separate. This mask enforces the law of energy conservation by ensuring that any reflected light (diffuse + specular) will be less than or equal to the amount of light used to illuminate the surface.
An example of the shading network I'm working with now is attached. The metallic map masks two instances of the basecolor map, with the dielectric map inverted. Roughness and height (if used) are plugged in as usual, with roughness also directed to a reflective shader, which provides fresnel reflections on the oblique surfaces of the object. The specular shader is also masked by the metallic map. These are all set to 1 in the default shader: Diffuse color, specularity, roughness. Index of refraction is set to 10. In both basecolor image map shaders, "Fit mask to this" is unchecked. This is important to keep the two maps from being scaled differently and creating interference patterns across the UV map.
Of course, if the metallic map is completely white, the surface is pure metal and you can simplify the network. Likewise, if it's completely black, the surface is completely dielectric and you can
really simplify the network.
I wondered if it might be possible to set up an image-based lighting node in Terragen so I could duplicate the lighting used in the Substance Painter workspace and make apples-to-apples comparisons of surfaces between the two applications. Turns out that you can. Disable the planet, background, sun, and environment light. Create a sphere large enough to contain the object and your camera and assign an HDR image to it with a spherical projection. Give the sphere a negative radius to place the image on the interior, and flip the x direction of the image to correct the orientation. Turn off everything except luminosity, which can be set to 1-2. Works great with the path tracer. I understand it also will work with the standard renderer
if you enable the environment light. Doesn't work with RTP, unfortunately.
Some things might need to be tweaked to match the two views (image attached). For the IBL rendering of the teapot (also attached) I reduced the roughness slider to 0.5 to sharpen up the specular reflections a bit.
Much more to be learned here. Comments welcome, especially if anyone spots something I'm doing wrong.
If we ask nicely, I wonder if Planetside some day might give us a metallic-roughness shader. That would be sweet.