TexTools for Blender

Hello, first of all kudos to you for your tool, is really handy
I’m trying it and I frequently get this blocking error:

blender(16458,0x7fffcb0683c0) malloc: *** error for object 0x10af56210: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

I’m using 2.79 on Os X Sierra

EDIT: Tools version is 0.70

At last it happened! For the first time a neat addon with your own icons and design!
Anyone who makes addons, please pay attention to how to design your work. It is important! It is very good that a lot of people write good additional functionality, but without proper external design, such add-ons turn the blender into a mess. Especially when the blender icons are used for its functions as icons for addon functions. It is not right. Stop doing this! The Internet is full of neat free icons for any needs. You can always design your work and make it unique and understandable without copying other icons created entirely for other functions of the program.

Special thanks to the creator of this addon for a good example of how it should be! And of course for the functionality too.

I have been doing more testing and I came up with some feedback.

  1. When I bake multiple meshes into a single normal map I seem to be getting a mixture of tangent and object space results.


    (sorry for the low res map)

  2. Another thing is when I “Lock Selection” of a baking list, deselect everything in the 3d view and press bake I get this error message.


  3. Lastly is the organization of the baking list itself, it doesn’t seem to be alphabetical but random. Not sure if it’s by design but to me, it feels more logical to order the list by name.

For a final suggestion, when baking to a single map, it would be great to be able to input the name of the map (as an addition to picking the first name in the list automatically) just in case you want to have different versions of the same bake.

I hope you find this feedback useful.

@Kabu
Unfortunately there is not much I can find out with just that information on google. Can you tell me what tools you used? I have not encountered these issues myself so far.

@jpthrash
Thanks again for your detailed feedback and testing.

  1. Tangent/Object Normals: I believe this happens when one of the pairs does not have a high poly set, e.g. you bake the Normals of a low poly object on itself. Will have a further look if its not something else.

  2. Bake error: I’ll address the error later today, I know what it is.

  3. Sorting by name: Working on that right now, sorting alphabetically is easy and obvious, thanks

so3Datel Was kind enough to give me one of his detailed gun models with many intersecting high and low poly objects. I am testing right now with his scene to improve the name pairing and some tools to fix object naming.

Thank you)
By the way, we were waiting for AA in baked normals so much time… Thank you so much for this!

I’m not sure how familiar you are with baking in Cycles so I’ll make no assumptions. :wink:

Objects that are hidden in the scene will still contribute to the bake since “hidden” is just a GLSL Viewport thing.

Here is an example that shows a model that was baked on a layer that has a hidden cube. The hidden cube still contributes to the AO calculation.


If you want to exclude objects from the bake you should be able to use the following options that are found under the Object Properties panel. The python commands are shown at the top of the screen in the Info Area.

Now it doesn’t matter if the objects are hidden or not, they should be excluded.


Good luck. :slight_smile:

More on this error.

Tools version 0.70. I disabled all UV texture addons I have.

Align edge appear to trigger it:

Executing IslandsAlignSort main 0.00390625
Islands: 0x, 0.0006 seconds
Islands: 0x
blender(3258,0x7fffa69203c0) malloc: *** error for object 0x10b4a8410: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

[1]+ Abort trap: 6 blender --python /Users/max/Developer/Content/Blender/scripts/fullscreen_startup.py

again:

Executing IslandsAlignSort main 0.00390625
Islands: 8x, 0.0039 seconds
Islands: 8x
Rotate compact: 0.39943134784698486
Rotate compact: 0.5991479621658325
Rotate compact: 0.3994333180446625
Rotate compact: 0.1997187335281372
Rotate compact: 0.19971967392349244
Rotate compact: 0.19972067392349244
Rotate compact: 0.1997217335281372
Rotate compact: 0.39943831804466245
Horizontal
Horizontal
Horizontal
Horizontal
Horizontal
Horizontal
Horizontal
Horizontal
Executing IslandsAlignSort main 0.00390625
Islands: 8x, 0.0040 seconds
Islands: 8x
Rotate compact: 0.39943134784698486
Rotate compact: 0.5991479621658325
Rotate compact: 0.39943334784698487
Rotate compact: 0.19971909115600586
Rotate compact: 0.19971961431884766
Rotate compact: 0.19972061431884766
Rotate compact: 0.19972209115600587
Rotate compact: 0.3994382286376953
____ Align Verts
blender(3282,0x7000043cd000) malloc: *** error for object 0x10c0b6400: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

That crashes Blender. Very strange, anyway.
Hope it helps.

the culprit: textool_cube.blend.zip (92.5 KB)
it’s just a (most obvious) cube with couple of edit subdivsion and an unwrap…

It’s good that you thought to disable other Addons. I have some Addons for Vertex Painting that throw various non-related Addons into chaos.
Once I install them, even some Add Mesh tools start throwing errors.

Hi,
Addon is fantastic, but I think even with high poly model it bakes to object space rather than tangent.

Attachments


@1D_Inc :
Regarding Anti Alias: No worries, it was actually much easier than I thought. The image object in blender actually has a resize method oddly named ‘scale’ which samples the image unlike what I read before.


