Bake Wrangler - Node based baking tool set

what is a validation error.

It seems that BW throws an error because ezbaker applies the modifiers when making the cage while the target it was made from doesn’t have them applied.

Seems like blender internal and simple bake are fine with having the cage have applied modifiers but not BW.

Yes, currently before baking BW will check that the cage has the same number of faces as the target. If it doesn’t that is considered an error. However this doesn’t take into consideration unapplied modifiers…

I think I will remove that check and instead have a check before baking that can account for all modifiers. Then report any problems there and if the cage is invalid just bake without it…

I think it’s kinda moot. Baking onto meshes with unapplied modifiers is just asking for trouble anyway.
(well, those that alter the topology)

In this situation it was the triangulate that was throwing it off

Just apply it. Keep a backup if you ever need to edit it. :man_shrugging:

I just applied it did the bake then ctrl-z lol

While it’s sort of moot, it does stop a potentially valid cage from being used. So I will change the behaviour…

I want to have better support for UDIM. It’s something I’ve been thinking about. I can do some basic stuff for sure. But for proper support I probably need to make a small add-on which fixes the gaps in the current UDIM state in Blender…

@Lamia Visualising automatic cages has a few problems. Mainly there is no concept in Blender of what the active node tree is. You can have many node trees open in different windows and there is no way to ‘select’ one. Which means there isn’t really a state the viewport can look at to work out what cages for what node tree should be getting drawn. Coming up with a good solution is a bit complicated! :stuck_out_tongue:

Hmm you showed a picture before on a list with objects in groups if that view was something persistent then you could put a cage view toggle near idavidual objects as well as the whole group it self to turn the visualiser on and off sort of like an outliner for bake groups.

Is it have itself thread on BA for more FAQ?

It is indeed, but one easy solution is to simply add the generated cage objects to the scene so we can see them. If you set an identifying property on them, you can have another button to update them and one to clean them up. It’s not as automagic, but it would be better than guessing the distance.

thanks for taking UDIMs it into consideration… I think splitting up files based on UDIM tiles or Materials is quite necessary… because that is how all other painting apps (substance, quixel) expect the maps to be…
Its already possible by splitting the mesh into objects according to UDIM and using the mesh input in image node… only the naming needs to be fixed… instead of mesh name… use the name from UDIM or the Material…

I could have a button that creates cages for all the objects with the current settings. If you changed the settings you would then have to press a button again to see the results. Another button could also remove them.

I don’t feel like that is ideal. But maybe it’s a good intermediate solution that should be relatively easy to implement.

As to UDIMs I can add the correct number to the end of the file name. Interpreting the raw UV data will add some extra time to baking (Blender doesn’t associate UDIM meta data with UV maps or Objects currently). I could add a property that could be used to link the UDIM tiles to something, but a dedicated UDIM Wrangler would probably better suited to bridge the gaps in that case.

Eh, it’s not so bad, I think. Instead of just visualizing, it allows you to just take the cage and tweak it if you like.

I agree with this having a physical cage is a lot better some times when you enlarge a cage there are small details that colaps in to each other and you need to clean it up a bit.

I think what ezbaker does is remove and remake the cage every time you change the size settings im not sure how the performance scales though i don’t imagine to well updating possibly 30+ objects on a slider might be an issue.

My concern is that dynamically modifying a large number of objects would be at a pretty high risk of crashing blender or at least becoming unresponsive. Addons like HardOps do it, but in that case its only objects you specifically selected. So if you selected 30 objects and tried to dynamically bevel them it’s your fault.

So I think it probably needs to be non-interactive just to protect against there being too many objects. There could be an interactive mode that either only operated on one object or only on currently selected objects. I’m not sure how useful that would actually be…

Okay! I’ve uploaded beta 3 of the current version. This adds:

  • Cage tools
  • Bake of single suffix (file)

The cage tools are a fairly simple solution for visualising and modifying automatic cages. You will find 3 buttons in the side bar on the ‘Bake Wrangler’ tab called Generate, Update and Remove.

Generate and Update only do anything if Auto Cages are enabled for some objects that are in the current scene. They also won’t do anything for objects that are hidden or in a disabled collection. That is to give you some control over excluding stuff (This doesn’t apply to Remove, but it will in a later update).

Once a cage has been generated for an object, it will be used when baking (so long as it’s valid) and you can manually edit it as you like. To stop the cage from using used you will need to use the remove button.

The Generate button will also only apply to objects that don’t have a cage yet, it won’t replace existing ones. The cages all get placed in the ‘BW Cages’ collection which will be linked into the current scene if not there.

The Update is for when you change your auto cage settings and will apply the new settings to existing generated cages. There is a modifier on the cages called ‘bw_cage’, if that modifier isn’t on the object then Update will make a new object and assign it as the cage. Which would cause any changes to be lost. But so long as the modifier is on the object it will just update it, keeping user changes.

Cages are not deleted in any case, they are just unlinked and will still be in your file in the orphaned data section (until you save and reload or purge orphans). So you can always get previous cages back (they will be named ‘obj.cage.001’ etc). The buttons all support undo as well.

None of this stuff has to be used for cages, auto cages functions normally. But it adds extra cage tools based around the auto cage feature.

Hopefully it’s all working correctly. Let me know what you think about it. Remember if you change a cage you need to keep the number of faces the same. An error message will come up in the bake if a cage is invalid, but the bake will continue without the cage.

2 Likes

This sounds great! Will test soon!

I see no buttons currently.

EDIT: All good i deleted the pycache and i can see it now.

EDIT2: Generate cages is doing nothing and yes autocage is enabled.