danielenger / principled-baker Goto Github PK
View Code? Open in Web Editor NEWBlender Add-on: Bake PBR textures with a few clicks
Blender Add-on: Bake PBR textures with a few clicks
blender 4.0s restructuring of the principled node has decided to rename Specular to "IOR Level" for no good reason. Now the addon can't bake specular maps because it doesn't know it's been renamed. I don't know shit from fuck about python but does anyone know if i could just go into the addon and switch specular out for IOR Level and make it work? the rest of the addon seems to work fine so i dont think the restructuring has fucked anything up i think it's just the renaming.
edit: just remembered coat, sheen, and transmission are all technically named weight now. haven't tried those yet but they're also probably broken i bet
Currently using with Blender with no issues baking game engine maps (emissive, color, metallic, roughness). Only issue is incorrect AO map.
I have to use traditional AO node setup which is quite cumbersome on objects with lots of materials.
Was wondering when this is going to be supported?
P.S. Splendid addon. Keep up the great work!
I'm using blender 4.0 and looks like when you launch the baking with multires modifier active on your mesh, the baking takes forever, and then you get all black images (exception made for normals).
Not a big deal since you just can disable (for viewport and rendering) the modifier and the baking starts working properly again.
I have a scene with 60 fairly simple objects (~50 faces on each one). If I select only 1 object and bake in Single/Batch mode, the process will finish within 15 seconds. However, if I select multiple objects, 3 for example, and bake in batch mode, it will take about 10 minutes - which is drastically longer than separately baking 3 objects.
I'm using blender 2.81 and the latest PB.
I am trying to autmate the baking process from a python script. So far I am able to successfully configure the bake:
bpy.context.scene.principled_baker_settings.resolution = '1024'
bpy.context.scene.principled_baker_bakelist[0].do_bake = True
bpy.context.scene.principled_baker_bakelist[1].do_bake = True
bpy.context.scene.principled_baker_bakelist[2].do_bake = True
bpy.context.scene.principled_baker_settings.file_path = "//PBR Bake\\Test\\"
however, I am unable to start the actual bake. I have tried
bpy.ops.object.principled_baker_bake()
but the bake process does not seem to start. The object is selected and the bake works without problems once I press the bake button manually. Is there something I am missing or is there a better approach?
I'm getting the above error whenever I try detecting maps and / or running a bake on both Blender 2.93 and 3.5.
Any suggestions on how to fix this?
Thanks a lot!
heyo
first of all, thank you very much for this addon, its a must have for gamedev.
i have a question about baking multiple objects with complex textures with transparency to a plane.
on the first screenshot you can see my result when i choose: png, with rgba, exclude transparent colors
on the second i choose: png, with rgba, exclude transparent colors and also alpha channel to color.
i also tried to toggle exclude transparent colors in both cases, but both results were the same.
what is the trick for baking those things? or is it possible at all?
upd 1
im afraid i wasn't clear ehough.
im baking both floor and transparent texture to another plane.
Hello
I'm trying to bake a mesh I made but I keep running into this error
||Traceback (most recent call last):
File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\Principled-Baker-master\baker.py", line 869, in execute
self.bake_combined(context, self.bake_objects)
File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\Principled-Baker-master\baker.py", line 564, in bake_combined
bake_type=get_bake_type_by(self.jobname))
File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\Principled-Baker-master\baker.py", line 293, in bake_and_save
image.save()
RuntimeError: Error: Image 'Plane_color.png' could not be saved to '\Plane_color.png'
location: <unknown location>:-1
known issues:
- typo in github name (can not be solved?)
if you rename your repo
(this is possible in the repo settings)
github will automagically create a redirect from the old name to the new one :-)
so it is easy possible without to much loose..
Hello Daniel,
I was just wondering what would be the main challenges to port this to the official Blender build?
I am a gamedev and I think that to be able to bake PBR maps is an essential feature :)
The current Blender baker does not allow to bake all the PBR channels, and it is a bit clumsy to use as well. I have never contributed to Blender, but I would be happy to help (in terms of coding and discussing the port).
Let me know what you think!
how about making the create new material button near the top, and autodect/detect one button..
.. or just a I'm feeling lucky Bake/AutoBake button that does all of this in one button, make a texture folder, assign to new material, autodect/detect and bakes - this is my go to for now, just want quick results - especially for first users you want to click something but need to look at a description to realise it's very easy - great tool
BTW add a donation button somewhere
Just informing that this does not work on 2.9, if anybody wondering.
I'm getting this error when I try and bake anything. I set an output location within the addon and that didn't work, so I copied the file path of the folder manually and pasted it, and it still doesn't work. It could just be my computer's issues with file paths due to having two users, but I can't be sure.
Hello,
I'm trying to use the auto-smart uv of this addon, with blender 3.1.2 but I get this error:
Python: Traceback (most recent call last):
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\addons\Principled-Baker-master\baker.py", line 875, in execute
self.bake_batch(context, self.bake_objects)
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\addons\Principled-Baker-master\baker.py", line 631, in bake_batch
self.bake_combined(context, [obj])
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\addons\Principled-Baker-master\baker.py", line 499, in bake_combined
auto_uv_project(bake_objects)
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\addons\Principled-Baker-master\uv\project.py", line 40, in auto_uv_project
smart_project()
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\addons\Principled-Baker-master\uv\project.py", line 12, in smart_project
bpy.ops.uv.smart_project(angle_limit=settings.angle_limit,
File "C:\LiberKey\Apps\Blender\Data\settings\scripts\modules\bpy\ops.py", line 132, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.uv.smart_project.poll() failed, context is incorrect
location: <unknown location>:-1
Not sure why
Blender version: 2.92
When baking from selected objects to active, PB will always create a new material slot on the active object, regardless of settings in the "New Material" sector.
Can you type instructions how to do certain tasks like:
I got stuck and couldn't find the methods.
I baked some textures today using this addon, which always worked perfectly for me before, but now it seems to bake the textures in an off darker color, image example. Baked material on the right.
The normal, specular, roughness and AO maps seem to work perfectly, but for some reason the color is darker.
When baking some material with nodes (uv->mapping->image texture) scale not working or working wrong and textures blured (smooth disabled in baker) not so quality as in render. I tried to encrease samples but in vain.
I've updated blender to 2.80 RC3 and it seems Principled Baker is not working correctly now.
It usually happens when I try to bake (or press detect button on) objects with multiple materials assigned. A typical error message is like this:
As far as I remember, the addon used to work fine with RC2. I'm not sure if it's an issue only on my end.
I have used this awesome addon in 2.83 and it works fine. But .later blender versions does not support smartuv and this is almost perfect Baker for blender but I request you add denoise function and add shadow bakeing function. Than it will be perfect. Thank you for developing this awesome addon.
I know it's a really old baking addon but it was awesome. Now with blender 3.1 every bake will result in a black image
Hello everyone! I just managed to bake a BaseColor texture flawlessly using Principled Baker, seems tho the same method doesn't work for the Normal Maps.
Here's the newly unwrapped BaseColor from a dozen of different textures
Flawless as stated above.
Now, even though the Normal Maps are present and working in the original texture, I can't get them to be baked on the new UV Map properly, regardless of the settings used.
Here's an example of one normal map from the original materials
And here's the result of the baking process on the normal map (same method used for the Diffuse)
Any information on what I am missing or what's the eventual bug I stumbled upon?
Using Blender 3.3LTS
Regards
Chris
Set normal: to _normal
File is created like this:
_Normal.png
I select GPU in Cycles before baking to make sure it uses GPU but every time I bake it uses CPU only and my CPU hits 99% usage normally, I would have faster bakes with GPU is there any way to force GPU usage with this tool?
Blender version: 2.92
If render hardware is set to OptiX in Blender preferences, the baked textures will be solid black.
I understand this may be a limitation with Cycles engine. However I wonder if it's possible to:
Glossiness maps will overwrite normal (or most recently baked) map when it is being saved to disk.
It seems that the Ambient Occlusion produces simple white images. When i use the regular way in the blender render properties-->Bake--> it works fine. Are there any settings to set up baking for ambient occlusion? I use Single/Batch Bake
It seems only the 1st tile is being baked. Or maybe UDIM is supported but I couldn't figure out.
I think I've figured out doing this manually. Since it bakes the first tile only (UV [0.0:0.0]
to [1.0:1.0]
) you need to move the islands until the tile you want to bake coincides with the 1st tile's region. Then you can rename the images and re-load them as UDIM.
Some manual work needed but PB still automates a lot of the work.
Hi
I am not sure if this is supposed to be supported but selecting Cuda + GPU for cycles causes error in baking:
Runtime Error Cuda Error...
Is it possible to add a progress bar like how it does when you do it manually?
Would be possible to add direct/indirect light baking ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.