Update 2022: For Terragen 4.5 and later, use this much simpler method instead: https://planetside.co.uk/forums/index.php/topic,30229.0.htmlEdit 2019: I've edited this post to add instructions for the Fresnel effect on metals, and also updated the instructions for using roughness maps.Quote from: cyphyr on June 28, 2019, 06:15:53 AMI assume that the sliders in the default shader should be set to 1 where a texture is loaded since the value of the texture is held within itself rather than in the shader node.
A fully black texture with the defuse slider set to 1 will give a fully black output.
A 50% grey texture with the defuse slider set to 1 will give a 50% output.
By setting the slider to 1 this allows the PBR texture to fully control its own values (as PBR textures are designed to do).
Is the above correct?
Obviously once this is set up the sliders can be tweaked for fine control.
Yes, that's all correct.
QuoteSecondly in the specular tab should I be using Glossy or Metal textures?
If you have a glossiness map, use that, but enable "invert roughness image", because glossiness is the inverse of roughness.
If your metalness map is close to black, just ignore it. But if you have highly metallic surfaces then you should take a different approach.
I assume that if you have a metalness workflow then you also have an albedo (or base colour) map. For non-metals (i.e. dielectrics, which most materials are), albedo or base colour should be assigned to "diffuse colour". For metals, albedo or base colour should be assigned to "reflectivity".
To create a
non-metal surface:
1. Set "diffuse colour" to white (1). Assign the albedo map to "diffuse colour image".
2. Set "reflectivity" to white (1), "reflection tint" white (1). You can use "index of refraction" at the default value of 1.5.
3. Set "roughness" to 1.0. Then
either assign your roughness map to "roughness image"
or use a separate Image Map Shader to load your roughness map and then plug the image map shader into the "roughness function". If you use an Image Map Shader you can experiment with the "data is linear" option on its Colour tab. Make sure you set the Image Map Shader's projection mode to "UV (if available)", and enable "Tile X" and "Tile Y" to avoid some surprises.
If you have a glossiness map instead of roughness, assign the glossiness map to "roughness image" and enable "invert specular roughness image".
To create a
metal surface:
1. Set diffuse colour to black. This is important.
2. Make your surface highly reflective by setting "reflectivity" to 1 (no texture map) and "index of refraction" to 10.
3. Assign your albedo map to "reflectivity image".
4. Set "roughness" to 1. Create a separate Image Map Shader to load your roughness map. Then connect the image map shader into the "roughness function" of the Default Shader. Make sure you set the Image Map Shader's projection mode to "UV (if available)", and enable "Tile X" and "Tile Y" to avoid some surprises.
5. Add a Reflective Shader after the Default Shader (the Default Shader should feed into the main input of the Reflective Shader). Set its roughness to 1, and connect the same roughness function that you did for the Default Shader. The reason to use a Reflective Shader is to add a Fresnel effect to make the reflectivity ramp up to 1 at glancing angles. In the real world this occurs even on dark and coloured metals. Without it your edges might look too dark.
If you have a metalness map that has different values within it, then really you need to mix two materials and use the metalness map as the mix controller. You can use a Merge Shader to do the mixing, and make use of its "mix controller" input. For most natural objects the metalness should be black (0) so you don't have to do this.
Notes on roughness vs. glossiness:
As I said earlier, glossiness is basically the inverse of roughness. But there may be discrepancies between renderers if they use a different mapping between 0 and 1. I plan to add more options to the shader to control the gamma/colour space of the image to help account for these differences. Without those options, you may need to experiment with gamma corrections of 2.2 or 0.454 on your roughness and/or glossiness images.
I recommend using a separate Image Map Shader to load the roughness map. This way you can experiment with the "data is linear" option on its Colour tab. This also helps if you need to connect the same roughness function to more than one shader, which happens a lot.
If you see any these issues, please send me comparison renders of what something looks like in TG vs. what it looks like in other renderers. This helps me understand what changes I need to make or what options I need to provide in the UI.
Matt