Material shading doesn't reflect animated texture nodes #49418

Closed
opened 2016-09-21 09:30:13 +02:00 by gandalf3 · 7 comments
Member

System Information
Archlinux

Blender Version
Broken: latest master (586c589)

Short description of error
Material shading doesn't refresh every frame to reflect keyframes on material nodes, even when rendered with OpenGL render

Exact steps for others to reproduce the error

  1. Open animated_material_nodes_not_updated_material_shading.blend
  2. Play animation in material shading (nothing appears to happen)
  3. Play animation in rendered shading (something appears to happen)
**System Information** Archlinux **Blender Version** Broken: latest master (586c589) **Short description of error** Material shading doesn't refresh every frame to reflect keyframes on material nodes, even when rendered with OpenGL render **Exact steps for others to reproduce the error** 1. Open [animated_material_nodes_not_updated_material_shading.blend](https://archive.blender.org/developer/F365555/animated_material_nodes_not_updated_material_shading.blend) 2. Play animation in material shading (nothing appears to happen) 3. Play animation in rendered shading (something appears to happen)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @gandalf3

Added subscriber: @gandalf3

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2016-09-21 10:33:39 +02:00

Thanks for the report, but this is a known limitation. With current design of shaders and dependency graph it's not possible to avoid GLSL code re-compilation when something changes in the graph, even if it's just a new value of some slider. And in order to keep fps at possible maximum any GLSL update is disabled during playback, this is because GLSL compilaiton is not cheap.

Hopefully this will be addressed in the new viewport, but for now it is a known limitation.

Thanks for the report, but this is a known limitation. With current design of shaders and dependency graph it's not possible to avoid GLSL code re-compilation when something changes in the graph, even if it's just a new value of some slider. And in order to keep fps at possible maximum any GLSL update is disabled during playback, this is because GLSL compilaiton is not cheap. Hopefully this will be addressed in the new viewport, but for now it is a known limitation.
Author
Member

@Sergey I see, thanks.

Out of curiosity, I added a frame change handler to the example .blend to update the material on every frame.

opengl render took 4:38
8 sample cycles render took 3:38

However, the interesting part is:
After performing an opengl render (or even just playing the animation in the viewport once), opengl suddenly starts working in realtime (viewport playback at a solid 24fps, opengl render in 17 seconds).

I assume there is some sort of caching going on, but strangely I can't find any way of invalidating this cache. Opengl is still fast after restarting blender and re-opening the file. Changing a value on the material made it slow, but changing it back made it fast again.

Where is this cache stored? Is it ever freed?

@Sergey I see, thanks. Out of curiosity, I added a frame change handler to the example .blend to update the material on every frame. opengl render took 4:38 8 sample cycles render took 3:38 However, the interesting part is: After performing an opengl render (or even just playing the animation in the viewport once), opengl suddenly starts working in realtime (viewport playback at a solid 24fps, opengl render in 17 seconds). I assume there is some sort of caching going on, but strangely I can't find any way of invalidating this cache. Opengl is still fast after restarting blender and re-opening the file. Changing a value on the material made it slow, but changing it back made it fast again. Where is this cache stored? Is it ever freed?

Not sure about GLSL, but CUDA/OpenCL is cached by drivers. GLSL might have similar behavior, which kind of makes sense. Where it's stored is kind of underfined. On linux it's usually ~/.nv for the persistent cache. There might also be some in-process cache in the driver.

But that's all more a speculation. Blender doesn't do any caching here on it's own.

Not sure about GLSL, but CUDA/OpenCL is cached by drivers. GLSL might have similar behavior, which kind of makes sense. Where it's stored is kind of underfined. On linux it's usually ~/.nv for the persistent cache. There might also be some in-process cache in the driver. But that's all more a speculation. Blender doesn't do any caching here on it's own.
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
2 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#49418
No description provided.