Lattice Modifier Slowdown even when hidden or unassigned #105268
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105268
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?
System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.24
Blender Version
Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash:
rB55485cb379f7
Worked: (newest version of Blender that worked as expected)
Short description of error
Lattice Modifier slows down the object even when there's no lattice object attached to it. And disabling it from the list doesn't change this.
Exact steps for others to reproduce the error
Move the object in the file, disable Lattice, move, delete Lattice, move and see the difference.
*********** ISSUE ABOVE RESOLVED, NEW ISSUE BELOW ********
*********** ISSUE ABOVE RESOLVED, NEW ISSUE BELOW ********
*********** ISSUE ABOVE RESOLVED, NEW ISSUE BELOW ********
These are 2 other issues related to the Lattice Modifer that are the following:
I'm only reporting the second problem because I don't know how a modifier that is just supposed to deform the mesh has so much impact on the animation, so it feels like a bug.
I made the file very small so you can see the issue by disabling / enabling the Modifiers on the head.
To clean all disabled modifiers I used the script:
import bpy
Get a list of all selected objects
selected_objects = bpy.context.selected_objects
Iterate over the selected objects
for obj in selected_objects:
Check if the object has any modifiers
if len(obj.modifiers) > 0:
# Iterate over the object's modifiers
for modifier in obj.modifiers:
# If the modifier is disabled, delete it
if not modifier.show_viewport:
obj.modifiers.remove(modifier)
Hello @Sergey
This is a really old thing ... :
21db9fff12
I'm not sure what the function of the
DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, "Lattice Modifier");
line?That call makes it so that there is dependency from the
object
's transform to the modifier.If a modifier needs transformation of that object it needs to inform the dependnecy graph about it. This will ensure that the transformation on that object is evaluated prior to the evaluation of the modifier.
I mean, if lattice is null, should the dependency on transform still be there?
Even the modifier itself is considered not active
(It was worth asking a little more correctly: is this line really supposed to always be there, is its function needed in any case)
Think I've misread the code (it is quite different in the newer code base, and is more explicit).
So scratch the previous reply, the line you're referring to is about dependency of the evaluated geometry from the object's transformation (of the same object).
You can do something like this:
This will avoid creating dependencies in the graph until they are actually needed.
P.S. There should be an easy way to de-duplicate the condition in the snippet and in the
isDisabled()
.That is, can say this:
That commit was correct, but somewhere in history this code began to work differently and the causer was someone else?
(Looking for the causer to confirm this. But given this history, it would be easier to just fix it right away :) )
Is this fixed in the latest 3.6 beta? I have a scene with some lattice objects. Even when they are hidden they drop the animation from 24fps to 5. You can see on the video when I deactivate (with alt to work on all objects). And the fps returns to normal only after I completely delete the modifier.
I'm reopening but I'm not sure if I should, but I also don't know if you'll see if I don't.
The issue which was initially described (lattice modifier without lattice specified in it) should be fixed in 3.6.
The updated video seems to show a bit different aspect though: you'd expect disabling modifiers will bring FPS up.
Unfortunately, this is a tricky aspect to unentangle, and it was not yet addressed in any version of Blender. There is some related work (like D15625) which optimizes out evaluated of unneeded dependencies, but not the visible object itself.
Do you mind updating the description a little bit, to make it explicit which aspect of the problem still needs to be addressed?
Thanks a lot Sergey! I've updated the task with a better description of the new issue + the files. Let me know if you need anything else. :)
Newer problem looks related to existing dependency graph reports: #95198, #73199
@GabrielMoro , can you confirm?
It seems to me like it’s the same issue, yes! Thanks for tracking it @PratikPB2123 - (don’t know if I need to close or if you’ll merge)
Thanks. Will close the report.
Please subscribe above report(s) for further updates :)