Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't respect "Clear image" being disabled? #7

Open
tonpix opened this issue Dec 12, 2020 · 10 comments
Open

Doesn't respect "Clear image" being disabled? #7

tonpix opened this issue Dec 12, 2020 · 10 comments

Comments

@tonpix
Copy link

tonpix commented Dec 12, 2020

I want to bake surface normals + Bevel node normals from multiple objects into 1 normal atlas map, without having objects nearby interferencing results. Seems only way is to use Individual Objects, which does what I need, except one thing - it results in multiple results (all of them sharing the same UV map for atlas, but different parts of it, per object). To solve it, I untick "Clear image" in Render Properties > Output), which causes 1 texture atlas to be reused by multiple results, granting that way a one nicely packaged 1 normal atlas that keeps surface+Bevel normals, without other objects casting unwanted normals. The problem is, I get this result using blender's native baker. BakeLab doesn't have this option, nor respects if "Clear image" is ticked or un-ticked - the results from BakeLab are multiple, non-packed normal maps. Not sure if I missed something.

@specoolar
Copy link
Owner

Because the addon doesn't bake to an existing image, instead creates a new image everytime. Maybe you need to change Bake Mode to "All to One Image", this way you can bake the Normals of multiple objects to one image

@tonpix
Copy link
Author

tonpix commented Dec 13, 2020

I've tried "All to One Image", but it uses raytraced distance, so nearby objects cast normals on other surfaces, which I don't want.
image There's example, a separate object is attached to flat surface and it causes additional normal info on that large flat surface normal. Wouldn't it be possible to add option for BakeLab2 to add variant of "All to One Image" that bakes objects separately and puts their bakes into 1 packed atlas?

@specoolar
Copy link
Owner

specoolar commented Dec 13, 2020 via email

@specoolar
Copy link
Owner

Added. Now there is an option called "Pre-Join meshes". Turn off this to bake objects without raytracing
scr

@tonpix
Copy link
Author

tonpix commented Dec 13, 2020

Thank you for quick add! I've tested and seem to have issues, blender is crashing after baking on 1st of selected objects is done, I can see normal map showing for a second, so might be a image texture saving issue? There's recording below. I can provide .blend file for pilot seat if you think it can help. Happens on 2.90.1, tried 2.91, but addon doesn't seem to install in preferences (after clicking Install, the list of addon doesn't show it on list, so I can't enable)
https://streamable.com/byooxl

EDIT: I've changed Output from Save to Pack, crashing occurs after 3rd object bake is done instead 1st.
EDIT2: Ticking "Pre-Join meshes" (I believe that was default in earlier versions) - makes baking process finished without hiccups, just that there are raytraced normals

@specoolar
Copy link
Owner

I've tried on both 2.90.1 and 2.91, works fine.
Have you tried baking in a simple scene?
Or maybe you need to completely remove the addon, restart Blender and install the addon again.
If this doesn't help, send me the .blend file

@tonpix
Copy link
Author

tonpix commented Dec 13, 2020

Tried your way to reinstall, no change. Fresh scene with default cubes works, but blender's baking never crashed on me on pilot seat - here's .blend file. To get crash, all I need it select parent, then childs and start baking, now it seems to be crashing after random number of objects, once I managed to get progress complete, but no idea what I did.
https://drive.google.com/file/d/12x5Ibn8unUkABDSDWHS2xLY2iZQ1vNeY/view?usp=sharing

@tonpix
Copy link
Author

tonpix commented Dec 13, 2020

Actually, I've copied pilot seat objects to new fresh project (should have thought about it when you suggested fresh scene) and baking went without problems. So it seems my project or cached addon settings are somehow interferencing? Do you have a idea how to fix it? I could copy all other objects from my complete project to new, but I fear it might take time to adjust other project settings, animations etc., so if it's possible, I'd like to fix .blend file that has issues. Is there a way to reset addon settings inside project?
image

@specoolar
Copy link
Owner

specoolar commented Dec 13, 2020

It's weird. when I maximize(ctrl+space) the 3D View before baking blender doesn't crash. Look's like blender trying to update everything after every bake, thus causing crash

@tonpix
Copy link
Author

tonpix commented Dec 14, 2020

Ctrl+Space doesn't prevent crashes in my case, unfortunately. Any ideas what I could do more, what might be culprit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants