hi all,
I come from Lightwave and I’m new to Blender so maybe I miss something. I just played around with some tutorials on shapekeys and found something weird.
Using the standard Windows monitor, I measured the memory Blender uses for shapekeys both on ram and on disk.
When creating a new shapekey it seems that Blender allocates a vertex list for the whole object, for every new shapekey, even if the shapekey is empty or not used.
So for example, if you use shapekeys for facial expressions, the whole body of the character is included in the shapekey vertex list, for every shapekey you make. If you have 30 shapekeys for facial expression, then the whole body takes memory 30 times together with the face of the character.
Actually the only workaround I found is to keep the face of the character in a separate object, so to limit shapekeys memory usage to the face vertex list. For some characters this works fine but for others this method shows a visible seam where I separated the face and this is not visually acceptable.
I didn’t find any way to limit a shapekey vertex list to only a part of an object. Even if I use the shapekey vertex group, it is used only as a mask to limit influence, but the whole object is included in the shapekey vertex list.
It is easy to understand that this is a major memory hog. I hope I miss something and that some experienced Blender user can point me to a solution.
I’m also wondering how it is possible that nobody noticed this before. I googled the web but I didn’t find anything on this subject.
In Lightwave shapekeys are called endomorphs. An endomorph only stores vertices that are changed from the base form. So for example if I create an endomorph for a facial expression, then only the changed face vertices are stored in the endomorph. This saves memory and also make morph operations faster because less vertices are to be computed.
comments welcome and needed, thanks
p.s. fast and easy steps to reproduce the problem
-
model a simple character using monkey as head and some balls as body, join them in a single object and apply a subd modifier so to get a dense mesh to better measure memory usage, save as monkey.blend
-
create a number of shape keys and leave them empty, save as emptykeys.blend
-
modify the shape keys to only affect the head and save as headkeys.blend
-
modify the shape keys to also afffect the body and save as bodykeys.blend
-
close and reopen blender, with the empty scene measure memory usage. Then load monkey.blend and measure memory. Then load emptykeys.blend and measure memory. Then load headkeys.blend and measure memory. Then load bodykeys.blend and measure memory. My results are:
40 Mb empty scene
75 Mb monkey (no keys)
90 Mb empty keys
90 Mb head keys
90 Mb body keys
80 Mb my workaround: head keys with head as separate object (saves 10 Mb)
this means the head keys alone take 5 Mb ram, and there is a waste of 10 Mb ram to also store unused body vertices in the shapekeys