Baking displacement / height map from selected to active object

I’m trying to bake the surface difference between two objects into a black and white displacement map.
Blender can apparently do this for Multires modifiers but not between two individual objects:
image

Here’s an example to illustrate what the texture should look like. (It’s not entirely perfect.)

Is there something I’m missing, or is Blender really not capable of doing this?
Could anyone at least recommend a workaround?

I don’t want to be that guy, but in other software such as 3D Coat / Topogun / Lightwave this wouldn’t be an issue.

Welcome :tada:

maybe have a look here…

2 Likes

Blender indeed can’t bake displacement from selected to active. It’s a well known limitation, which a lot of people are waiting to see fixed. Blender’s bake system is one of the older and more limited parts of the software.

It still can be used, but you have to know this issue in advance and plan the workflow for it. If you want a displacement map, you will need to convert your object into a multires sculpt.

If your high poly sculpt was created from a clean subdivision and not a bunch of random triangles (dyntopo), it will be easy to do by rebuilding a new low poly mesh from the high detail sculpt.

  • Take your high poly sculpt as a starting point.
  • Put a multires modifier on it.
  • Use the multires modifier’s “unsubdivide” button to reconstruct the lower levels.
  • If you haven’t made UVs for the mesh before, you can now. Multires unsubdivide actually changes the base mesh even though the modifier is still on it, so you can go in edit mode and UV unwrap the lowest level without having to apply the modifier.
  • You can now bake from multires.
  • When you are done baking, you can set the multires to its lowest level, apply the modifier and you now have a low poly mesh with all the maps baked.

If you are dealing with unmatching or messy topology that can’t be unsubdivided, then you would have to use a shrinkwrap modifier to project the sculpted detail on a clean low poly mesh so you can then have it as a multires sculpt.

1 Like

You can use the pre 2.8x versions to bake displacements, try the 2.79 version. Unfortunately baking displacement maps was removed from 2.8+ versions.

1 Like

You can bake displacement maps and even vector displacement maps with geometry nodes as explained in a blogpost from the open movie CHARGE
https://studio.blender.org/training/realistic-human-research/chapter/baking-and-exporting/ scroll down to “baking with geometry nodes” :v:

There is a blend file with the setup that can be used for baking

3 Likes

You can bake displacements between objects, there are work arounds like robin gave above. You can also use shrinkwrapping+multi res combo

2 Likes

Indeed, baking is horrible in blender, and you can’t bake a plain raytraced displacement map with it.

But users must do what users must do, and so I once contributed an OSL shader that can do it to Bake Wrangler. (Bake Wrangler - Node based baking tool set)

It’s not terribly friendly as you have to understand and keep track of the distances (since there’s no automatic normalization) but it will get the job done.

3 Likes

Yup, that’s true.

But if (and only if) both meshes use the same UV space projection, it’s possible to bake the position from the HighRes and then subtract the Position from the LowRes surface and the result is a nice Displacement Map.

@Okidoki
It’s a great tutorial and the first to show up on Google, but in my case depth info had to come from another mesh and not a texture.
@etn249
Thank you, but in my case I had to work with two very different distinct models, so a multires modifier wasn’t an option.
@kkar
Yeah, I’m not entirely sure why they decided to remove it at all.
@robin.hohni
This is probably as good as it gets. Thank you very much. I also really like how they’re saving the depth info to an attribute so it works independently of UVs.
@Piotr_Adamowicz
I wouldn’t say baking is 100% horrible, but I’m definitely looking forward to any improvements the devs have in store in that area. Hopefully we’ll see a re-designed baking system within the next five years.
@Secrop
That was my initial plan, but it turned out the high res mesh didn’t have any UVs at all.

1 Like

There’s still the possibility to:

  • copy your lowres object and subdivide it to how much you can,
  • shrinkwrap it to the Highres,
  • and use that copy as your Highres.

It’s not perfect, and it might require some tweaking, but at least the UVs will be kept in the subdivision process.

1 Like

It was implemented in the age-old scanline Blender Render engine, which was removed because it wasn’t worth the effort updating it for 2.8.