Shape attributes (geometry nodes alternative to shape keys add-on)

Hi! For some time now I’ve been playing with the idea of using the generic attributes as an alternative to shape keys that plays well with geometry nodes.

I started by doing it manually, like this:

And then decided to make an add-on to simplify the workflow.

Shape attributes add-on comes as a tab in the N panel in the 3d view. It expects an active object in object mode. It has three subpanels:

Save shape: saves the current shape as a new attribute with the name entered in the name field (with a prefix to identify shape attributes)

Use shapes: options to use the present shape attribute(s). These options will either apply a selected shape to the object, or add a geometry nodes modifier that lets the user mix the shape attributes in a way similar to shape keys.

Shape keys: Here user can convert between traditional shape keys and shape attributes

And lastly a bake animation panel. This saves a new shape attribute for each frame for the selected object and adds a geometry nodes modifier that animates this back. It let’s you set an offset and to toggle between looping and not. This option turned out to be a bit less useful than I expected so far. I envisioned using it to procedurally duplicate and offset complex animations not doable with shape keys, but in it’s current implementation the usage is a bit manual, and also not suited for heavy meshes or very long animations.

Here’s an example of using the add-on to convert a shape key to a shape attribute and animating it procedurally on multiple instances with offsets.

This is WIP, there’s several improvements and new features planned (also a lot of cleanup to do :sweat_smile:)
but it’s already functional and useful I think, so I thought I’d share it here in case people find it useful or have feedback.

Shape_attributes.zip (7.5 KB)

12 Likes

Hi @Chanfiroly , thank you for this script! I had a few questions after I tried using it.

  • There were no operators to offset animation after baking it as seen in the mannequin anim transfer video (I transferred animation from an object with a sequence of relative shapekeys)
  • There was a missing option of selecting the object to copy from, while baking.

would there be some step that I would be missing out before doing this?

Thank you once again!

Hi!
Strange! What does the geometry nodes modifier in the properties panel look like for the baked animation object?
Regarding question 2, that’s a change in the add-on. Currently you just select the object with the animation and bake and the add-on creates a copy with the baked animation.

20240502_175948

If this is the case, how do you do it, please help

Thank you in advance

Hello, any chance you’re gonna fix the addon or at least give access to the native shape_mixer geo node

for some reason it give this error when trying to use it on curves object

Python: Traceback (most recent call last):
File “C:\Users*\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\Shape_attributes_init_.py", line 267, in execute
return add_to_blend_group(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users*
\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\Shape_attributes_init_.py”, line 142, in add_to_blend_group
shape_mixer = nodegroups.create_shape_mixer(obj_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users****\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\Shape_attributes\nodegroups.py”, line 195, in create_shape_mixer
group_output_socket = shapes_mixer.outputs.new(‘NodeSocketGeometry’, ‘Geometry’)
^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘GeometryNodeTree’ object has no attribute ‘outputs’

It’s either the previous one or this one:
AttributeError: ‘Curves’ object has no attribute ‘vertices’

Hi! I have been busy lately and didn’t get a chance to update this for blender’s 4.0 and 4.1 changes, I’ll try to do it soon

3 Likes

This is amazing and so useful!! Thank you very much I’ve been looking for this kind of stuff for a while.

EDIT: Sorry found a fix

Thanks a lot again! Hope you eventually have time to update it for 4.1 but this is too useful. I’ll keep using 3.6 as long as necessary ! : D

1 Like

Bake to VAT option / eevee displace please*

@Chanfiroly Apologizes for the double reply but I wasn’t able to implement the fix. I didn’t realize that it was only working because by trying to override the object properties on the file I accidentally made the object local so of course any changes are allowed after that.

I tried using the addon as a workaround to shapekeys with linked objects from other files, because blender can’t add new shape keys and keep mesh object synched with other blend files.

The addon is able to update and apply the shapes with linked objects from another blender file after an override.

I initially thought it was a limitation of blender but even if the object didn’t have any shapes on the original file, in the linked version I can create the Base shape after applying a library override.

What it doesn’t let me do is to change the name of the shape or add new ones. I can’t add new ones because the name is greyed out so it’s trying to create a new shape but it has the same name so it doesn’t. But when there’s no shape it does create it in the linked object with override. So it appears is not a blender limitation, and according to the documentation object attributes can be overriden locally while keeping the object in synch and linked to another file.

I thought it could be the way the addon is written, because if it’s possible to create a shape even after an object is linked, the problem is in the process of adding a name. If I hover my cursor over the shape name in the linked filed it says:

“can’t edit this property from an overriden data block”

So blender is seeing the text box effectively as a property from the object, which is strange because I can manually add as many vertex attributes to the list on the properties panel without issues.

Do you have any idea what it could be happening? If this could be fixed I think this addon would be amazing to get around the shapekey limitation from linked objects and being able to modify and sculpt meshes while working with linked assets

1 Like

Hi! Sorry, very busy week. Interesting problem! I haven’t tested the behaviour with linking. I’ll make sure to look into it when I update it! Hopefully I’ll have some time for this this week

Hi,
Any hope for Blender 4 update of this Add-on?