Scalar Group Node Output is One Pixel Large #48297

Open
opened 7 years ago by Darkfie9825 · 14 comments

System Information
uname -r: 4.3.0-1-amd64
Debian 8 testing (sid)

Blender Version
Broken: 2.77a (official tar'ed build from blender.org)

Short description of error
My compositing node system relies extensively on nodegroups, sometimes nested several layers deep. Sometimes, these nodegroups need to process not a bitmap, but simply an individual scalar value - which might be inputted using the RGB node, or the Value node. It's when outputting a scalar from a nodegroup that it breaks; the output value is a bitmap that is one pixel large.

I suspect that any person or studio interested in creating a nested node system for their own ease of use will run into this issue!

Exact steps for others to reproduce the error

  1. Load compositing scene.

  2. Create 2 Math nodes. Put each in its own nodegroup.

  3. Let each nodegroup have one input and one output, passing through the Math node's first input within each group. In both cases set the Math node to Multiply, and the second input to 1.

  4. Pass in the value 1 for the first nodegroup, and let the output of nodegroup 1 become the input of nodegroup 2.

  5. Find any image, and plug it into the first input of a color Multiply node. In input 2, plug in the output of nodegroup 2.

  6. Notice as a single pixel in the image remains unchanged, as the rest of the image becomes black.

I attached screenshots to better illustrate the setup:

Screenshot from 2016-04-28 01-04-01.png
Screenshot from 2016-04-28 01-04-04.png
Screenshot from 2016-04-28 01-06-48.png

**System Information** uname -r: 4.3.0-1-amd64 Debian 8 testing (sid) **Blender Version** Broken: 2.77a (official tar'ed build from blender.org) **Short description of error** My compositing node system relies extensively on nodegroups, sometimes nested several layers deep. Sometimes, these nodegroups need to process not a bitmap, but simply an individual scalar value - which might be inputted using the RGB node, or the Value node. It's when outputting a scalar from a nodegroup that it breaks; the output value is a bitmap that is one pixel large. I suspect that any person or studio interested in creating a nested node system for their own ease of use will run into this issue! **Exact steps for others to reproduce the error** 1. Load compositing scene. 2. Create 2 Math nodes. Put each in its own nodegroup. 3. Let each nodegroup have one input and one output, passing through the Math node's first input within each group. In both cases set the Math node to Multiply, and the second input to 1. 4. Pass in the value 1 for the first nodegroup, and let the output of nodegroup 1 become the input of nodegroup 2. 5. Find any image, and plug it into the first input of a color Multiply node. In input 2, plug in the output of nodegroup 2. 6. Notice as a single pixel in the image remains unchanged, as the rest of the image becomes black. I attached screenshots to better illustrate the setup: ![Screenshot from 2016-04-28 01-04-01.png](https://archive.blender.org/developer/F307366/Screenshot_from_2016-04-28_01-04-01.png) ![Screenshot from 2016-04-28 01-04-04.png](https://archive.blender.org/developer/F307365/Screenshot_from_2016-04-28_01-04-04.png) ![Screenshot from 2016-04-28 01-06-48.png](https://archive.blender.org/developer/F307371/Screenshot_from_2016-04-28_01-06-48.png)
Poster

Changed status to: 'Open'

Changed status to: 'Open'
Poster

Added subscriber: @Darkfie9825

Added subscriber: @Darkfie9825
Collaborator

#93013 was marked as duplicate of this issue

#93013 was marked as duplicate of this issue
mont29 commented 7 years ago
Owner

Added subscriber: @mont29

Added subscriber: @mont29
mont29 commented 7 years ago
Owner

Huummm, seems to have been solved since 2.77a? I cannot confirm that with latest master here, please try the latest build from our buildbot. Otherwise, please attach a .blend, much simpler for us to reproduce and investigate.

Huummm, seems to have been solved since 2.77a? I cannot confirm that with latest master here, please try the latest build from [our buildbot](https://builder.blender.org/download). Otherwise, please attach a .blend, much simpler for us to reproduce and investigate.
Poster

Aha! It's a bug with the Buffer Groups option! Bug hunting is fun...

I'll provide a blend:

bug.blend

Turn off Buffer Groups and recomposite, and it'll work perfectly. Turn it back on, and there'll be a single pixel glaring at you!

I tested this with the latest (4AM) build as well; the bug persists.

Aha! It's a bug with the **Buffer Groups** option! Bug hunting is fun... I'll provide a blend: [bug.blend](https://archive.blender.org/developer/F308113/bug.blend) Turn off Buffer Groups and recomposite, and it'll work perfectly. Turn it back on, and there'll be a single pixel glaring at you! I tested this with the latest (4AM) build as well; the bug persists.
Sergey commented 7 years ago
Owner

Added subscriber: @Sergey

Added subscriber: @Sergey
Jeroen-Bakker was assigned by Sergey 7 years ago
Sergey commented 7 years ago
Owner

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Sergey commented 7 years ago
Owner

@Jeroen-Bakker, there are two issues here:

  1. The one which is reported in this repot
  2. If you ungroup second group, then you'll have some nasty race conditions between group buffer read and write operations, causing wrong compo results.

First issue is probably not so hard, but second one i couldn't really fix today and wouldn't mind having some debuging from you ;)

@Jeroen-Bakker, there are two issues here: 1. The one which is reported in this repot 2. If you ungroup second group, then you'll have some nasty race conditions between group buffer read and write operations, causing wrong compo results. First issue is probably not so hard, but second one i couldn't really fix today and wouldn't mind having some debuging from you ;)
Collaborator

Issue seems likely to be caused by ##MathBaseOperation::determineResolution##
it first checks if there are is a connection what can be marked as being important. This is done by determining the resolution with using a dummy preferred resolution of ##(0,0)##.

The Multiply node caches this resolution for next calls. and therefore also returns this. When ##0,0## is returned it is set to ##1,1## by ##WriteBufferOperation::determineResolution##

When commenting out the code at ##MathBaseOperation::determineResolution## the issue is solved, but it impacts the functionality of the node (determining the right output resolution). We need to see how we can really check what path determines the correct output resolution.

This part is also implemented by the ##MixBaseOperation##. Could not find other nodes with this implementation.

We propose that we add a boolean to the ##NodeOperation::determineResolution## method ##bool cache=true##. In the ##MixBaseOperation## and the ##MathBaseOperation## we set cache to false. This way we get the answer we want without influencing the rest of the system. Also need to change the setResolution for this one.

@Sergey, what do you think about this solution?

Issue seems likely to be caused by ##MathBaseOperation::determineResolution## it first checks if there are is a connection what can be marked as being important. This is done by determining the resolution with using a dummy preferred resolution of ##(0,0)##. The Multiply node caches this resolution for next calls. and therefore also returns this. When ##0,0## is returned it is set to ##1,1## by ##WriteBufferOperation::determineResolution## When commenting out the code at ##MathBaseOperation::determineResolution## the issue is solved, but it impacts the functionality of the node (determining the right output resolution). We need to see how we can really check what path determines the correct output resolution. This part is also implemented by the ##MixBaseOperation##. Could not find other nodes with this implementation. We propose that we add a boolean to the ##NodeOperation::determineResolution## method ##bool cache=true##. In the ##MixBaseOperation## and the ##MathBaseOperation## we set cache to false. This way we get the answer we want without influencing the rest of the system. Also need to change the setResolution for this one. @Sergey, what do you think about this solution?
Sergey commented 7 years ago
Owner

Not really fan of that. It's just some corner-case complication over the system which is already really unclear. Unless you can come up with really strict rule of how determineResolution() should behave, when to cache and when not i;m not really fan of such hacks.

Why can't we just change fallback resolution to (1, 1) ? Or if some nodes really don't need to cache resolution, overload their isResolutionSet()?

Also, be aware that resolution is is caching for a reason -- with a complex enough nodes setup it might take forever to calculate resolution, since this part of the code is actually an exponential complexity.

Not really fan of that. It's just some corner-case complication over the system which is already really unclear. Unless you can come up with really strict rule of how `determineResolution()` should behave, when to cache and when not i;m not really fan of such hacks. Why can't we just change fallback resolution to `(1, 1)` ? Or if some nodes really don't need to cache resolution, overload their `isResolutionSet()`? Also, be aware that resolution is is caching for a reason -- with a complex enough nodes setup it might take forever to calculate resolution, since this part of the code is actually an exponential complexity.

Added subscriber: @DoomScream

Added subscriber: @DoomScream

Removed subscriber: @DoomScream

Removed subscriber: @DoomScream
Jeroen-Bakker was unassigned by dfelinto 3 years ago
Collaborator

Added subscribers: @RealJayJobes, @lichtwerk

Added subscribers: @RealJayJobes, @lichtwerk
lichtwerk removed the
legacy module/VFX & Video
label 4 hours ago
lichtwerk removed the
Interest/VFX & Video
label 4 hours ago
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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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
7 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#48297
Loading…
There is no content yet.