Baking requires a bit of preparation to get the desired results.
Essentially we want to get our sculpted shapes separated into three levels of detail. All these three combined should look exactly like the high resolution sculpt:
For this step we want the proportions of our high res sculpt on our low poly base. Since our sculpted shape is defined on the Multires subdivisions we still have a base mesh that is completely unchanged.
One solution is to use "Apply Base" on the modifier. But this will lead to an inflated result to counter subdivision shrinking. The ideal base is actually one that will have the exact same proportions as the high res sculpt.
There's a straight forward way to achieve this. We need to duplicate the sculpt and apply the Multires modifier (Ideally on level 1 to save time). Using "Unsubdivide" or "Rebuild Subdivisions" will lead to a base topology that has the exact same vertex positions as the high res sculpt, on any vertex they have in common.
Tip: "Do not use the 'Decimate' modifier for unsubidiving.
This is less accurate and can lead to mismatching edge data and vertex counts."
This can then be done for the resting pose sculpt, as well as all other sculpted shapes. Name the new objects accordingly and save them for later rigging.
Note: Make sure that the correct sculpt layers are enabled on each shape. For example for Einar in Project Heist we enabled the sculpt layers for wrinkles for all shapes and the default shape as well, because they were slightly influencing the form of up to subdivision level 3. Your setup might be different though.
If needed it can be useful to include the original symmetrical base mesh, that was saved from way earlier, in the lineup of exported shapes.
For the displacement map baking we did not bake directly from the Multires modifier. This currently can lead to faulty or even completely inaccurate results.
Instead we baked from a source object (sculpt) to a target object (base level mesh).
The created shape keys are great to use as a target here.
Note: It's important to set the source and target object at the same subdivision level.
For baking the shapes we used the subdivision level 3 to capture every change in the form and silhouette of the face. For this the target object just needs a Subdivision Surface modifier, while we set the Multires level on the source object also to 3.
For any bump maps, like for wrinkle maps and pore details we instead subdivided the objects differently. The source object got a level of 5 or 6, depending on which the highest level for the detail is. The target object will need a displacement modifier with the already baked displacement map of the default resting pose added. This will make sure that on subd level 3 the shape of the source and target match.
After that another subdivision surface modifier is added to subdivide the model another two times. This is to make the target and source objects match in subdivision count for baking.
If this is slowing down the viewport too much it's wise to disable the modifiers for the viewport and only use them in rendering.
With this setup we'll have the base, level 3 and level 5 separated and baked to be combined later on.
The workflow of source-to-target baking can lead to baking errors, especially from intersections. In our case by using our own geometry nodes baking setup (More on that in a bit) we don't need to worry about a cage mesh or intersections between the source and the target. What we need to pay attention to is intersections within and among the source objects.
A common way to fix this is to "explode" the objects. This is the practice of moving objects and meshes so far away from another so that they don't affect each other during the baking anymore. Especially for ambient occlusion maps this is very useful.
In our case it's mainly about avoiding intersections in the mesh like closed lips and eyelids, as well as limbs bending in ways that cause self intersections.
The solution here is to add a shape key called "Baking" or "Explode" where we move away the intersecting areas with a very soft falloff. For displacement/normal maps this will lead to no difference in the accuracy of baked maps.
Just make sure to convert the shape key into a sculpt layer for the source object as well and to enable it during baking. Both objects still need to match.
Note: We noticed that the results from mixing sculpt layers can look different than mixing shape keys! So an important advice for very strong or rotational deformations, is to mix the "Explode" and shape sculpt layers together and export them as a single shape key. This shape key should then be the target object to bake to. That will ensure that both have the exact same proportions.
The results of the Displacement Geonode setup are awesome. Thanks a ton for this. It's fantastic what can be done in GeoNodes when you know what you're doing. On the other hand I seriously question, if the Devs are aware that baking from the multires modifier is faulty, why still leave it in this condition? Every time I need to bake a displacement map from within Blender, every now and then, I have to come back to this tutorial and learn how to use the GeoNode setup again. And it's taking a lot of time to set everything up. Couldn't this at least be made a bit more easy to use and be included in a default GeoNode package for the time being?
@Alex Dumproff In the latest release of Blender 5.0 the baking was significantly improved. Various artefacts should now be gone and the result is much more accurate. It even now supports vector displacement baking:https://www.blender.org/download/releases/5-0/#:~:text=Multiresolution%20Baking
We didn't test this in production extensively yet. But for our latest film project we used the new baking for some details of this creature. The results looked good. So I can recommend to give it a try.
@Julien Kaspar oh wow ... you're right - very cool. The results immediately DO look really good. Does the Bake or Multires Modifyer write the peak displacement factor somewhere so I know how strong to set the displacement factor for a precice replication? Didn't find anything about it in the documentation.
@Alex Dumproff Sadly that is still something that is missing AFAIK. The best way right now to bake to 32-bit floating point images and save them in a format that doesn't clamp the range of colors (EXR for example). That way the values won't get normalized and there's no need to input a specific displacement scale value. In that case a value of 1.0 should be exactly right.
I know that won't work for images that need to be smaller in disk space. I don't have a solution for that yet, sorry. Perhaps the provided geo nodes modifier is still giving the same scale value that will be used for a normalized Multiresolution bake result. I will have to test this.
Join to leave a comment.