serious optimization request for shape keys (huge memory waste detected) #39287
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#39287
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
hi all, this is my first post here so wish me luck :)
Let's suppose we have a character and we use shape keys for facial animation. I noticed that the actual implementation of shape keys allocates the whole character for every shape key. That is, for example, even if the shape key is used to rise a corner of the mouth and affects only a few vertices, the whole body of the character is stored in the shape key array together with the corner of the mouth that is the only part the shape key needs.
Of course one easy workaround to optimize memory usage is to keep the head of the character in a separate object, this way the shape key will store only the head mesh and leave the body alone. But, this is a workaround and may give visual problems with some characters leaving a visible seam where we separated the head. To tell the thruth there are further workarounds that we can use to hide the seam but that's not the point.
The point is, why shape keys store the whole mesh when they only need a few vertices ? I come from Lightwave where shape keys are called endomorphs. An endomorph only stores vertices that are changed from the base mesh. This both saves memory and makes morph operations faster since less vertices are to be computed.
Just to undestand how heavy the problem is, I did some memory tests using the common Makehuman character. This test is for a character imported with facial shape keys only. The "optimized" version just cuts off the head as a separate object. You can see there's a huge waste in memory usage.
84 Mb empty scene
143 Mb makehuman character (takes 59 Mb)
100 Mb makehuman character with optimized shapekeys (takes 16 Mb, saves 43 Mb)
Changed status to: 'Open'
Added subscriber: @padone
Changed status from 'Open' to: 'Archived'
This is not a bug report, but a feature request, has nothing to do here (and do not see what addons are doing here either, this is about core Blender code!).
Please take time to read what’s written on https://developer.blender.org/maniphest/task/create/?project=2&type=Bug next time…
Thank you for your reply Bastien :)
Addons was a mistake, I just didn't find a way to remove it since the board doesn't seem to let me modify my own posts after publishing. I just found the option to add BF Blender.
I did read the manifest and all the old bug reports on shapekeys before posting. I just didn't know where to post since I'm not requesting a new feature, but just a different implementation of an already existing feature. I know this is not a bug, it is rather a design misconception on the shapekey feature. Since it has to do with the Blender core as you said yourself, this seemed to me the more appropriate place where to post.
Since you rejected the subject now I'll try to submit it as a feature request as you suggest, but I don't expect it will be accepted as a new feature either. Please understand this is not a minor issue, it really makes Blender a memory hog for most serious projects. If you could help in making this request visible to any developer it would be kind of you.
bye, Alessandro :)
Added to our TODO list (http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Tools#Mesh_Editing). :)
that's great, thank you for your patience and attention :)