1
$\begingroup$

I have a object (face with hair) and I want to get the albedo from my diffuse color pass in Blender 2.8. I only get the image without hair. How can I get the whole image or just its albedo color? I attached a simple example as well.

The code is:

def _prepare_albedo_node_graph(tree: bpy.types.NodeTree): if bpy.context.scene.render.engine != "CYCLES": raise RuntimeError("Depth GT (Radial Depth) is only supported with CYCLES renderer")

render_layers = tree.nodes["Render Layers"]
albedo_output_dir = tempfile.mkdtemp()
bpy.context.view_layer.use_pass_diffuse_color = True


albedo_output_file_node = tree.nodes.new('CompositorNodeOutputFile')
albedo_output_file_node.base_path = os.path.join(albedo_output_dir, "Albedo_c")
albedo_output_file_node.file_slots[0].path = "albc######"
tree.links.new(render_layers.outputs["DiffCol"], albedo_output_file_node.inputs["Image"])

return albedo_output_dir

enter image description here

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .