Eevee preview nodes performance drop #71214
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#71214
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
Graphics card: GeForce GTX 1060
Blender Version
Broken: Blender 2.81 Beta
aff6446e06
Worked: 2.8
Short description of error
Complex shader with large amount of math nodes slow down performance
in 2.8 60 fps
in 2.81 30 fps
Exact steps for others to reproduce the error
Create material with 30 node groups contains 30 math nodes. Set viewport to material preview and watch performance droping NodesPerformanceDrop.blend
Added subscriber: @DanilaPryamonosov
Added subscribers: @fclem, @Sergey, @dfelinto, @mano-wii
I can confirm, but I don't know if the solution is simple.
The problem arose because now all the shader tree is flattened before evaluation.
But the main reason for slowness is because of animated materials (see
9d59d209
).Blender doesn't differentiate whether a material is animated or not, so the
BKE_material_eval
simply clears allgpumaterials
references with each frame change.Then
DRW_manager
needs to recreate thegpumaterial
, but first check for similar passes.And to do this check, it has to go through the entire node tree to create a hash.
And so finds the pass of the original
gpumaterial
.Removing this line, the problem is solved:
But then it would bring a problem for the animated materials.
It would be nice to find another solution for animated materials (updating only uniforms for example).
Assigning to @fclem, but @dfelinto and @Sergey may also have some remarks about it.
Part of the issue here is that material is not supposed to be re-evaluating on playback here.
The reason it was is because of some rather uncommon (in my experience) situation when ID has action but no f-curve. This can be fixed with something like P1149.
But there should be a way to speed up things even for the case when there is a real animation involved.
Not sure about current implementation, but we can calculate hash of every node group from dependency graph (which will happen in nice and threaded environment). We can even do things like constant folding and removal of unconnected nodes from there.
Now, even if that is still by-passed (imagine, that all the groups are connected and such) we can re-use hashes calculated for every group and use those to save on calculating hashes.
I was a bit hasty, the hash is not the problem (obtained from
GPU_generate_pass
),but it is
GPU_material_from_nodetree
in general (it should not even be called again),especially
ntreeGPUMaterialNodes
(68,66% of the frame time).If the material changes then i don't see how you can avoid
GPU_material_from_nodetree
.Added subscriber: @StanislavOvcharov
dews any hope this bug will be fixed?
This can be a task for #68908 (Faster Animation Playback)
Changed status from 'Confirmed' to: 'Resolved'
This has been fixed by
32f0bb0523