Other Texture Best Practices
Using alpha channel
Adding Alpha channel to texture should be done selectively and added only when really needed. Alpha can potentially make texture larger (as this will turn texture to 32 bit) and this will impact overall bandwidth.
Another way to store alpha channel is by using extra channel in Roughness/Metallic textures, instead of adding alpha channel to the diffuse texture.
- In Unreal/Unity for this texture we usually only use 2 channel out of 3, roughness (G) and metallic (B) and we have 1 extra channel to use. Ambient occlusion map usually can be baked (subtly) in the diffuse map.
- By using the free channel to store alpha mask we can keep the diffuse texture to be 16 bit and smaller file size.
A normal map is a good way to make a 3D object appear to have more detail. It's best used to add smaller detail such as wrinkles, bolt and all other details that will need lots of triangles to model. Usage of normal mapping may depend on the type and art direction of the game.
In most of our internal projects we've been using normal maping and there has been no noticeable performance impact from it. However, we target high end devices for most of our demos, so your mileage might vary with this.
Using normal mapping does come with a cost, even though it might not be noticeable.
- Normal map is 1 extra texture, meaning more texture fetches, which results in more bandwidth being used.
- Use normal map sparingly when targeting lower end devices.
Normal map baking best practice
- Cage is basically larger (pushed out) version of our lowpoly model. It also need to encompass the high poly model for the baking to work well.
- This is used to limit raycast distance used on normal map baking.
- Cage will also solve problems with split normal seams on normal map.
Bake using match by mesh name (if the baking software supports it).
- This will mitigate the problem of wrong normal map projection. When objects are too close with each other they may unexpectedly project normal map on wrong face. Using this method will ensure that baking only done on the right surface, with a matching name.
- Further information on Substance Painter can be found here along with the Marmoset Toolbag tutorial
Explode the mesh (if we can't do match mesh name for baking)
- Mesh explode means moving parts away from each other, so the normal map don't project to unwanted surface. This will also help with wrong normal map projection.
- We might need to do separate bake for ambient occlusion with this solution.
Split UV on hard edges
- Continuous UV on hard edges will cause visible seams.
Set the smoothing group on mesh
- One simple rule of thumb would be to keep the angle less than 90 degree and it should be set as different smoothing group.
- UV seams need to have different smoothing group on the triangles.
Have you read our guide on Geometry Best Practices?