Blender huge waste of memory with shapekeys (and workaround)

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

Blender huge waste of memory with shapekeys (and workaround)

Postby padone » Thu Mar 20, 2014 9:15 am

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 :)
padone
 
Posts: 5
Joined: Thu Mar 20, 2014 8:49 am

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

Postby duststorm » Thu Mar 20, 2014 9:51 am

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
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

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

Postby brkurt » Thu Mar 20, 2014 12:04 pm

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.
brkurt
 
Posts: 1100
Joined: Sun Feb 17, 2008 8:49 pm

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

Postby padone » Thu Mar 20, 2014 6:24 pm

@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
padone
 
Posts: 5
Joined: Thu Mar 20, 2014 8:49 am

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

Postby padone » Fri Mar 21, 2014 7:10 pm

good news .. Bastien of the Blender Team added the request to the TODO list, hopefully they will fix it :)
padone
 
Posts: 5
Joined: Thu Mar 20, 2014 8:49 am

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

Postby duststorm » Sat Mar 22, 2014 2:09 am

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...
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium


Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 2 guests