Driver updated mapping node fields do not propagate to viewport when used with Material render mode #46571

Closed
opened 2015-10-22 20:56:12 +02:00 by Dolphin Dream · 10 comments
Member

System Information
OS: Ubuntu 14.04 (64 bit)
RAM : 7.8 GiB
CPU: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4
GFX: GeForce GT 520/PCIe/SSE2

Blender Version
2.76 (hash: 48f7dd6 )

Short description of error
Driver updated mapping node fields do not propagate to viewport properly when used with Material render mode. The driver values seem to update in node but the viewport do not reflect these changes. However, when the viewport has the render mode set to Rendered (cycles engine) the viewport seem to update correctly.

Exact steps for others to reproduce the error
The attached blend file includes a plane that has a material with an image texture using a mapping node to adjust image scale. I use a cube to drive the scale fields of the mapping node. The driver for each field is a simple expression based driver taking its value from the location of the cube. If the viewport rendering mode is set to Material the texture does not update properly when the cube moves. However, an update can be enforced by clicking the mapping node tab buttons. However, with the Rendered mode selected in the viewport the texture scaling updates correctly when moving the cube. This behavior manifest also when running blender with --enable-new-depsgraph.

driverMaterialModeBug.blend

**System Information** OS: Ubuntu 14.04 (64 bit) RAM : 7.8 GiB CPU: Intel® Core™ i5-2400 CPU @ 3.10GHz × 4 GFX: GeForce GT 520/PCIe/SSE2 **Blender Version** 2.76 (hash: 48f7dd6 ) **Short description of error** Driver updated mapping node fields do not propagate to viewport properly when used with Material render mode. The driver values seem to update in node but the viewport do not reflect these changes. However, when the viewport has the render mode set to Rendered (cycles engine) the viewport seem to update correctly. **Exact steps for others to reproduce the error** The attached blend file includes a plane that has a material with an image texture using a mapping node to adjust image scale. I use a cube to drive the scale fields of the mapping node. The driver for each field is a simple expression based driver taking its value from the location of the cube. If the viewport rendering mode is set to Material the texture does not update properly when the cube moves. However, an update can be enforced by clicking the mapping node tab buttons. However, with the Rendered mode selected in the viewport the texture scaling updates correctly when moving the cube. This behavior manifest also when running blender with --enable-new-depsgraph. [driverMaterialModeBug.blend](https://archive.blender.org/developer/F246546/driverMaterialModeBug.blend)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MariusGiurgi

Added subscriber: @MariusGiurgi
Author
Member

And btw, if you place the driven nodes inside of a group node then the drivers do not work in "Rendered" mode either (viewport does not get updated). The values seem to update properly in the driven node (when moving the cube) but the viewport does not reflect the changes (e.g. texture scale stays the same). Tapping the mapping node's tab buttons can enforce the viewport to update though. And what's more, when using the new depsgraph (--enable-new-depsgraph) putting the driven nodes inside of a group node the driven values don't seem to update at all in the node. (e.g. try to group the first three nodes: tex coord, mapping and image texture into a group node to test this). Also in this case the driven values in the node do not update when taping the mapping node's tab buttons either (e.g. you cannot enforce an update this way with the new depsgraph enabled).

And btw, if you place the driven nodes inside of a group node then the drivers do not work in "Rendered" mode either (viewport does not get updated). The values seem to update properly in the driven node (when moving the cube) but the viewport does not reflect the changes (e.g. texture scale stays the same). Tapping the mapping node's tab buttons can enforce the viewport to update though. And what's more, when using the new depsgraph (--enable-new-depsgraph) putting the driven nodes inside of a group node the driven values don't seem to update at all in the node. (e.g. try to group the first three nodes: tex coord, mapping and image texture into a group node to test this). Also in this case the driven values in the node do not update when taping the mapping node's tab buttons either (e.g. you cannot enforce an update this way with the new depsgraph enabled).

Added subscriber: @Sergey

Added subscriber: @Sergey

There are in fact two things here:

  • Viewport doesn't re-compile shaders on animation update because of the performance issues (it takes quite some time to compile GLSL shader and we don't have "partial" shader updates). This is something we can improve in the future but not considered a bug.

  • Driving mapping node will never invaldate final matrix, meaning there's no way to toggle shaded mode to force GLSL to be recompiled with proper settings. This is something we have to look into.

