Bake Wrangler - Node based baking tool set

I searched and found the explanation that png does not support the alpha channel and only supports alpha transparency. Perhaps this is the answer to the problem I am having. Use tga, tif, psd to use the alpha channel! - Solved: How do I save a PNG file with an alpha channel in … - Adobe Support Community - 5369920

I haven’t had a problem with alpha on PNG, the only thing weird is that it will be in linear color regardless of what the rest of the image is in (because it’s supposed to give transparency value). But you should still get a 4th channel with your values encoded as linear??

Yes. tif and tga are stored correctly. But the strange thing is that when I open the baked tif texture in photoshop, there is no alpha channel and only the rgb channel is visible. tga is fine.

Add images

If I try to bake using an input material instead of a mesh, I get an error. I tried several ways, but couldn’t solve it. Does anyone know the cause?


Add images

I have no idea how the material node managed to get broken… That is really weird… Going to have to look over the git entries and see what happened…

Any way here is my png with alpha:
image
Left: RGBA, Right: Alpha only

Node set up I used:
image

1 Like

Oh I found the cause. If the color space is set to Non-color instead of sRGB, the Alpha channel is output properly! Thank you! I have one more question. What is the cause of the error in baking with the input material I mentioned above? I tried several channels of PBR and Blender, but all failed.

Its a bug in material node… And I honestly don’t know how it ever worked because I don’t see a time when it did not have this bug… But it did work before?! Must be some government agency screwing with the timeline!

I will fix it…

Really weird, like according to github history this feature should never have worked at any time… Is it CERN?

1 Like

I’m waiting for the day it will be resolved! If I make one plane and bake it, I can get the same result, so it doesn’t seem like a big problem. And is it possible to use node wrangler in Bake wrangler?

Its just a convenience node, so yeah you can just make a plane and bake it yourself.

Node Wrangler mostly doesn’t work? It doesn’t understand the nodes, but someone could write a script to add them I think… One day if I’m looking for something to do I will look at it, I don’t think it would be hard.

1 Like

Oh by the way, do you have any plans to add a denoise function? I can denoise the baked texture with the compositor, but it will take some time if there are many files.

I think denoising is fixed in blender 3.0, so it can be done as part of the bake instead of a post process. So I don’t plan to add it for 2.9.

Now that 3.0 is in RC I can start looking at what options I need to add to use the built in denoising…

2 Likes

I’ve uploaded v1.2.2 which fixes the Material node and adds some preferences for saving image files before baking (unsaved changes in images that are part of the bake can’t be included in the bake due to it being in a separate process, so automatically saving them is now an option for convenience).

The 1.2 branch will also stay targeted on blender 2.9. While it currently works in 3.0 I will not be trying to maintain compatibility with both blender versions in the same release.

Instead a new 1.3 branch will be for blender 3.0 going forward and will not be backwards compatible with 2.9 (except by lucky accident).

This means users of Blender 2.9 TLS should stay with 1.2 Bake Wrangler versions (when 1.3 comes out).

3 Likes

Hi, I bought this addon today and started playing around with it.

I am a noob with all of this and running into some trouble. Please help.

I made a simple scene to test. Just a plane and a cube.
Since I am a new member and can not upload files,
the log output and and a screenshot inside the blend file and uploaded it to pasteall.

https://pasteall.org/blend/1a23ed0e7608435397f1458c2cb63b6d

The following detailed description is also inside the blend file.
Blender version used is 2.93.6 and Bake Wrangler 1.2.2.

I am trying to do 2 things:

  1. Bake a packed lightmap (Frame: Scene lighting)
    This seems to work as intended.

  2. Bake PBR maps for individual objects in the scene.
    Specifically, I want to combine Roughness/Metallic/AO
    in a single map with the Channel Map node.
    (Reason: create scenes/assets for use with babylonjs)
    I am running into some trouble here. I think I may be doing something wrong.

2a) Frame “Individual Objects - Bake Error”
When I combine the passes directly, I get a bake error.
The log output from baking only this group is
in the blend file (“Log File - Bake Error”).

2b) Frame “Individual Objects - Works, but only with one object”
When I output each pass Individually, in addition to using Channel Map,
the error from (2a) above goes away and the output files look correct,
but now I have a couple of extra files I don’t need.
Also, notice that there is only one input object selected.

2c) Frame “Individual Objects - Wrong Combined Output”
Same as (2b), but with multiple input objects selected,
to bake multiple objects with the same settings.
Please see embedded image “Screenshot”: The WrongPlane_AORM map is not
the combination of the individual WrongPlane_{AO,R,M} maps.
It looks like the Plane’s metal map is combined with the AO and Roughtness maps of the Cube.

I’m sorry you’re having problems. Did I leave the previous version of the add-on up for download? I’m pretty sure 1.2 is still there.

It seems that one of the bugs I fixed in that latest version wasn’t a bug… If you go back to the 1.2 version I think everything you’re doing will work… But let me know if you’re still having problems!

I will get this fixed asap!

1 Like

Thank you for the fast reply!
I will try it tomorrow.

At the time I thought there was a reason for the code I was ‘fixing’ but it was causing the ‘Material’ node to fail and when I tested the change it worked fine. But I only tested with one object… >_<

Yeah, need to roll that back and find a different fix!

1 Like

I just uninstalled v1.2.2, installed 1.2 and tried it again with the same file from above.
The result seems to be exactly the same.
The problem is probably somewhere else. Maybe with the way I am using the nodes.

Okay let me test with the older version, because it looked fine to me.

You’re right it does fail in the previous one as well. I have found the cause, which is having the Objects node connected to the Output Path. If you remove that connection then it works correctly (though the objects are now combined in one image).

It’s definitely a bug, I can see what is happening (its skipping baking some of the inputs) but I don’t know what is causing it at this point (you are supposed to be able to connect the objects to the name socket like you have).

Thanks for confirming.
I will just wait for you to fix it, but please don’t loose any sleep over it.

The main thing that haunts me is the thought that there are bugs stopping people using it for the thing they want but for what ever reason they never report them…

Sometimes I find bugs that have been live for months and never been reported. I just don’t see how someone hasn’t run into them in that time! So thanks for bringing this one to my attention.