Difference between revisions of "Content Dev:CC Normals Bake"
Chuck (RL) (Talk | contribs) m (→Hard vs Soft Edge Comparisons) |
Chuck (RL) (Talk | contribs) m (→Hard vs Soft Edge Comparisons) |
||
Line 168: | Line 168: | ||
From the test cases above, we can deduce that shading artefacts on the soft-edged low poly is not very obvious when the angles are blunt or obtuse (greater than 90°). However, once the angle is sharp or acute (less than 90°) then the problems in the shading become obvious. In comparison, in all cases where the hard-edged low poly was used, there is no practical visual disparity between the high and low poly shading. The differences are even more evident when looking at the normal textures below. | From the test cases above, we can deduce that shading artefacts on the soft-edged low poly is not very obvious when the angles are blunt or obtuse (greater than 90°). However, once the angle is sharp or acute (less than 90°) then the problems in the shading become obvious. In comparison, in all cases where the hard-edged low poly was used, there is no practical visual disparity between the high and low poly shading. The differences are even more evident when looking at the normal textures below. | ||
+ | |||
+ | {{Duo_Illustration | ||
+ | |Hard_soft_edge_normal_map_02.png|Soft-edged 90° low poly normal map.| | ||
+ | |Hard_soft_edge_normal_map_01.png|Hard-edged 90° low poly normal map.| | ||
+ | }} | ||
+ | |||
+ | From the test case above, it is obvious that the normal map for the soft-edged low poly geometry has to work a lot harder to create the illusion of hard edges. It does this by compensating for the smoothness of the low poly geometry by countering the shading with vast swaths of gradients. If the destination 3D application can not rework the shading, then attaining proper smoothness is impossible. In contrast, the hard-edged low poly mesh already possesses the proper hard edged shading. Therefore, it does not have to compensate with gradients in order to render smooth, flat surfaces. | ||
+ | |||
+ | The results does not mean that one should use hard-edged surfaces at all costs and avoid the use of soft-edged surfaces. In fact, both have their specific use cases. We recommend the use of soft-edged meshes for blunt angles and soft objects such as cloth, and hard-edged meshes for sharp angles and hard surfaces like metals. |
Revision as of 22:13, 26 November 2017
- Main article: CC Content Development.
The Current Problem
Lax normal implementation for general props in iClone will have no problems. However, when the same normals implementation is applied to a skinned mesh and brought into iClone, problems do occur. This is because normal recalculations inside iClone will result in shading artefacts.
Particularly obvious are the concave shading effects on the skinned mesh. Working backwards to fix the normals for the skinned mesh will, in turn, cause shading problems when applied to a prop. Continue reading this article to acquire the know-how for creating normal maps that is compatible with both props and characters inside CC and iClone along with any other major third party 3D software.
Normals Baking Process
Basic Workflow
Prior Problematic Workflow
- Align the high and low poly geometries.
- Completely smooth the surface normals for the low poly geometry as a single smoothing group.
- Create the offset cage.
- Bake the normal map from high to low poly.
Latter Improved Workflow
- Align the high and low poly geometries.
- Apply appropriate smoothing groups to the low poly mesh.
- Split UV seams along hard edges according to the smoothing groups.
- Create the offset cage.
- Bake the normal map from high to low poly.
- ⚠ Most drastic changes in the new workflow is in the handling of smoothing groups, UV splitting and bake cage creation.
Important Points
Smoothing Groups
The point of smoothing groups is to create hard and soft surface shading. This relieves the normal map from having to change a smooth look to a hard look for broad surfaces, and vice versa. Instead, the normal map can be left to its strengths, which lies in the rendering of fine details.
As illustrated, when a hard surface object does not have proper smoothing groups, then the baked normal map will create a gradient effect across mesh faces of large surface angles. This also has a slight effect on the lighting of object. Smoothing groups should be set when dealing with hard surfaces with acute surface angles.
UV Seams Separation
Black edges often appears in the normal map that is produced from a low poly mesh with smoothing group set to hard. Which, can be fixed by using UV split and separation. This problem is the result of the inability of the UV line to sample the appropriate side of a hard edge, resulting in a gap where nothing is sampled.
Creating the Bake Cage
The use of a projection cage can prevent bake artefacts from ray mis-direction by providing a target for the ray to point toward. Ray mis-directions can result in strange shading on the mesh, particularly around hard edges.
Using xNormal's SBM Format
3DS Max SBM plugin
1) Select the high poly model for export and select xNormal SBM Exporter (*.SBM) in the dropdown menu.
2) Click on the High definition mesh and press on the Export button.
- Some things must be done to the low poly model before it can be exported.
3) On the Editable Poly apply an Edit Mesh modifier or change the model type to Mesh. This step is needed because xNormal can not create a cage from Poly or Path.
4) Apply a Projection modifier on top of the modifier stack and export the low poly in (*.SBM) format.
5) Select Low definition mesh and press the Export button.
6) Pay attention to the Log message and adjust the export process when necessary to export the mesh successfully.
7) Launch xNormal and drag the mesh files into their respective low and high poly slots.
8) Make sure to enable Use cage option for the low poly file.
9) Set the export directory and image sizes then bake the textures.
Creating the Projection Cage in 3DS Max
1) Select the high poly mesh and export it in OBJ format. Make sure to not check any of the Optimize settings to prevent the software from changing aspects of the mesh.
2) Select the low poly mesh and apply a Projection modifier to create a semi-transparent cage.
3) Adjust the size of the cage for the Projection modifier then click the Export... button to save a cage that is slightly larger than the base model.
4) Open xNormal and import both the high and low poly model.
5) Check Use cage for the low poly model.
6) Right click on the low poly model input and select Browse external cage file to load in the exported cage file.
7) Double check the export directory and texture size and proceed to bake the textures.
Cautionary Points
Inter-application Mesh Transfer
Issues with Under Optimized Mesh
Subdivisions for Substance Material
Quadrangulation Issue
Test Cases
Hard vs Soft Edge Comparisons
There are significant shading differences between a hard-edged low poly geometry and a soft-edged low poly geometry.
From the test cases above, we can deduce that shading artefacts on the soft-edged low poly is not very obvious when the angles are blunt or obtuse (greater than 90°). However, once the angle is sharp or acute (less than 90°) then the problems in the shading become obvious. In comparison, in all cases where the hard-edged low poly was used, there is no practical visual disparity between the high and low poly shading. The differences are even more evident when looking at the normal textures below.
From the test case above, it is obvious that the normal map for the soft-edged low poly geometry has to work a lot harder to create the illusion of hard edges. It does this by compensating for the smoothness of the low poly geometry by countering the shading with vast swaths of gradients. If the destination 3D application can not rework the shading, then attaining proper smoothness is impossible. In contrast, the hard-edged low poly mesh already possesses the proper hard edged shading. Therefore, it does not have to compensate with gradients in order to render smooth, flat surfaces.
The results does not mean that one should use hard-edged surfaces at all costs and avoid the use of soft-edged surfaces. In fact, both have their specific use cases. We recommend the use of soft-edged meshes for blunt angles and soft objects such as cloth, and hard-edged meshes for sharp angles and hard surfaces like metals.