Bake Wrangler - Node based baking tool set

Hi @netherby , Thanks for your reply.

  1. I can use the append function in the file menu for importing the node groups. Thanks for the suggestion.
  2. Suggestion for post bake script
    Data to be provied to the script - Baked Texture map “file name” and the “file path”
    Use Case - Create a new pbr material with the baked textures(albedo, roughness, metalness, normal …)
  3. Suggestion for “Output Image path node”
    Check box to create a Subfolder
    Use case - useful to organize each set of textures

Hi @lesiso
Did you try this Normal map pass under “Blender” Group?
image

@SAIINDIA, yes this node work correctly but there are some ray casting issues especially where geometry has a pronounced cavity.

I feel like blender’s native cycle bake pass is pulling rays whose can hit multiples surfaces.
Thus even if i adapt ray distance to approach the target surface in best way, there are rays hit multples surfaces and product artifacts.

thanks.

I’m sorry I completely forgot to set the color space to “non-color” in the Output settings node…
Now PBR textures normals node work perfectly ^^

Sorry for inconvenience, thanks.

I can easily give you a list of the image files output by the bake for the script, as that list is already generated for use internally (the images are reloaded or loaded into blender).

What would you want the subfolder to be named after?

1 Like

Ah, yeah there is some inconsistency there. Some of the Normals passes will ALWAYS output non-color regardless of what you choose (this is just how blender works internally), but others will respect what color space you chose…

I suppose I should just have all them always output non-color…

Suggestion for naming subfolder.

  1. We could enter the name manually.
  2. We could use the Object Name from file names node.

I think I can also use post bake script to make the folders and move the textures to that folders.

Yeah, A checkbox or an option in “OutputSettings” node to set the color spaces automatically would be great.

I’ve got question about materials. I’ve got several objects and three materials. I’d like to bake separate “map sets” that are named after materials. Is it possible to automatically add prefix from material name or do I need to assign separate prefixes in “output image path” node? I’m just baking normal (bevel) and AO for quixel mixer.

Here it goes my current setup that doesn’t work and I guess it’s not meant to work with objects :wink:
10 objects / 3 materials (object node) → input material node (material from object) → passes node (normal/AO) → output image path node

Hi @netherby
Is it possible to select Target meshes which has “_bake” as prefix using “Auto Sort Meshes” node?

Is it possible at all to exclude some geometry from UDIM baking?
Consider this scenario: Most of the mesh should be baked but part of it should use a non-baked texture.

For example, in this image there are 5 UDIM tiles, but then another very large segment of the UV on the left that I don’t want to be baked as part of UDIM process. Is this possible at all?

@Eneen I’m not completely sure what you want to do… The Input Material node just takes the materials and bakes them without the associated object, for like if you wanted to make a tileable image or something from just the material. You can’t use the material names to automatically create prefixes, you also can’t output each material on an object to a separate file without doing some extra set up. Is that what you’re trying to do?

@SAIINDIA You should be able to use any text string to select the objects, just make sure the search direction is set correctly and turn the case sensitivity to how you need. Also on your earlier question of getting the file names of baked objects, it is possible to do currently but requires a bit of code. I will make it simpler in the next update.

@Roboko Currently the UDIM tiles are automatically calculated from the UV map each time it is baked, so there is no way to include/exclude tiles as they haven’t been calculated prior to the bake starting. The most simple solution is to just make another UV map in which you scale all those unwanted faces down to a single point and place them somewhere in a tile you do want. You can then specify that the object uses that UV when baking and will only detect the tiles that have points inside them.

@netherby I’d like to bake material, but on object. I need two passes: AO and normals (just bevel-shaded edges). However I’ve got 3 separate group of objects with similar material applied, just different prefix to get 3 texture sets. Currently I’ve done it this way:


Obviously I will have more object groups and more materials, that’s why I’m asking if there’s more simple way to read material name from object and use it as prefix.

Ah I see. I don’t think there is a more simple method. You can get the material names using the input materials node, but you can’t then use those names with the input meshes.

You could create the the node tree via a script though to save time. I would do something like add all the object groups and the output node then have a script that for each objects node creates the input mush and pass nodes and connects them to the output, setting the name based on the material name of the first object in the group or something…

Something like this:

import bpy
tree = bpy.data.node_groups['recipe name']
nodes = tree.nodes
links = tree.links
objgrps = []
output = None

# Get the nodes into the variables
for node in nodes:
    if node.bl_idname == 'BakeWrangler_Input_ObjectList':
        objgrps.append(node)
    elif node.bl_idname == 'BakeWrangler_Output_Image_Path':
        output = node

# Process each group
for grp in objgrps:
    # Create nodes
    in_mesh = nodes.new('BakeWrangler_Bake_Mesh')
    pass1 = nodes.new('BakeWrangler_Bake_Pass')
    pass2 = nodes.new('BakeWrangler_Bake_Pass')
    # Link nodes
    links.new(grp.outputs['Objects'], in_mesh.inputs['Target'])
    links.new(in_mesh.outputs['Mesh'], pass1.inputs[-1])
    links.new(in_mesh.outputs['Mesh'], pass2.inputs[-1])
    links.new(pass1.outputs['Color'], output.inputs[-1])
    links.new(pass2.outputs['Color'], output.inputs[-1])
    # Set passes
    pass1.bake_cat = 'CORE'
    pass1.bake_core = 'NORMAL'
    pass2.bake_cat = 'CORE'
    pass2.bake_core = 'AO'
    # Set suffixs
    objs = grp.get_objects()
    mat_name = objs[0].data.materials.keys()[0]
    pass1.outputs['Color'].links[0].to_socket.suffix = mat_name + '_N'
    pass2.outputs['Color'].links[0].to_socket.suffix = mat_name + '_AO'
1 Like

Thx! I’m not into scripting but will try.
However, could this be a feature request? I mean when blender gets the painting module done I guess this will allow easier maps baking into UE.

It would have to be part of a change to the system that lets you bake individual materials on an object to different files. I’m not 100% sure of all the technicalities of that and it’s not a simple thing to change, but it’s possible to do.

(Normally I would say that if you want to do that, you should be looking at using UDIMs, but that wouldn’t help in your case)

1 Like

Hi. Great add on, Thank you! I am wondering if there is a way or plans to add alpha channel support to the split/combine channels nodes? I have been looking for a way to put channel info to the alpha without heading to Photoshop.

You can do that already and this is one of the main reasons I use this addon. You need to change the output settings for the RGBA image to 32 bit. I need to pack emit, roughness, AO and metallic into to a special non colour file. This layout might help explain.

Is there any way to bake materials with the Blender Combined pass? I can set a scene with the Input Material node like I can with the Input Mesh node. I have multiple objects that have the same material and I want those materials to bake to a single texture rather than a texture per object

Thank You!