Modifiers which deform spline points propagate across all users of the same data unexpectedly #71055

Open
opened 2019-10-24 00:39:21 +02:00 by Sam Brubaker · 17 comments

Version: 2.81 build Oct 23 (Linux 64)

When a Curve Object Modifier uses the "Apply On Spline" setting, it seems to affect the curve data directly. This means that if a curve data block is used by multiple objects, a modifier on one of those objects will affect all the others.

curve_modifier_bug.blend

To reproduce, open and inspect the attached file. Notice that the objects on the left both have deformation modifiers, while their clones on the right do not. However, the curve object still appears to be modified because it uses the same data as the modified curve object. This is not how modifiers are supposed to behave.

The expected behavior is demonstrated by the two mesh objects. Like the curve objects, they also share the same data, but the effect of the modifier is limited to the owner of the modifier.

Version: 2.81 build Oct 23 (Linux 64) When a Curve Object Modifier uses the "Apply On Spline" setting, it seems to affect the curve data directly. This means that if a curve data block is used by multiple objects, a modifier on one of those objects will affect all the others. [curve_modifier_bug.blend](https://archive.blender.org/developer/F7851457/curve_modifier_bug.blend) To reproduce, open and inspect the attached file. Notice that the objects on the left both have deformation modifiers, while their clones on the right do not. However, the curve object still appears to be modified because it uses the same data as the modified curve object. This is not how modifiers are supposed to behave. The expected behavior is demonstrated by the two mesh objects. Like the curve objects, they also share the same data, but the effect of the modifier is limited to the owner of the modifier.
Author

Added subscriber: @rocketman

Added subscriber: @rocketman

#74616 was marked as duplicate of this issue

#74616 was marked as duplicate of this issue

#65007 was marked as duplicate of this issue

#65007 was marked as duplicate of this issue

Added subscribers: @mont29, @ideasman42, @mano-wii

Added subscribers: @mont29, @ideasman42, @mano-wii
Bastien Montagne was assigned by Germano Cavalcante 2019-10-24 21:32:36 +02:00

I can confirm. Other objects are using the modified data.
This did not happen in Blender 2.79.

@mont29, according to the modules's page , you maintain modifiers and curves.
Could you take a look?

Cc @campbellbarton.

I can confirm. Other objects are using the modified data. This did not happen in Blender 2.79. @mont29, according to the [modules's page ](https://wiki.blender.org/wiki/Modules), you maintain modifiers and curves. Could you take a look? Cc @campbellbarton.
Bastien Montagne removed their assignment 2019-11-05 15:04:58 +01:00

Added subscribers: @fclem, @Jeroen-Bakker

Added subscribers: @fclem, @Jeroen-Bakker

this is not really my area, from quick look in code I have the impression that data onto which the modifier is applied is properly de-duplicated during eval, so I'd first suspect some issue in drawing code itself (also because outline does not follow shown geometry...). it also reminds me of some similar issue we had with meshes at some points, because drawing cache was per obdata and not per object or something like that... that was fixed for meshes, not sure if it was for other geometry types? We need @fclem or @Jeroen-Bakker to have a look at that first imho.

this is not really my area, from quick look in code I have the impression that data onto which the modifier is applied is properly de-duplicated during eval, so I'd first suspect some issue in drawing code itself (also because outline does not follow shown geometry...). it also reminds me of some similar issue we had with meshes at some points, because drawing cache was per obdata and not per object or something like that... that was fixed for meshes, not sure if it was for other geometry types? We need @fclem or @Jeroen-Bakker to have a look at that first imho.

Added subscriber: @NunoAlexandreConceicao

Added subscriber: @NunoAlexandreConceicao

Hi, sorry, is there any chance this bug been looked at before the final release?

Hi, sorry, is there any chance this bug been looked at before the final release?
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Also think thats an Eevee / drawing problem [Cycles renders this correctly...]

Also think thats an Eevee / drawing problem [Cycles renders this correctly...]
Member

This all seems to be related / holds more info:
a14735d11d
#61184 (linked curves with curve modifiers arent drawn correctly)
#63871 (Curves with curve modifiers are not translated to mesh correctly and can't be used as a target for constraints and modifiers predictably)
#65007 (Linked curves with curve modifiers are not deformed correctly)

This all seems to be related / holds more info: a14735d11d #61184 (linked curves with curve modifiers arent drawn correctly) #63871 (Curves with curve modifiers are not translated to mesh correctly and can't be used as a target for constraints and modifiers predictably) #65007 (Linked curves with curve modifiers are not deformed correctly)

Its seems like a problem that has been lingering for a while and very bad for people doing rigs that involve curves, even if just for view port representation. Just came across it recently because Im a newcomer from another 3D package but its a worrying issue.

Its seems like a problem that has been lingering for a while and very bad for people doing rigs that involve curves, even if just for view port representation. Just came across it recently because Im a newcomer from another 3D package but its a worrying issue.
Clément Foucault was assigned by Germano Cavalcante 2019-11-12 20:32:36 +01:00

Both objects have the same ob->data but different ob->runtime.curve_cache.
The problem is that all drawing information is cached in ((Curve *)ob->data)->batch_cache.
I see two possible solutions:

  • also create mesh_eval for this type of modifier (pretessellatePoint) or,
  • move batch_cache from cu to curve_cache.
Both objects have the same `ob->data` but different `ob->runtime.curve_cache`. The problem is that all drawing information is cached in `((Curve *)ob->data)->batch_cache`. I see two possible solutions: - also create `mesh_eval` for this type of modifier (`pretessellatePoint`) or, - move `batch_cache` from `cu` to `curve_cache`.

Added subscribers: @Hickz, @brecht

Added subscribers: @Hickz, @brecht
Member

Added subscriber: @karja

Added subscriber: @karja

I've pushed some workaround for 2.83 that should fix the common case. But this does not fix the issue in edit mode.

I've pushed some workaround for 2.83 that should fix the common case. But this does not fix the issue in edit mode.
Clément Foucault removed their assignment 2020-05-14 16:27:26 +02:00
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:15:17 +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
7 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#71055
No description provided.