One way to do this is with an intermediate bake. Assuming the original object is displaced by the modifier along its normals...
(Bake Type: 'Emit') Bake the positions of displaced shading-points of the modified object, in object space, by using these nodes:
Use a floating-point format, some numbers in the next step will be negative, so OpenEXR is good. I've ...
I may be wrong but it looks like there's no automatic way to bake the height map of a Displace modifier.
If your object is flat with 3D relief, you can apply the Displace, give it a black and white gradient texture on the Z axis, plug it into an Emission, create a plane above and bake the Emit.
If it's a more complicated object, Ilakya gives here a method to ...
You're almost there. Here's how you do it.
First add a new material: Select your object and in materials settings press the +, then press New and name your material.
Next create a new UV vertex group, and unwrap it: Switch to UV Edit mode. Select the vertices or faces you want to add your new material too. Add a new UV Map and name it, then U unwrap your ...
I think you are getting too focused on the details and need to evaluate the overall goal. Sounds like you want to do:
Given an object
if no material assigned create new material
For each material in material_slots
ensure use_nodes = True
Add shader node 'ShaderNodeTexImage'
Set node location (0,0)
ob = bpy.context.object
It seems as though, as of Blender 2.92, baking a tangent space normal map without using Selected to Active does not work correctly in the presence of modifiers. I have opened issue T87449 on the Blender bug tracker about this.
In the meantime, there are a few workarounds:
Apply modifiers before baking. This is probably the best workaround, since it’s easy ...
I just had this issue. I know it's months late but I was able to figure it out. In the multires modifier there's an "apply base" option that conforms the base to match the sculpt. This fixed the issue for me.
So I've been racking my brain with this problem for half a year now. I've wanted to be able to make texture painted hair cards that I apply to flat meshes but then build up more complex clumps that I can bake out to get moss or do shells and fins techniques.
I finally cracked it playing around in Blender today. At least as long as I'm baking it to a flat ...