Animated mesh UVs, vertex groups, vertex colors don’t update on time change #68666

Closed
opened 2019-08-15 01:45:39 +02:00 by Damien Picard · 18 comments
Member

System Information
Operating system: Ubuntu 18.10
Graphics card: Nvidia GeForce GTX 660M

Blender Version
Broken: 2.81 (5489611e53)
Worked: 2.79

After adding keyframes to a mesh object data, mesh UVs, vertex groups and vertex colors don’t get updated when changing the time.

Exact steps for others to reproduce the error
AnimAll_test-01.blend

  • Open blend file
  • Both planes have keyframes on their UVs. The one on the left also has keyframes on vertex locations.
  • Scrub the timeline to set the time
  • The UVs of the object on the right don’t get updated.

Test file and bug as originally reported by @RomboutVersluijs in blender/blender-addons#68332.

**System Information** Operating system: Ubuntu 18.10 Graphics card: Nvidia GeForce GTX 660M **Blender Version** Broken: 2.81 (5489611e5317) Worked: 2.79 After adding keyframes to a mesh object data, mesh UVs, vertex groups and vertex colors don’t get updated when changing the time. **Exact steps for others to reproduce the error** [AnimAll_test-01.blend](https://archive.blender.org/developer/F7665169/AnimAll_test-01.blend) * Open blend file * Both planes have keyframes on their UVs. The one on the left also has keyframes on vertex locations. * Scrub the timeline to set the time * The UVs of the object on the right don’t get updated. Test file and bug as originally reported by @RomboutVersluijs in blender/blender-addons#68332.
Author
Member

Added subscribers: @RomboutVersluijs, @pioverfour

Added subscribers: @RomboutVersluijs, @pioverfour
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Philipp Oeser self-assigned this 2019-08-15 10:06:07 +02:00
Member

Confirmed, will check on this...

Confirmed, will check on this...
Member

Started looking into this.
Some first notes:

This is what we get on frame change:

graph_id_tag_update: id=SCScene flags=AUDIO_SEEK source=USER_EDIT
graph_id_tag_update: id=SCScene flags=AUDIO_SEEK source=USER_EDIT
graph_id_tag_update: id=SCScene flags=TIME source=USER_EDIT
graph_id_tag_update: id=SCScene flags=TIME source=USER_EDIT
[SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: SOUND_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE()
[SCScene :: View Layer]: Accumulated recalc bits for SCScene: 4235264
[SCScene :: View Layer]: Accumulated recalc bits for OBPoints_UVS: 7
[SCScene :: View Layer]: Accumulated recalc bits for MEPlane: 6
[SCScene :: View Layer]: Accumulated recalc bits for ACPlaneAction.001: 4
[SCScene :: View Layer]: Accumulated recalc bits for ACPlaneAction.002: 4
[SCScene :: View Layer]: Accumulated recalc bits for OBUVs_only: 0
[SCScene :: View Layer]: Accumulated recalc bits for MEPlane.001: 4
[SCScene :: View Layer]: Accumulated recalc bits for ACPlane.001Action: 4
[SCScene :: View Layer]: deg_evaluate_copy_on_write on SCScene (0x7f8788532c08)
[SCScene :: View Layer]: layer_eval_view_layer on View Layer (0x7f87884b1f88)
[SCScene :: View Layer]: BKE_animsys_eval_animdata on OBPoints_UVS (0x7f8788598208) at time 7.000000
[SCScene :: View Layer]: BKE_animsys_eval_animdata on MEPlane (0x7f87884b4e08) at time 7.000000
[SCScene :: View Layer]: BKE_animsys_eval_animdata on MEPlane.001 (0x7f878d3f9908) at time 7.000000
[SCScene :: View Layer]: BKE_object_eval_local_transform on OBPoints_UVS (0x7f8788598208)
[SCScene :: View Layer]: BKE_object_eval_transform_final on OBPoints_UVS (0x7f8788598208)
[SCScene :: View Layer]: BKE_object_eval_eval_base_flags on OBPoints_UVS (0x7f8788598208)
[SCScene :: View Layer]: BKE_object_eval_eval_base_flags on OBUVs_only (0x7f8788597c08)
[SCScene :: View Layer]: BKE_mesh_eval_geometry on MEPlane (0x7f87884b4e08)
[SCScene :: View Layer]: BKE_object_eval_uber_data on OBPoints_UVS (0x7f8788598208)
[SCScene :: View Layer]: BKE_object_handle_data_update on OBPoints_UVS (0x7f8788598208)
Depsgraph updated in 0.000820 seconds.

If one has a look at DepsgraphNodeBuilder::build_animdata it can be observed that:

  • the UV case, seemingly only the mesh ID has a adt->action
  • thus BKE_animsys_eval_animdata is correctly evaluated for the mesh later on framechange, BUT
  • the object ID misses a adt->action thus no BKE_animsys_eval_animdata on the object ID
  • still need to check if this is already the cause (so BKE_object_eval_uber_data / BKE_object_handle_data_update are responsible for correct updates) OR
  • why we are missing BKE_mesh_eval_geometry from the mesh ID

Also BKE_mesh_eval_geometry is bound in DepsgraphNodeBuilder::build_object_data_geometry_datablock for the UV mesh, but not called on framechange...

Stay tuned...

Started looking into this. Some first notes: This is what we get on frame change: ``` graph_id_tag_update: id=SCScene flags=AUDIO_SEEK source=USER_EDIT graph_id_tag_update: id=SCScene flags=AUDIO_SEEK source=USER_EDIT graph_id_tag_update: id=SCScene flags=TIME source=USER_EDIT graph_id_tag_update: id=SCScene flags=TIME source=USER_EDIT [SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL() [SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL() [SCScene :: View Layer]: Operation is entry point for update: ANIMATION_EVAL() [SCScene :: View Layer]: Operation is entry point for update: SOUND_EVAL() [SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE() [SCScene :: View Layer]: Accumulated recalc bits for SCScene: 4235264 [SCScene :: View Layer]: Accumulated recalc bits for OBPoints_UVS: 7 [SCScene :: View Layer]: Accumulated recalc bits for MEPlane: 6 [SCScene :: View Layer]: Accumulated recalc bits for ACPlaneAction.001: 4 [SCScene :: View Layer]: Accumulated recalc bits for ACPlaneAction.002: 4 [SCScene :: View Layer]: Accumulated recalc bits for OBUVs_only: 0 [SCScene :: View Layer]: Accumulated recalc bits for MEPlane.001: 4 [SCScene :: View Layer]: Accumulated recalc bits for ACPlane.001Action: 4 [SCScene :: View Layer]: deg_evaluate_copy_on_write on SCScene (0x7f8788532c08) [SCScene :: View Layer]: layer_eval_view_layer on View Layer (0x7f87884b1f88) [SCScene :: View Layer]: BKE_animsys_eval_animdata on OBPoints_UVS (0x7f8788598208) at time 7.000000 [SCScene :: View Layer]: BKE_animsys_eval_animdata on MEPlane (0x7f87884b4e08) at time 7.000000 [SCScene :: View Layer]: BKE_animsys_eval_animdata on MEPlane.001 (0x7f878d3f9908) at time 7.000000 [SCScene :: View Layer]: BKE_object_eval_local_transform on OBPoints_UVS (0x7f8788598208) [SCScene :: View Layer]: BKE_object_eval_transform_final on OBPoints_UVS (0x7f8788598208) [SCScene :: View Layer]: BKE_object_eval_eval_base_flags on OBPoints_UVS (0x7f8788598208) [SCScene :: View Layer]: BKE_object_eval_eval_base_flags on OBUVs_only (0x7f8788597c08) [SCScene :: View Layer]: BKE_mesh_eval_geometry on MEPlane (0x7f87884b4e08) [SCScene :: View Layer]: BKE_object_eval_uber_data on OBPoints_UVS (0x7f8788598208) [SCScene :: View Layer]: BKE_object_handle_data_update on OBPoints_UVS (0x7f8788598208) Depsgraph updated in 0.000820 seconds. ``` If one has a look at `DepsgraphNodeBuilder::build_animdata` it can be observed that: - the UV case, seemingly only the mesh ID has a `adt->action` - thus `BKE_animsys_eval_animdata` is correctly evaluated for the mesh later on framechange, BUT - the object ID misses a `adt->action` thus no `BKE_animsys_eval_animdata` on the object ID - still need to check if this is already the cause (so `BKE_object_eval_uber_data` / `BKE_object_handle_data_update` are responsible for correct updates) OR - why we are missing `BKE_mesh_eval_geometry` from the mesh ID Also `BKE_mesh_eval_geometry` is bound in `DepsgraphNodeBuilder::build_object_data_geometry_datablock` for the UV mesh, but not called on framechange... Stay tuned...
Author
Member

Thank you for looking into it.
I forgot to mention that the same lack of update also happens with lattice points’ locations. The issue with the lattices can’t be demonstrated with a blend file though, because the workaround found by Rombout Versluijs can’t apply since even the location isn’t updated.
I don’t know if I should open a new bug report for this, as it seems related.

To test lattice points, you may use the animation_animall add-on to insert keys on lattice points.

Thank you for looking into it. I forgot to mention that the same lack of update also happens with lattice points’ locations. The issue with the lattices can’t be demonstrated with a blend file though, because the workaround found by Rombout Versluijs can’t apply since even the location isn’t updated. I don’t know if I should open a new bug report for this, as it seems related. To test lattice points, you may use the animation_animall add-on to insert keys on lattice points.
Philipp Oeser removed their assignment 2019-08-27 14:33:15 +02:00
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

Also note that even if this works with image textures in the file provided, there is still an issue with procedural textures... [these dont update as well]

I'm afraid I wont have time to really look into this further (concentrating on housekeeping/triaging/tagging reports [not that much fixing...sniff] in the tracker for the time being), so I will step down for now to not block progress on this [imho important] issue.
Maybe @Sergey can have a look?

I will also point to the following blender/blender-addons#68332#763573, since there is more information of what is failing at the current state of affairs...

Also note that even if this works with image textures in the file provided, there is still an issue with procedural textures... [these dont update as well] I'm afraid I wont have time to really look into this further (concentrating on housekeeping/triaging/tagging reports [not that much fixing...sniff] in the tracker for the time being), so I will step down for now to not block progress on this [imho important] issue. Maybe @Sergey can have a look? I will also point to the following blender/blender-addons#68332#763573, since there is more information of what is failing at the current state of affairs...
Member

The AnimAll workaround probably caused #69509, so I still think this is a High priority...

The AnimAll workaround probably caused #69509, so I still think this is a High priority...
Member

@Sergey : I have added this to 2.81 milestone (since it was set to "High"), mind checking?

@Sergey : I have added this to 2.81 milestone (since it was set to "High"), mind checking?
Member

quick note: works as soon as you insert a "regular" keyframe on the mesh datablock [e.g. a keyframe on mesh.texspace_location- [x] or something totally unrelated as mesh.use_customdata_vertex_bevel]

quick note: works as soon as you insert a "regular" keyframe on the mesh datablock [e.g. a keyframe on `mesh.texspace_location- [x]` or something totally unrelated as `mesh.use_customdata_vertex_bevel`]

UVs and vertex colors should now be fixed.
But in order to fix the vertex groups case I need to have a demo file.

UVs and vertex colors should now be fixed. But in order to fix the vertex groups case I need to have a demo file.
Member

That enough?
T68666_vgroups.blend

That enough? [T68666_vgroups.blend](https://archive.blender.org/developer/F7758436/T68666_vgroups.blend)
Author
Member

Hi @Sergey, thank you.
UVs appear fixed, but I’m not sure about the vertex colors. In the test file below, one vertex of the mesh labeled V-Cols is supposed to go from blue to white on playback.
The one labeled V-groups has one vertex shift to the right with a Displace modifier.
The lattice Points are also animated.

animall_test_scene.blend

Hi @Sergey, thank you. UVs appear fixed, but I’m not sure about the vertex colors. In the test file below, one vertex of the mesh labeled *V-Cols* is supposed to go from blue to white on playback. The one labeled *V-groups* has one vertex shift to the right with a Displace modifier. The lattice *Points* are also animated. [animall_test_scene.blend](https://archive.blender.org/developer/F7758439/animall_test_scene.blend)
Member

This seems to do it
P1110: #68666 vgroups and vcol fix



diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
index 3620c82d4b3..e6938a8d303 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
@@ -282,7 +282,8 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
            RNA_struct_is_a(ptr->type, &RNA_Spline) || RNA_struct_is_a(ptr->type, &RNA_TextBox) ||
            RNA_struct_is_a(ptr->type, &RNA_GPencilLayer) ||
            RNA_struct_is_a(ptr->type, &RNA_MeshUVLoop) ||
-           RNA_struct_is_a(ptr->type, &RNA_MeshLoopColorLayer)) {
+           RNA_struct_is_a(ptr->type, &RNA_MeshLoopColor) ||
+           RNA_struct_is_a(ptr->type, &RNA_VertexGroupElement)) {
     /* When modifier is used as FROM operation this is likely referencing to
      * the property (for example, modifier's influence).
      * But when it's used as TO operation, this is geometry component. */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 61c8eec7a72..cefc5aded7c 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -392,6 +392,7 @@ extern StructRNA RNA_Mesh;
 extern StructRNA RNA_MeshCacheModifier;
 extern StructRNA RNA_MeshColor;
 extern StructRNA RNA_MeshColorLayer;
+extern StructRNA RNA_MeshLoopColor;
 extern StructRNA RNA_MeshDeformModifier;
 extern StructRNA RNA_MeshEdge;
 extern StructRNA RNA_MeshFloatProperty;

Thanks a whole lot for taking care @Sergey, was looking at it again today a bit (but had my eyes in the wrong corners...), great this is back!

This seems to do it [P1110: #68666 vgroups and vcol fix](https://archive.blender.org/developer/P1110.txt) ``` diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc index 3620c82d4b3..e6938a8d303 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc @@ -282,7 +282,8 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr, RNA_struct_is_a(ptr->type, &RNA_Spline) || RNA_struct_is_a(ptr->type, &RNA_TextBox) || RNA_struct_is_a(ptr->type, &RNA_GPencilLayer) || RNA_struct_is_a(ptr->type, &RNA_MeshUVLoop) || - RNA_struct_is_a(ptr->type, &RNA_MeshLoopColorLayer)) { + RNA_struct_is_a(ptr->type, &RNA_MeshLoopColor) || + RNA_struct_is_a(ptr->type, &RNA_VertexGroupElement)) { /* When modifier is used as FROM operation this is likely referencing to * the property (for example, modifier's influence). * But when it's used as TO operation, this is geometry component. */ diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 61c8eec7a72..cefc5aded7c 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -392,6 +392,7 @@ extern StructRNA RNA_Mesh; extern StructRNA RNA_MeshCacheModifier; extern StructRNA RNA_MeshColor; extern StructRNA RNA_MeshColorLayer; +extern StructRNA RNA_MeshLoopColor; extern StructRNA RNA_MeshDeformModifier; extern StructRNA RNA_MeshEdge; extern StructRNA RNA_MeshFloatProperty; ``` Thanks a whole lot for taking care @Sergey, was looking at it again today a bit (but had my eyes in the wrong corners...), great this is back!
Member

updated paste with vcol fix...

updated paste with vcol fix...

@lichtwerk, looks correct. Mind adding RNA_LatticePoint to the same exceptions and commit?

@lichtwerk, looks correct. Mind adding `RNA_LatticePoint` to the same exceptions and commit?

This issue was referenced by 08b0c08577

This issue was referenced by 08b0c08577e677b5cd8168db1b67271345202531
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Philipp Oeser self-assigned this 2019-09-19 17:26:28 +02:00
Thomas Dinges added this to the 2.81 milestone 2023-02-08 16:47:00 +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
4 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#68666
No description provided.