Terragen 4.5 Default Shader PBR "Metalness - Roughness" workflow

Started by Kevin Kipper, August 24, 2022, 07:44:16 PM

Previous topic - Next topic

Kevin Kipper

The goal of this post is to clarify the proper PBR workflow using the Default Shader in Terragen 4.5 and later.  In this first example, we'll use a "Metalness - Roughness" workflow approach and assume that your 3D object has been UV mapped and that the texture maps were authored in a PBR software package such as Substance Painter.

As you can see in the imported object's internal node network view, each surface defined in the object has a single Default Shader assigned to the Shader input of the Object Part node.

PBR_00_InternalNodeNetwork.jpg

Keep in mind that many of Terragen's parameters are meant to work together in order to achieve the final result.  For example, the final surface colour is based on three parameters; the "Base colour", the "Colour image", and the "Colour function".  Mathematically it looks like this:

Final colour = Base colour * Colour image * Colour function

Colour Tab
The base colour texture map should be assigned to the "Colour image" parameter, and the "Base colour" value should be set to 1.  By default, the image projection is set to "Object UV (if available)" which can be found under the Images tab.

PBR_01_ColourTab.jpg

PBR_05_ImagesTab.jpg

Roughness Tab
The roughness texture maps should be assigned to the "Roughness image" parameter, and the Roughness value set to 1.

The "Remap ^2" checkbox provides additional compatibility with the way in which the roughness texture map was originally authored.  Some 3D application shaders expect the roughness map to be linear, while others expect the map to contain square root values and the shader will raise them to the power of 2.  If your material appears to be too bright, shiny or reflective, try disabling the "Remap ^2" checkbox.

PBR_02_RoughnessTab.jpg

Specular Tab
The metalness texture map should be assigned to the "Metalness image" parameter, and the Metalness value set to 1.

PBR_03_SpecularTab.jpg

Displacement Tab
The height texture map should be assigned to the "Displacement image" parameter, and the "Displacement multiplier" value can be adjusted accordingly to increase or decrease the displacement.  In this example, we converted the output from Substance Painter's normal texture map, to a height texture map via Bounding Box Software's Materialize application, as it gave us some additional control over the contrast in the texture image map.

PBR_08_DisplacementTab.jpg

The renders below illustrate the Metalness - Roughness workflow when authoring textures in a PBR application such as Substance Painter, and then assigning the texture maps to the Default Shader in Terragen.

PBR_07_MetalnessRoughnessWorkflow_SPvTG.jpg

KlausK

Kevin, thank you very much for this little tutorial. Much appreciated.

This is the kind of "how to" which really helps "translating" the workflow present in other 3D applications to Terragen.
Maybe you could make posts like this "sticky" so they do not get lost deep in the forum over time.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

Dune

Thanks for posting this, Kevin. Clarifies a lot. I agree with Klaus about sticky, or add to wiki (if it's not there already).

Hannes

Great! Thanks a lot, Kevin! Very good clarification. Now, the only thing, that's missing, is normal map support. But I know it's on your todo list.

pixelpusher636

Thanks for this Kevin. It wasn't until recently that aknight straightened me out on how TG handles PBR now. I was still setting things up the old and complicated way. Your post really answers a few lingering concerns I had. I appreciate the time you took here to explain.
The more I use Terragen, the more I realize the world is not so small.

WAS

Nice post. I'm curious, are these "smoothness" maps I encounter, where "roughness" doesn't exist, the same thing? Are they just randomly using an opposite name?

Kevin Kipper

Hey WAS,

Good question.  Below are a couple links from the Blender and Unity sites about smoothness maps, and Adobe's Substance Painter PBR workflow. 

https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSmoothness.html
https://blender.stackexchange.com/questions/121787/what-is-a-smoothness-map
https://substance3d.adobe.com/tutorials/courses/the-pbr-guide-part-2

Blender defines the smoothness map as the invert of the roughness map.  If this this is simply a naming convention issue, then I assume that the texture map could be used interchangeably by clicking the "Invert (gloss map)" checkbox under the Default Shader's Roughness tab.

However, it would be important to know which workflow was used to author the PBR texture map in the first place; a "Metalness - Roughness" workflow or a "Specular - Glossiness" workflow.  The "PBR Guide Part 2" link above goes into depth regarding the differences in the maps created for each workflow and if the "smoothness map" was authored from a "Specular - Glossiness" workflow I'm not sure it would respond correctly in Terragen's Default shader as it has been optimized for a "Metalness - Roughness" workflow.  We have plans to address the "Specular - Glossiness" workflow in the future.

WAS

This is probably the cause of some funky PBR materials I've come across. I don't think they were actually made adhering to the philosophy here, but made with something like Materialize like I have, and arbitrarily converted other textures.

The most issue I seem to have with PBR are rogue finds, and I don't think they are following methods described here, or like you mention, or  are a "specular - glossiness" workflow rather than "metalness - roughness"

Thanks for this post, it's seemingly to shed a lot of light on issues I had where I thought I was doing things correctly for the default shaders as described here.