Corrective smooth apply as shape key does not work #44663

Open
opened 2015-05-11 04:17:03 +02:00 by Jack Simpson · 11 comments

System Information
Window 8.1, Nvidia GTX 770

Blender Version
Broken: 2.74. f8540d7 (from build bot)
Also reported by BlenderArtists forum user DanPro for build dc95ca9

Short description of error
Apply as shape on the corrective smooth modifier creates an empty shape key.
Apply as shape in the same conditions for the smooth modifier works fine.

Exact steps for others to reproduce the error

  1. create mesh skinned to armature (e.g. cylinder skinned to two bones)
  2. add corrective smooth modifier after armature modifier
  3. pose armature
  4. apply corrective smooth modifier as shape (or to mesh)
  5. the resulting shape key would be empty (should contain the corrective smoothing effect for that pose)
    File: corrsmooth_shape_bug.blend
**System Information** Window 8.1, Nvidia GTX 770 **Blender Version** Broken: 2.74. f8540d7 (from build bot) Also reported by [BlenderArtists forum user DanPro for build dc95ca9 ](http://blenderartists.org/forum/showthread.php?366313-Delta-Mush-Modifier&p=2867232&viewfull=1#post2867232) **Short description of error** Apply as shape on the corrective smooth modifier creates an empty shape key. Apply as shape in the same conditions for the smooth modifier works fine. **Exact steps for others to reproduce the error** 1. create mesh skinned to armature (e.g. cylinder skinned to two bones) 2. add corrective smooth modifier after armature modifier 3. pose armature 4. apply corrective smooth modifier as shape (or to mesh) 5. the resulting shape key would be empty (should contain the corrective smoothing effect for that pose) File: [corrsmooth_shape_bug.blend](https://archive.blender.org/developer/F172392/corrsmooth_shape_bug.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Jack Simpson self-assigned this 2015-05-11 04:17:03 +02:00
Author

Added subscriber: @sazerac

Added subscriber: @sazerac

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This isnt exactly a bug, in at least that the behavior is working as intended, it just happens not to be very useful behavior in the case of corrective smooth modifier, because this is one of the few modifiers that relies on previous modifiers to be applied before it has any effect.

Apply as shape key disables all modifiers except for one, applies it on its own, then applies any changes as a shape.

This happens not to do what you want with Corrective Smooth, because this modifier relies on preceding modifiers to deform the original coordinates, before it makes any difference.

You can see that it is working, because enabling 'Only Smooth' before applying as shape, does what you would expect.


I can think of a few ways this could be made to work...

  • It could just apply all deform modifiers up until the corrective smooth modifier. (but that will bake the pose in too - which isn't typically what you want)
  • It could calculate the deformation thats being applied to the previous modifier, then apply the deltas to a shape key on the base mesh (using per vertex tangents).

I'm interested to see how this could work, but its not a software error, moving to design task.

This isnt exactly a bug, in at least that the behavior is working as intended, it just happens not to be very useful behavior in the case of corrective smooth modifier, because this is one of the few modifiers that relies on previous modifiers to be applied before it has any effect. Apply as shape key disables all modifiers except for one, applies it on its own, then applies any changes as a shape. This happens not to do what you want with *Corrective Smooth*, because this modifier relies on preceding modifiers to deform the original coordinates, before it makes any difference. You can see that it is working, because enabling 'Only Smooth' before applying as shape, does what you would expect. ---- I can think of a few ways this could be made to work... - It could just apply all deform modifiers up until the corrective smooth modifier. *(but that will bake the pose in too - which isn't typically what you want)* - It could calculate the deformation thats being applied to the previous modifier, then apply the deltas to a shape key on the base mesh (using per vertex tangents). I'm interested to see how this could work, but its not a software error, moving to design task.
Jack Simpson was unassigned by Bastien Montagne 2015-05-11 09:31:36 +02:00
Author

In #44663#307874, @ideasman42 wrote:

I can think of a few ways this could be made to work...

  • It could just apply all deform modifiers up until the corrective smooth modifier. (but that will bake the pose in too - which isn't typically what you want)
  • It could calculate the deformation thats being applied to the previous modifier, then apply the deltas to a shape key on the base mesh (using per vertex tangents).

I'm interested to see how this could work, but its not a software error, moving to design task.

Thanks for the suggestions. I think the second option would be much more useful.
I'm assuming the relevant code here is:
object_modifier.c : modifier_apply_shape
and
DerivedMesh.c : mesh_create_derived_for_modifier

Am I right that mesh_create_derived_for_modifier is only called by the apply/apply as shape functionality?

Looking at how this is done in blender, it looks like any change here would be awfully special-casey just for the one modifier. I guess the second option for apply as shape could potentially work for any modifier at the moment and may actually product more intuitive results in some cases (shrinkwrap on a posed char comes to mind, also useful in some cases for making corrective shapes). However this will obviously change the results of this option, so isn't a change to make lightly.

@ideasman42, what do you think?

> In #44663#307874, @ideasman42 wrote: > > I can think of a few ways this could be made to work... > > - It could just apply all deform modifiers up until the corrective smooth modifier. *(but that will bake the pose in too - which isn't typically what you want)* > - It could calculate the deformation thats being applied to the previous modifier, then apply the deltas to a shape key on the base mesh (using per vertex tangents). > > I'm interested to see how this could work, but its not a software error, moving to design task. Thanks for the suggestions. I think the second option would be much more useful. I'm assuming the relevant code here is: object_modifier.c : modifier_apply_shape and DerivedMesh.c : mesh_create_derived_for_modifier Am I right that mesh_create_derived_for_modifier is only called by the apply/apply as shape functionality? Looking at how this is done in blender, it looks like any change here would be awfully special-casey just for the one modifier. I guess the second option for apply as shape could potentially work for any modifier at the moment and may actually product more intuitive results in some cases (shrinkwrap on a posed char comes to mind, also useful in some cases for making corrective shapes). However this will obviously change the results of this option, so isn't a change to make lightly. @ideasman42, what do you think?

@sazerac, yep, modifier_apply_shape would need to be changed quite a bit.

Agree using deltas is most useful here, and probably best this is first added as an option, then we can see how to expose.


eg: [Apply, Copy] buttons use quite a bit if space, we could move all into a small single icon menu.
(like what we have already for vertex groups containing options to sort, copy, lock ... etc).

Then we can have Different menu items for applying the shape key.

Or as an alternative we could tag modifier types where it only makes sense to apply the difference as a shape, and do it automatically. (though there could be rare cases you want either options)

@sazerac, yep, `modifier_apply_shape` would need to be changed quite a bit. Agree using deltas is most useful here, and probably best this is first added as an option, then we can see how to expose. ---- eg: [Apply, Copy] buttons use quite a bit if space, we could move all into a small single icon menu. (like what we have already for vertex groups containing options to sort, copy, lock ... etc). Then we can have Different menu items for applying the shape key. Or as an alternative we could tag modifier types where it only makes sense to apply the difference as a shape, and do it automatically. (though there could be rare cases you want either options)
Author

Had a bit more of a look/think about this and deriving the correct shape is not trivial, I think this kind of functionality would make more sense as an extension on what is in the corrective shape keys addon.

Had a bit more of a look/think about this and deriving the correct shape is not trivial, I think this kind of functionality would make more sense as an extension on what is in the corrective shape keys addon.

Added subscriber: @LuckyTea

Added subscriber: @LuckyTea

I too noticed this behavior and expected something different. I created this report here:
https://developer.blender.org/T45293

before finding this thread.

Creating corrective shape keys with the corrective smooth modifier would be really great indeed. I hope it will be added at some point!

I too noticed this behavior and expected something different. I created this report here: https://developer.blender.org/T45293 before finding this thread. Creating corrective shape keys with the corrective smooth modifier would be really great indeed. I hope it will be added at some point!
Member

Added subscriber: @Mets

Added subscriber: @Mets

Added subscriber: @SavMartin

Added subscriber: @SavMartin
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:30:15 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#44663
No description provided.