Page 1 of 1

Blender huge waste of memory with shapekeys (and workaround)

PostPosted: Thu Mar 20, 2014 9:15 am
by padone
hi all,

this is not a Makehuman bug, it's a Blender bug (or rather a behaviour as some developers like to call it) but it heavily affects Makehuman characters, so I decided to post it here just to let you know.

Essentially when Blender creates a shapekey, it allocates memory for the whole object the shapekey belongs to. This means that, for example, when a shapekey is created to rise the left corner of the mouth, it affects just some vertices of the mesh, but Blender allocates for this shapekey all the vertices in the whole body of the character. Blender just doesn't care about vertices usage in a shapekey, it allocates the whole mesh for every shapekey.

I found a workaround for this that works quite well. Since I already explained it on Blender Artists, rather than explaining it all again I'll link you there

http://blenderartists.org/forum/showthread.php?329701

When I have some time I'll try to report this issue to the Blender developers. Actually I don't know how to contact them so if any of you has a direct contact please feel free to report this for me. Your help is welcome.


bye :)

Re: Blender huge waste of memory with shapekeys (and workaro

PostPosted: Thu Mar 20, 2014 9:51 am
by duststorm
padone wrote:When I have some time I'll try to report this issue to the Blender developers. Actually I don't know how to contact them

The best way to get it noticed is post an issue on the Blender bug tracker.
If you want direct contact with them, you can join them on IRC at #blender or #blendercoders on irc.freenode.net

Re: Blender huge waste of memory with shapekeys (and workaro

PostPosted: Thu Mar 20, 2014 12:04 pm
by brkurt
padone wrote:hi all,

this is not a Makehuman bug, it's a Blender bug (or rather a behaviour as some developers like to call it) but it heavily affects Makehuman characters, so I decided to post it here just to let you know.

Essentially when Blender creates a shapekey, it allocates memory for the whole object the shapekey belongs to. This means that, for example, when a shapekey is created to rise the left corner of the mouth, it affects just some vertices of the mesh, but Blender allocates for this shapekey all the vertices in the whole body of the character. Blender just doesn't care about vertices usage in a shapekey, it allocates the whole mesh for every shapekey.


I'd be more inclined to call it a burden, somewhere between a feature and a bug. There is a little-used feature in the Blender Shapekey modifier that allows one to add an object as a shapekey to an existing Blender object. This is very useful for Marvelous Designer 3, because one can export the garment object at a pose frame, add it to the Blender object, and so on, until the full animation is completed. I usually set a pose every 25 frames for a garment for example. This is quite nice, as the expensive (and buggy) Animation module in MD3 can be circumvented or ignored.

Re: Blender huge waste of memory with shapekeys (and workaro

PostPosted: Thu Mar 20, 2014 6:24 pm
by padone
@brkurt
I agree this is not properly a bug, it is rather a "design misconception" on the shape key feature. And yes, I know of the "join as shapes" option, it is the first one I used to import morphs in Blender from Wavefront obj models, it works great. As for animations, since I come from Lightwave, I'm rather inclined to import mdd files that Blender reads quite well :)

@duststorm
thanks for the info, I reported the issue to the Blender team, wish me luck :)
https://developer.blender.org/T39287

Re: Blender huge waste of memory with shapekeys (and workaro

PostPosted: Fri Mar 21, 2014 7:10 pm
by padone
good news .. Bastien of the Blender Team added the request to the TODO list, hopefully they will fix it :)

Re: Blender huge waste of memory with shapekeys (and workaro

PostPosted: Sat Mar 22, 2014 2:09 am
by duststorm
padone wrote:Bastien of the Blender Team added the request to the TODO list, hopefully they will fix it :)

That's good news indeed. Who knows, with GSoC coming up...