Eevee: Animated Eevee values slowdown. #51925
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
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#51925
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?
Short description of error
Eevee is recompiling/linking the shader every frame if one of the values is animated.
Exact steps for others to reproduce the error
Playback this file with a cube and keyframes in the metallic input of the eevee shader, it gets really, really slow:
animated_metallic.blend
Changed status to: 'Open'
Added subscriber: @dfelinto
Confirmed in both NVidia and AMD. On NVidia at least since the shader is eventually cached, the second playback runs smoothly.
Added subscriber: @Sergey
@Sergey, in the new depsgraph (2.78 --enable-new-depsgraph, or 2.8)
material_changed
is called every frame if one of the node elements is keyframed, even if it's a dynamic uniform.Since
GPU_material_free
is called in this function, the shaders have to be re-compiled every frame, leading to a massive slowdown.This is caused by code which ensures changes in node groups properly triggers viewport update of Cycles, which required adding relations between all node trees and material they are used in. As a side effect, this exposed really weak aspect of editor ID update callback system: the callback is called for any ID when any update is flushed on it, without distinguishing source or purpose of the update.
One of the ideas here will be to get rig of editor ID update callback and do everything from dependency graph updates, by splitting material update into two separate operations: one for building actual GLSL shader and one for updating parameters of existing GLSL shader. This will require the following bits to be implemented:
GPU_material_free()
from material rebuild operation.DEG_id_tag_update()
, so we can differentiate between updates which needs to re-build GLSL and which only needs to update parameters.All those are rather simple steps, but we need a working parameters update without GLSL re-compilation first. Otherwise any work we do about this bug report will effectively revert to old depsgraph behavior which does not do any material updates on playback and doesn't trigger updates on node groups changes.
Added subscriber: @MikePan
This issue was referenced by
dfcb568c16
Changed status from 'Open' to: 'Resolved'
Added subscriber: @JanisGrinvalds
This comment was removed by @JanisGrinvalds