ShaderMap Version 3.x
Normal Editor: Layer System
The Normal Editor Layer System provides a way to organize (from top to bottom) order, adjust blending and intensity, preview displacement, lock/unlock, and adjust profiles for each layer. The Layer Panel also provides methods for creating, deleting, duplicating, and merging layers. In this section we will talk about each part of the Layer Panel.

Blend Modes - There are seven blend modes available for each layer. The blend mode defines how a layer's normals are blended with the normals below it. The opacity value acts as a weight to the normal vector being blended. The normal is rotated towards Up as the opacity value decreases. So an opacity value of 0 would leave all layer normals facing Up prior to blending.

A description of some of the blend modes can be found in the article Blending in Detail by Colin Barré-Brisebois and Stephen Hill. A brief description of each blend mode follows:

Blend ModeDescription
Standard This is a simple averaging of the normals. The formula is as follows:

normalize( vec3( v3_0.xy + v3_1.xy, ( v3_0.z + v3_1.z ) / 2 ) );

UDN This is a formuala found on the Unreal Developer Network in their article Material Basics: Detail Normal Map. It takes the form:

normalize( vec3( n1.xy + n2.xy, n1.z ) );

RNM Reoriented Normal Mapping is the method presented in Blending in Detail by Colin Barré-Brisebois and Stephen Hill. It takes the form:
v3_0 = tex2d(base_layer, uv).xyz * vec3( 2, 2, 2) + vec3( -1, -1, 0);
v3_1 = tex2d(top_layer, uv).xyz * vec3( -2, -2, 2) + vec3( 1, 1, -1);
v3_0 * dot( v3_0, v3_1 ) / v3_0.z - v3_1;

Unity This method is from the Unity tech demo and was recently presented at GDC by Renaldas Zioma. It takes the form:

mat3 nBasis = mat3(
   vec3( v3_0.z, v3_0.y, -v3_0.x ),
   vec3( v3_0.x, v3_0.z, -v3_0.y ),
   vec3( v3_0.x, v3_0.y,  v3_0.z ) );
normalize( v3_1.x * nBasis[0] + v3_1.y * nBasis[1] + v3_1.z * nBasis[2] );

Whiteout Partial Derivative Blending of normals is covered by Jörn Loviscach in his articel Care and Feeding of Normal Vectors. It takes the form:

normalize( vec3( v3_0.xy * v3_1.z + v3_1.xy * v3_0.z, v3_0.z * v3_1.z ) ) * 0.5 + 0.5;

Greater Angle This method chooses between the two blended normal vectors. It selectes whichever vector has the greater angle away from the "Up" vector.

Lock States - A layer can be unlocked, pixel locked, and position locked. If unlocked the layer can be modified in every way. When pixel locked no changes to the layer's content can be modified. When position locked the layer cannot be moved. A layer can be both pixel and position locked at the same time.

Intensity - The intensity value determines the strength of the normal. In displacement and shape layers this determines the strength of the normals generated from the embedded displacement pixels of the layer. In rasterized normal layers this value modifies the current baked vectors.

Displacement Preview - On layers with embedded displacement (displacement and shape layers) the user can enable displacement preview by selecting the layer and checking the View Disp checkbox. The displacement will be rendered on the canvas rather than the normals for that layer.

Layer Order - Layer's can be organized up and down in the layer control. Simply click drag the selected layers to a new position in the layer control. Changing the layer order changes the order they are drawn to the canvas.

Layer Name - Double clicking a layer's name allows the user to change the name of the layer.

Edit Profile - Double click on a layer (but not on its name) and this will bring up the dialog for the layer profile. You can also bring the dialog up by selecting a layer and clicking the 'P' button located at the bottom of the Layer Panel.

Context Menus - By right clicking on any layer you will be provided with options for deleting, merging, clearing/copy/pasting profiles, etc. Take some time to familiarize yourself with each layer type's context menu.

Creating Layers - New layers can be added to the project by clicking one of the plus buttons located at the bottom of the Layer Panel. The first is for creating Normal layers, the second for creating Displacement layers, and the third is for importing an image as a layer from file. When importing a layer it can be a normal map or a displacement map.

Deleting Layers - There are three ways to delete a layer. The first is to select layers using the Transform Tool and pressing the Del key. The second is to select layers in the Layer Control and press the - button located on the bottom of the Layer Panel. The last way to delete layers is to select Delete from a layer's context menu.

ShaderMap Software Documentation
Copyright © 2016 Rendering Systems Inc.