Image Texture unpredictable behavior in Workbench renderer when duplicating node #74713
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#74713
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: Linux-4.18.0-25-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116
Blender Version
Broken: version: 2.83 (sub 6), branch: master, commit date: 2020-03-03 18:38, hash:
31aefdeec5
Short description of error
Duplicating an Image Texture node causes the displayed image texture to go all white in Workbench renderer
Exact steps for others to reproduce the error
see attached .blend demo
Demo video:
image_texture_issue.mp4
Source image:
.blend file:
image_texture_issue.blend
Added subscriber: @clepsydrae
#75427 was marked as duplicate of this issue
Added subscribers: @Jeroen-Bakker, @mano-wii
I can confirm.
I'm not sure which criteria Workbenck uses to choose the texture node. (I imagined it would be the last selected texture).
Manual informs that it chooses the active texture:
https://docs.blender.org/manual/en/latest/render/workbench/color.html#color
If this is the case, it seems that defining the active texture is somewhat unpredictable.
@Jeroen-Bakker, bug, known issue or works as designed?
Changed status from 'Needs Triage' to: 'Confirmed'
I analyzed the code and this is really a bug involving
depsgraph
and"COW"
.Added subscriber: @Omer-Almadani
Added subscriber: @Sergey
@mano-wii, What are the details, what is going wrong?
Following the video you should have two texture nodes.
Check the
nodeSetActive
function and see which node receives theNODE_ACTIVE_TEXTURE
flag when selecting it.It is always the last selected node texture.
Now notice the
nodeGetActiveTexture
function that is called by the Workbench.The node name with the
NODE_ACTIVE_TEXTURE
flag is another.I haven't investigated this problem for a while, but I suspect that when comparing the IDs you realize that the difference is that one is the COW and the other is the original.
There is no ID comparison or difference is happening in the dependency graph. The only issue I do see which is related to dependency graph is that removing texture from the node (clicking on the X) does not tag relations for update. I would not call it a dependency graph problem since the issue is not in the graph: someone need to call
DEG_relations_tag_update()
in the proper place. But this is separate issue (which must be fixed, but which is not the root cause of this bug).Now, to isolate whether something is caused by missing relations update tag or ID update tag: save and reload. If bug does not happen after save and reload it might be a missing update tag (either in the dependency graph, or in other area which might be doing caching). Here it seems save and reload after removing the texture does not solve the problem. So you can be quite sure this bug is not related to dependency graph update/evaluaiton.
Now when you mention
nodeSetActive()
. This function does check for a proper texture ID, so clicking on a node which does not have texture it will not become active. But this function is not called when you remove the texture from node:nodeSetActive()
is not called when you click on "X".What happens is: duplicating node makes the new one active. Deleting texture from this node does not affect the node active state, so you are ending up with a situation when active node has no texture ID.
If the viewport is designed to use active texture in workbench mode, then this actually seems a proper behavior: the node is active and it does not have texture.
We can try changing active texture when you removed texture from node, but think this will cause more confusion than solve issues. Imagine situation:
The last point can be addressed by doing
if ((node->flag & NODE_ACTIVE) && node->id != NULL) {
innodeGetActiveTexture
, but it does not solve the confusion that after clicking on "X" some other random texture will be used in the viewport.The problem that I considered here was not to do with node without texture (by pressing the X).
You can add another texture to the other node if you prefer.
The problem I see is that the active texture is not the last one selected (as seen in 2.79)
image_texture_issue_2_79.blend
(When I mentioned comparing IDs I mean to manually compare the values of "same nodes" in the IDE)
So it's nothing to do with duplication at all then, and the issue is in the selection operator, which does modifications without telling anyone about it.
P1375: Fix for #74713
This issue was referenced by
27e3361eb5
This issue was referenced by
4d677ec90d
Changed status from 'Confirmed' to: 'Resolved'