Script-generated compositor node groups don't update #63050

Closed
opened 2019-03-28 15:08:47 +01:00 by Vaclav Benc · 6 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GeForce 1080Ti

Blender Version
Broken: 2.79b f4dc9f9d68

Short description of error

After running a script to generate compositor node groups, the node groups seem to break.

Exact steps for others to reproduce the error

    1. open attached .blend file
    1. run the script in the .blend file (generate-compositor-nodes.py) to generate the compositor nodes
    1. render with Ctrl+F12
    1. Output_0001.png and Processing-Output_0001.png are different

NOTE: If I save the .blend file, close it and open it again, and then render, then Processing-Output_0001.png is correct (the same as Output_0001.png).

Attached blend file:
blender-nodes-test.blend

**System Information** Operating system: Windows 10 Graphics card: Nvidia GeForce 1080Ti **Blender Version** Broken: 2.79b f4dc9f9d68b **Short description of error** After running a script to generate compositor node groups, the node groups seem to break. **Exact steps for others to reproduce the error** - 1. open attached .blend file - 2. run the script in the .blend file (generate-compositor-nodes.py) to generate the compositor nodes - 3. render with Ctrl+F12 - 4. Output_0001.png and Processing-Output_0001.png are different NOTE: If I save the .blend file, close it and open it again, and then render, then Processing-Output_0001.png is correct (the same as Output_0001.png). Attached blend file: [blender-nodes-test.blend](https://archive.blender.org/developer/F6895245/blender-nodes-test.blend)
Author

Added subscriber: @VaclavBenc

Added subscriber: @VaclavBenc

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Jeroen Bakker was assigned by Sebastian Parborg 2019-03-28 18:23:44 +01:00

I can confirm that this is still an issue in 2.8 (in 2.8 you need to change out render.layers to view_layers though).

I'm also getting an assert when running the script:

ERROR (bke.library): blender/source/blender/blenkernel/intern/library.c:185 id_us_ensure_real: ID user count error: SCScene (from '[Main]')
I can confirm that this is still an issue in 2.8 (in 2.8 you need to change out `render.layers` to `view_layers` though). I'm also getting an assert when running the script: ``` ERROR (bke.library): blender/source/blender/blenkernel/intern/library.c:185 id_us_ensure_real: ID user count error: SCScene (from '[Main]') ```
Member

Checking doesn't seem to be related to the node group. But in the script the socket type is configured to be a value. And it seems that somewhere in the file output node a single value buffer is stored as (a, a, a, a)

Image: ./Processing-Output_0001.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 117x117+0+0
  Resolution: 28.35x28.35
  Print size: 4.12698x4.12698
  Units: PixelsPerCentimeter
  Type: GrayscaleAlpha
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    gray: 8-bit
    alpha: 8-bit
  Channel statistics:
    Pixels: 13689
    Gray:
      min: 0 (0)
      max: 23 (0.0901961)
      mean: 0.970049 (0.00380411)
      standard deviation: 3.75195 (0.0147135)
      kurtosis: 14.5765
      skewness: 3.93552
      entropy: 0.138801
    Alpha:
      min: 0 (0)
      max: 23 (0.0901961)
      mean: 0.970049 (0.00380411)
      standard deviation: 3.75195 (0.0147135)
      kurtosis: 14.5765
      skewness: -3.93552
      entropy: 0.138801
  Alpha: graya(0,0)   #00000000
  Colors: 24
  Histogram:
     12716: (  0,  0,  0,  0) #00000000 graya(0,0)
        19: (  1,  1,  1,  1) #01010101 graya(1,0.00392157)
        20: (  2,  2,  2,  2) #02020202 graya(2,0.00784314)
         7: (  3,  3,  3,  3) #03030303 graya(3,0.0117647)
        12: (  4,  4,  4,  4) #04040404 graya(4,0.0156863)
         6: (  5,  5,  5,  5) #05050505 graya(5,0.0196078)
        16: (  6,  6,  6,  6) #06060606 graya(6,0.0235294)
        12: (  7,  7,  7,  7) #07070707 graya(7,0.027451)
         5: (  8,  8,  8,  8) #08080808 graya(8,0.0313725)
        10: (  9,  9,  9,  9) #09090909 graya(9,0.0352941)
       258: ( 10, 10, 10, 10) #0A0A0A0A graya(10,0.0392157)
        29: ( 11, 11, 11, 11) #0B0B0B0B graya(11,0.0431373)
        11: ( 12, 12, 12, 12) #0C0C0C0C graya(12,0.0470588)
        14: ( 13, 13, 13, 13) #0D0D0D0D graya(13,0.0509804)
        58: ( 14, 14, 14, 14) #0E0E0E0E graya(14,0.054902)
       103: ( 15, 15, 15, 15) #0F0F0F0F graya(15,0.0588235)
        84: ( 16, 16, 16, 16) #10101010 graya(16,0.0627451)
        76: ( 17, 17, 17, 17) #11111111 graya(17,0.0666667)
        63: ( 18, 18, 18, 18) #12121212 graya(18,0.0705882)
        48: ( 19, 19, 19, 19) #13131313 graya(19,0.0745098)
        45: ( 20, 20, 20, 20) #14141414 graya(20,0.0784314)
        41: ( 21, 21, 21, 21) #15151515 graya(21,0.0823529)
        30: ( 22, 22, 22, 22) #16161616 graya(22,0.0862745)
         6: ( 23, 23, 23, 23) #17171717 graya(23,0.0901961)
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: graya(255,1)
  Border color: graya(223,1)
  Matte color: graya(189,1)
  Transparent color: graya(0,0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 117x117+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2019-05-24T11:40:44+02:00
    date:modify: 2019-05-24T11:40:44+02:00
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 6
    png:IHDR.color_type: 6 (RGBA)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 117, 117
    png:pHYs: x_res=2835, y_res=2835, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    signature: 0d8b7d63f3ecde905ba6562739368498e6078a10ad2e197e6b53e693fb871a71
  Artifacts:
    filename: ./Processing-Output_0001.png
    verbose: true
  Tainted: False
  Filesize: 757B
  Number pixels: 13.7K
  User time: 0.000u
  Elapsed time: 0:01.000

It seems that when this is the case the file is stored with premultiplied alpha.

Checking doesn't seem to be related to the node group. But in the script the socket type is configured to be a value. And it seems that somewhere in the file output node a single value buffer is stored as (a, a, a, a) ``` Image: ./Processing-Output_0001.png Format: PNG (Portable Network Graphics) Mime type: image/png Class: DirectClass Geometry: 117x117+0+0 Resolution: 28.35x28.35 Print size: 4.12698x4.12698 Units: PixelsPerCentimeter Type: GrayscaleAlpha Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: gray: 8-bit alpha: 8-bit Channel statistics: Pixels: 13689 Gray: min: 0 (0) max: 23 (0.0901961) mean: 0.970049 (0.00380411) standard deviation: 3.75195 (0.0147135) kurtosis: 14.5765 skewness: 3.93552 entropy: 0.138801 Alpha: min: 0 (0) max: 23 (0.0901961) mean: 0.970049 (0.00380411) standard deviation: 3.75195 (0.0147135) kurtosis: 14.5765 skewness: -3.93552 entropy: 0.138801 Alpha: graya(0,0) #00000000 Colors: 24 Histogram: 12716: ( 0, 0, 0, 0) #00000000 graya(0,0) 19: ( 1, 1, 1, 1) #01010101 graya(1,0.00392157) 20: ( 2, 2, 2, 2) #02020202 graya(2,0.00784314) 7: ( 3, 3, 3, 3) #03030303 graya(3,0.0117647) 12: ( 4, 4, 4, 4) #04040404 graya(4,0.0156863) 6: ( 5, 5, 5, 5) #05050505 graya(5,0.0196078) 16: ( 6, 6, 6, 6) #06060606 graya(6,0.0235294) 12: ( 7, 7, 7, 7) #07070707 graya(7,0.027451) 5: ( 8, 8, 8, 8) #08080808 graya(8,0.0313725) 10: ( 9, 9, 9, 9) #09090909 graya(9,0.0352941) 258: ( 10, 10, 10, 10) #0A0A0A0A graya(10,0.0392157) 29: ( 11, 11, 11, 11) #0B0B0B0B graya(11,0.0431373) 11: ( 12, 12, 12, 12) #0C0C0C0C graya(12,0.0470588) 14: ( 13, 13, 13, 13) #0D0D0D0D graya(13,0.0509804) 58: ( 14, 14, 14, 14) #0E0E0E0E graya(14,0.054902) 103: ( 15, 15, 15, 15) #0F0F0F0F graya(15,0.0588235) 84: ( 16, 16, 16, 16) #10101010 graya(16,0.0627451) 76: ( 17, 17, 17, 17) #11111111 graya(17,0.0666667) 63: ( 18, 18, 18, 18) #12121212 graya(18,0.0705882) 48: ( 19, 19, 19, 19) #13131313 graya(19,0.0745098) 45: ( 20, 20, 20, 20) #14141414 graya(20,0.0784314) 41: ( 21, 21, 21, 21) #15151515 graya(21,0.0823529) 30: ( 22, 22, 22, 22) #16161616 graya(22,0.0862745) 6: ( 23, 23, 23, 23) #17171717 graya(23,0.0901961) Rendering intent: Perceptual Gamma: 0.454545 Chromaticity: red primary: (0.64,0.33) green primary: (0.3,0.6) blue primary: (0.15,0.06) white point: (0.3127,0.329) Background color: graya(255,1) Border color: graya(223,1) Matte color: graya(189,1) Transparent color: graya(0,0) Interlace: None Intensity: Undefined Compose: Over Page geometry: 117x117+0+0 Dispose: Undefined Iterations: 0 Compression: Zip Orientation: Undefined Properties: date:create: 2019-05-24T11:40:44+02:00 date:modify: 2019-05-24T11:40:44+02:00 png:IHDR.bit-depth-orig: 8 png:IHDR.bit_depth: 8 png:IHDR.color-type-orig: 6 png:IHDR.color_type: 6 (RGBA) png:IHDR.interlace_method: 0 (Not interlaced) png:IHDR.width,height: 117, 117 png:pHYs: x_res=2835, y_res=2835, units=1 png:sRGB: intent=0 (Perceptual Intent) signature: 0d8b7d63f3ecde905ba6562739368498e6078a10ad2e197e6b53e693fb871a71 Artifacts: filename: ./Processing-Output_0001.png verbose: true Tainted: False Filesize: 757B Number pixels: 13.7K User time: 0.000u Elapsed time: 0:01.000 ``` It seems that when this is the case the file is stored with premultiplied alpha.
Member

With this node graph:

image.png

Execution graph before saving

image.png

Execution graph after reload

image.png

Which one would be the expected one. seems not to be Deterministic.
I would say that the conversion to BW is what is expected.

With this node graph: ![image.png](https://archive.blender.org/developer/F7065208/image.png) Execution graph before saving ![image.png](https://archive.blender.org/developer/F7065192/image.png) Execution graph after reload ![image.png](https://archive.blender.org/developer/F7065194/image.png) Which one would be the expected one. seems not to be Deterministic. I would say that the conversion to BW is what is expected.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#63050
No description provided.