There are in fact two things here: - Viewport doesn't re-compile shaders on animation update because of the performance issues (it takes quite some time to compile GLSL shader and we don't have "partial" shader updates). This is something we can improve in the future but not considered a bug. - Driving mapping node will never invaldate final matrix, meaning there's no way to toggle shaded mode to force GLSL to be recompiled with proper settings. This is something we have to look into.
Author
Member

Sergey, but what about the drivers not working while they are in a group node ? (rendered mode in particular, which i assume is not GLSL based).

About the Material render mode though.. i use this a lot to test my animation before i render (the Rendered mode to test the animation is simply too slow). Being able change fields in multiple mapping modes for instance it's a lot easier to do with drivers (rather than keyframe animating each field the same way) and since the drivers do not work when i place those nodes in a group node, it makes this kind of task a LOT harder to do. So I guess there is till a need to either expose the individual fields of a node (e.g. scale fields in the mapping node) as a input node so i can drive multiple mapping nodes at the same time by animating just one value. Drivers would be suited for this of course, IF they worked.

Sergey, but what about the drivers not working while they are in a group node ? (rendered mode in particular, which i assume is not GLSL based). About the Material render mode though.. i use this a lot to test my animation before i render (the Rendered mode to test the animation is simply too slow). Being able change fields in multiple mapping modes for instance it's a lot easier to do with drivers (rather than keyframe animating each field the same way) and since the drivers do not work when i place those nodes in a group node, it makes this kind of task a LOT harder to do. So I guess there is till a need to either expose the individual fields of a node (e.g. scale fields in the mapping node) as a input node so i can drive multiple mapping nodes at the same time by animating just one value. Drivers would be suited for this of course, IF they worked.

Added subscriber: @gregsaw

Added subscriber: @gregsaw

In #46571#344128, @MariusGiurgi wrote:
Sergey, but what about the drivers not working while they are in a group node ? (rendered mode in particular, which i assume is not GLSL based).
(...)
the drivers do not work when i place those nodes in a group node
(...)
there is till a need to either expose the individual fields of a node (e.g. scale fields in the mapping node) as a input node so i can drive multiple mapping nodes at the same time by animating just one value. Drivers would be suited for this of course, IF they worked.

Just encountered this bug myself, which is a dealbreaker for some workflows. Simply put - drivers do not work for any node fields (mapping node rotation XYZ in my case) while in node groups. outside node groups they work just fine.
I guess I'll report this as a separate bug?

> In #46571#344128, @MariusGiurgi wrote: > Sergey, but what about the drivers not working while they are in a group node ? (rendered mode in particular, which i assume is not GLSL based). >(...) > the drivers do not work when i place those nodes in a group node > (...) > there is till a need to either expose the individual fields of a node (e.g. scale fields in the mapping node) as a input node so i can drive multiple mapping nodes at the same time by animating just one value. Drivers would be suited for this of course, IF they worked. > > Just encountered this bug myself, which is a dealbreaker for some workflows. Simply put - drivers do not work for any node fields (mapping node rotation XYZ in my case) while in node groups. outside node groups they work just fine. I guess I'll report this as a separate bug?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2016-01-26 16:50:49 +01:00

As for original report -- all the RNA updates from animation system were disabled because of lack of stability and weird artifacts happening and now animation system only relies on the depsgraph update tags. However, depsgraph has absolutely no clue how to deal with node trees, and can not even know what node to update (at least currently). So there's no simple solution for that and will be addressed as a bigger depsgraph work.

As for node groups -- they should work in new dependency graph.

Thanks for the report, but considering it a TODO.

As for original report -- all the RNA updates from animation system were disabled because of lack of stability and weird artifacts happening and now animation system only relies on the depsgraph update tags. However, depsgraph has absolutely no clue how to deal with node trees, and can not even know what node to update (at least currently). So there's no simple solution for that and will be addressed as a bigger depsgraph work. As for node groups -- they should work in new dependency graph. Thanks for the report, but considering it a TODO.
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
3 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#46571
No description provided.