Now it's time to go deeper into how we baked displacement maps.
Note
The geometry node setups shown here were necessary with Blender 3.5. Since Blender 5.0 the multiresolution displacement baking was significantly improved. Try the native baking features first.
Further down we go into the next topic of "Mixing & Fixing".
We realized the most accurate way to read the difference between the source and the target topology is to use geometry nodes. You can download the setup we used here:
This way we were able to read the difference in surface distance, save it as an attribute and add this attribute to the color of an emission shader. The target object can then bake the emission color of the other object.
This worked well but had one big downside. Geometry nodes are only able to read the geometry but not the shading. So the baked result will always be flat shaded.
To counter this we had to increase the subdivisions to 6, no matter what detail level we were baking. To achieve this we just needed to add an additional subdivision surface modifier on the target and source object. But it put a huge memory requirement on the baking process.
An alternative setup that we only worked out late in the production and barely ended up using, is vector displacement.
This definitely necessitates that the topology of the source and target are the same. But the result is much more accurate and captures the smooth shaded result as well.
We didn't extensively test the setup yet for baking shapes but you can download and try it here:
Each baked map was saved into a baking folder for further processing.
Each shape and detail is easiest to bake separately as they were sculpted. But they still need to be mixed together into shape maps. Some baking errors are also unavoidable and need to be painted out.
In the case of the facial shapes they were already sculpted together, so baking them already lead to the desired results.
But in the case of the clothing shapes it was more complicated. We sculpted each individual deformation as a single sculpt layer. Based on the Grouping we defined earlier on page 4, these still needed to be mixed together.
Doing this in a 2D painting application like Krita can lead to incorrect blending along UV seams. The better way was to do it directly in Blender.
For this we created a material on the base mesh where we imported each baked displacement map. With painted color attributes as masks you can then mix the textures to create the shape map. This can then be baked again to a single texture and exported.
Earlier we mentioned that the torso shapes were sculpted in 4 sculpt layers but will be merged into two shapes. This can be done now by painting color attributes to mask the front, back, left and right side of the lower torso. The 4 textures can then be mixed via the masks to only show stretching or compression on all sides.
Later on during rigging and shading the resulting two shape maps can be applied via the same masks that were used during the mixing here.
One unfortunate limitation of or workflow of using shapes instead of simulation for clothing is that only one shape can be used in an area at a time.
For example when the arm is being raised, this will result in very specific wrinkles and deformations. Also twisting the arm at the same time will make it very difficult to show the effect of both. Just adding both displacements on top of each other will look unrealistic.
The proper solution would be to create a unique shape for mixed deformations. But we unfortunately didn't have the time and rendering capacity for the resulting amount of displacement maps and shape keys, so we embraced this limitation.
A likely step to come last is painting out various baking errors. Even if you properly exploded you objects and baked everything correctly, there might still be issues you want to fix.
We did this in Krita by importing all baked shape maps and doing final touch-ups there. Because the baked textures are ideally be 16bit grey-scale images, it can be hard to paint on them and get results that still look good.
So the workflow we used primarily to blend out baking errors is to bake one really good default map without errors as a base, and selectively blend it into the other shapes.
Join to leave a comment.