cloth simulation, rest shape key does not function. #40053

Closed
opened 2014-05-06 22:19:07 +02:00 by Jim Gaston · 8 comments

System Information
Windows/8 64 bit
GeForce GT 640

Blender Version
Broken:
(2.70 19e627c)
(2.62 r44136)

Worked:
(2.61)

Short description of error

the cloth modifier, on the physics tab,
has a "Rest Shape Key".

The field is only visible when the object has shape keys.

The rest shape key allows the fabric to have an initial position that is different from the shape of the fabric.

when a shape key is created, and attached to the fabric modifier,
it does not initialize the fabric springs in the cloth simulator.

Exact steps for others to reproduce the error

load the attached blend file and start the animation (play button or "alt a")
gravity is turned off.
only fabric springs will animate.
the rest spring length, specified by the rest shape key, are shorter than the starting locations.

on release 2.61,
the fabric will moves to shorten the springs.
(after a few frames the fabric will have a U shape.
This is not a morph. It occurs because of the cloth physics recognizes a stretched spring and pulls the fabric together).

on release 2.62 or later (up to and including 2.70)
the fabric will do nothing.

Running blender.exe in the debugger:
module: blenkernel\intern\cloth.c
the function call
shapekey_rest = dm->getVertDataArray ( dm, CD_CLOTH_ORCO );
returns null.

cloth.blend

**System Information** Windows/8 64 bit GeForce GT 640 **Blender Version** Broken: (2.70 19e627c) (2.62 r44136) Worked: (2.61) **Short description of error** the cloth modifier, on the physics tab, has a "Rest Shape Key". The field is only visible when the object has shape keys. The rest shape key allows the fabric to have an initial position that is different from the shape of the fabric. when a shape key is created, and attached to the fabric modifier, it does not initialize the fabric springs in the cloth simulator. **Exact steps for others to reproduce the error** load the attached blend file and start the animation (play button or "alt a") gravity is turned off. only fabric springs will animate. the rest spring length, specified by the rest shape key, are shorter than the starting locations. on release 2.61, the fabric will moves to shorten the springs. (after a few frames the fabric will have a U shape. This is not a morph. It occurs because of the cloth physics recognizes a stretched spring and pulls the fabric together). on release 2.62 or later (up to and including 2.70) the fabric will do nothing. Running blender.exe in the debugger: module: blenkernel\intern\cloth.c the function call shapekey_rest = dm->getVertDataArray ( dm, CD_CLOTH_ORCO ); returns null. [cloth.blend](https://archive.blender.org/developer/F87332/cloth.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JimG

Added subscriber: @JimG
Campbell Barton self-assigned this 2014-05-06 22:26:42 +02:00
Campbell Barton removed their assignment 2014-05-07 02:49:15 +02:00
Sergey Sharybin was assigned by Campbell Barton 2014-05-07 02:49:15 +02:00

Added subscribers: @Sergey, @ideasman42

Added subscribers: @Sergey, @ideasman42

@Sergey, this bug is caused by: 5d49eff25a, fix for #29957

eModifierTypeType_Nonconstructive -> eModifierTypeType_OnlyDeform

Now mesh_calc_modifiers handles the cloth modifier without adding CD_CLOTH_ORCO.

Adding CD_CLOTH_ORCO in the if (useDeform) { loop isnt so simple since at this point its assumed theres no dm pointer (only deform vert array)

@Sergey, this bug is caused by: 5d49eff25a, fix for #29957 `eModifierTypeType_Nonconstructive` -> `eModifierTypeType_OnlyDeform` Now `mesh_calc_modifiers` handles the cloth modifier without adding `CD_CLOTH_ORCO`. Adding CD_CLOTH_ORCO in the `if (useDeform) {` loop isnt so simple since at this point its assumed theres no `dm` pointer (only deform vert array)

Added subscriber: @mont29

Added subscriber: @mont29

This issue was referenced by 3889483b1f

This issue was referenced by 3889483b1fa23911e58cff4d7d195d16e83760b0

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 3889483b1f.

Closed by commit 3889483b1f.
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#40053
No description provided.