Bake Wrangler - Node based baking tool set

Ok currently the target needs to be visible for it to work but the source is what needs to be visible instead. you are trying to fit the target cage to the source. Great work so far though.

EDIT: or it could work on both.

No, the source is irrelevant to the cage (there can be many source objects associated with any number of tragets). It has to be based on the target. But it could not require the target to be visible, or it could require it but hide the target after making the cage or it could work only if the target is hidden instead?

The idea behind the visibility thing is so you can exclude objects…

It’s fine i guess, i just need to make sure the low poly is visible as well, i do a lot of bakes where im just capturing detail to flat surfaces of the mesh, but in this case i can just make sure the low and high are visible at the same time it’s not a big deal.

EDIT: I think having a visibility checkbox might be the best option maybe, what ever way you want the default to work is up to you.

How it would work is that if enabled it would create the cage based off the target regardless of it’s visibility status and disabled would just act as it is now.

I also think the cage expansion slider numbers should be remapped to be a little more user friendly it only shows 3 digits and the amounts from 0 to 1 are insane. so i think taking that input and dividing it by 1000 would make more sense and be a lot more user friendly and scale better. so 1 would be 0.001 and 10 would be 0.01.

I should be able to adjust the increments of the the slider…

Also there is the possibility of alt/shift/ctrl clicking the buttons to have different behaviour. Like ignoring visibility on ctrl click or something?

I’m not really sure what the best default behaviour is…

I think a good way of figuring out how something should work is how user would expect it to work and i think they would expect to click a button and get a cage.

and then have the visibility as an opt in for more complex models or larger scenes.

https://developer.blender.org/D9074
^
This has now been committed, so it’s probably best to use this instead of hokey math to adjust to the slider range.

Yeah I can make the slider better without doing strange things to its result. What do you want? Three numbers after the point and increase by .001 per movement?

Ideally I’d just like it to use the proper scene units. I want to type 5mm or 0.5m and be able to bake both a cigarette lighter and a spaceship. The increments should be logarithmic.

1 Like

I don’t think it’s possible to use the log scale in python yet… But I can make it accept m/cm/mm etc.

I will also change the defaults to work on any object in the current scene regardless of visibility and add a Shift-Click version which excludes them.

2 Likes

I’m wondering what sort of settings are needed for this… I think just the X and Y dimensions of the plane its projected on?

What algorithm are you using to down sample with, it seems to sharpen way more then just a none downsampled bake. ?

4k to 1k on the left, 1k on the right.

https://ss.lamia.io/i/ApplicationFrameHost_yWpd4j9gp.png

Photoshop: Bicubic auto 4k to 1k
https://ss.lamia.io/i/ApplicationFrameHost_fvAU1fL67.png

So the answer is ‘what ever method blender uses internally’. Which I’m not entirely sure of.

The reason why, which is the case for most add-ons, is that it’s not really possible to do image manipulation in non compiled python. It is simply too slow.

I don’t know that there is really a good way around this… Requiring users to install a 3rd party python library greatly complicates the install process and introduces a number of security risks to installing the add-on.

Using what is available in blender is the best option from that perspective…

ok understood :slight_smile:

Numba provides a really powerful alternative. But users would still need to install it. It would be neat if it was part of the Blender python dist…

Or maybe I just need to learn to write more efficient python… I’m pretty sure I would need users to install NumPy in order to do bicubic interpolation in any reasonable time though.

You could use a small compiled executable to do image manipulation such as ImageMagick and distribute it with the addon, or even make the addon download it automatically.

Well, imagemagick isn’t exactly small. And you probably don’t need all the functionality it provides. I’ll be on the lookout for a small exe that can downsample pngs.

I dunno… I could have PIL (Pillow) as an optional install… DecalMachine or something does it for exporting the texture sheets… And if it’s installed use that for the filtering…

I think having execubtables for added functionality is fine, i actually use a like 7 addons that do this they have a default interaction and then if you go in to the settings they normally have an install lib button to enable extra features.

I personally think this is fine, as long as the default user interaction stays the same and if they come across an issue where they now realize they need something a little more having that option waiting is a good practice.

I have actually been playing with creating a rust engine for implementing a better UV unwrap and using python to interface with it.

If it’s an external binary there needs to be a window/mac/linux version included… Installing a python module is also doable… Things are complicated by running within a python interpreter started by Blender…

It’s also possible I can fix this in blender…

Mhm that’s why i chose rust because of it’s ability to cross compile so well. you just need to research it i guess and ask your self some questions, for instance.

is the amount of work needed for this feature worth the time i could be spending on other features ?

Will the amount of work i put in to support this feature be usable to easily implement other features in the future ?

Is there a way to implement this feature with out fragmenting code base even if it’s not as optimal ?

Is fragmenting my code base worth what I’m implementing ?

Is the amount of time I’m going to spend supporting a fragmented code base more valuable then implementing other features ?