#Resize image
image.generated_width = new_width
image.generated_height = new_height
image.scale(new_width, new_height)

@veti & @jpthrash
Oooops, you guys are right I actually baked in Object space (so silly of me), thought the code was right and perhaps something else was wrong. All fixed now :slight_smile:

https://c1.staticflickr.com/5/4681/38671051745_b07cd7381f_o.png

@Marc Clint Dion
Thanks for the input, I was aware of the ignore flags but didn’t know that hiding objects are not affecting the bake or AO bake in particular. I actually just noticed that just restricting render-able for the cube object solves it as well with less properties to change.
https://c1.staticflickr.com/5/4600/39567150941_882bd60d57_o.gif
So what I did now is to ‘restrict render’ all all objects of the visible scene that are not part of the bake objects. And obviously restore this afterwards. This also works with isolating, here is a demo:

@kabu
Thanks for the detailed log and sample file. I still haven’t been able to reproduce it but I will try to put in some safety checks, e.g. ‘None’ objects etc. Your error doesn’t throw any python violations, instead it seems to be more low level like memory or pointer wise.
My wife has a MacBook and OSX, I will give it a try this evening on the Mac, see if I can reproduce the bug.

Update Version 0.7.2

Download

Blender TexTools 0.7.2.zip
GIT: https://bitbucket.org/renderhjs/textools-blender

Changes

Sort bake sets
Items are sorted alphabetically by set names, easier to navigate now.

Warn icons
Displays warning for objects that don’t have UV’s, don’t have low poly objects or a miss match for low poly and cage object count.

https://c1.staticflickr.com/5/4597/24700495247_89efefeaae_o.png

Tangent normal
Fixed the normal space back to tangent space instead of object space

Fixed Bug with object selection
There was a previous bug with odd selection states that would throw errors when baking, this is now fixed.

Exclude Objects from Bake
Ignores all objects that are not part of the bake set selection from the Bake process, e.g. AO maps.

First of all thanks for your great work. This is a real timesaver!
But I have a question - is it possible to implement a skew correction mode for the baking side?

I could imagine this would require a additional implementation or are complete override of the bake engine, but maybe?

i think it is not important at all, but I report it for you, maybe it’s be interesting for you

  1. In Settings > Addons deactivate TexTools 0.71 and press Remove
  2. Press Install from file and choose TexTools 0.72 (new version TexTools will be installed)
  3. Press Enable an Addon - it gives an error message


I can repeate this error if I install back v.071, reteate this ^^ action and install v.072
Here is blend file, I dont know if it need in this case

sorry for my english

Attachments

TexToolsReinstallError.blend (459 KB)

The progress on this add-on is insane, thanks a lot.

I was wondering if there is going to be some more advanced options for baking, for example with normal maps, I would like to be able to choose between tangent and object space, DirectX or OpenGL, etc.

Yes, it looks like an error from low-level C source code. I’ll try that on windows.
It is related to UV managing only anyway, baking works correctly.
I’m trying that now but I’ve to setup a full complex object for baking…
Thank you.

@renderhjs
the transmission tools of this uvtools addon is what i’m talking about. see https://youtu.be/ERGf8X5ex28?t=1m56s
the problem with uvtools is it changes the shape of the uv island drastically, not just straightens the edgeloops

Really cool features and good to see an addon in blender with custom icons instead only text to make a really easy to read interface.

Hi,

Thanks for making nice add-on.
This add-on makes the UV/Bake workflow much better in Blender.

And, I must apologize for implementing the overlapping UV feature in Magic UV.
I did not notice that there is a feature request from @fiendish55.

BTW, I would like to give some information about the requested UV features.

Align UV

@dyf gave a improvement request about Align UV .
This feature seems that it is similar to the transmission mode in UV_Tool.
UV_Tool: https://blenderartists.org/forum/showthread.php?294904-AddOn-UV_Tool

This add-on was merged into Magic UV now.
So, if you want implementing this feature, below code may help you.

However, I think this is a bit complicated implementation.
I wonder if there is a more clear implementation.

UVW Map

I think Sure UV map realizes this feature as @1D_Inc.
Sure UVW Map: https://blenderartists.org/forum/showthread.php?236631-Addon-Simple-Box-UVW-Map-Modifier

I contacted the original author and allowed me to merge this feature in Magic UV.
Below code may be helped you.

This may not be the feature you wanted.
If this is not related to your feature, please ignore it.

I’m sorry if you are in bothersome.
Thanks and sorry for the long post.

Maybe you’re right and you’ll come up with a more elegant solution, but I will tries explained to you what I mean :slight_smile:

  1. In 2.8 we will have Collections/Layers. And I propose put LP to the one layer, HP to the another layer, and chose these layers in TexTools, for example: LP layer - for low poly; HP layer - for hight poly.
  2. Create equal materials for each equal lp and hp objects. And use this materials for indication what is what will be baked. Maybe not ID, but materials names or colors.

Personally I think it is more organize (layers) and visually readable (colors) for control and check what will be baking to low poly.
For more simple situations I propose use standard solution From selected to Active.
Upd: but this can’t be useful if you try baking material ID for masking for texturing.
sorry for my english