File Output node output is different from what is seen in the viewer node #37562

Closed
opened 2013-11-21 04:30:40 +01:00 by gandalf3 · 15 comments
Member

System Information
Archlinux
Nvidia 7900GT

Blender Version
Broken: Blender 2.69 Release (from archlinux repos)

Short description of error

File written by the file output node is different from what is seen in the viewer node:

  • The viewer node sees the correct output, the output from the Renderlayer node.
  • The written file appears to be black.

Exact steps for others to reproduce the error
Based on file_output_auto_stack.blend

  1. Render frame one
  2. The viewer node displays the output of the mix node, which should be the same as the renderlayer node output. This works correctly.
  3. The File Output node outputs a black image to /tmp/image_stacking_test/asdf/render0001.png
**System Information** Archlinux Nvidia 7900GT **Blender Version** Broken: Blender 2.69 Release (from archlinux repos) **Short description of error** File written by the file output node is different from what is seen in the viewer node: - The viewer node sees the correct output, the output from the **Renderlayer** node. - The written file appears to be black. **Exact steps for others to reproduce the error** Based on [file_output_auto_stack.blend](https://archive.blender.org/developer/F29783/file_output_auto_stack.blend) 1. Render frame one 2. The viewer node displays the output of the mix node, which should be the same as the renderlayer node output. This works correctly. 3. The File Output node outputs a black image to /tmp/image_stacking_test/asdf/render0001.png
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @gandalf3

Added subscriber: @gandalf3

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Please double check with our official Blender version from blender.org. We had it in the past, that third party builds behaved wrong or had issues.

Please double check with our official Blender version from blender.org. We had it in the past, that third party builds behaved wrong or had issues.
Author
Member

It does happen in the official blender.org build, r60991

It does happen in the official blender.org build, r60991
Member

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne
Member

Well, first of all the image file referenced here doesn't exist on my system obviously, so i can only guess if something is wrong with it.

When the input image file is not available, what happens is that the mix node will still try to use the resolution of the first input as the resolution of the output, which doesn't work well because the non-existent file specifies a (0,0) resolution - thus the black image (there are simply no pixels that would be mixed with the second input). The mix node can not detect cleanly whether the input buffer is valid, and the image node can not guess a meaningful resolution ... It seems to work as expected if i choose a valid image file.

I would like to redesign the whole resolution handling in the compositor. Pixels are just not a very reliable and intuitive way of specifying size and transformation. When this happens we can hopefully avoid cases like this.

Well, first of all the image file referenced here doesn't exist on my system obviously, so i can only guess if something is wrong with it. When the input image file is not available, what happens is that the mix node will still try to use the resolution of the first input as the resolution of the output, which doesn't work well because the non-existent file specifies a (0,0) resolution - thus the black image (there are simply no pixels that would be mixed with the second input). The mix node can not detect cleanly whether the input buffer is valid, and the image node can not guess a meaningful resolution ... It seems to work as expected if i choose a valid image file. I would like to redesign the whole resolution handling in the compositor. Pixels are just not a very reliable and intuitive way of specifying size and transformation. When this happens we can hopefully avoid cases like this.
Author
Member

There isn't supposed to be any image file, the setup is supposed to automate render stacking.
After the first frame is rendered, it creates the file for the image sequence node to read.
See this for more detail on what the node setup is supposed to do: http://blender.stackexchange.com/q/5017/599

The first image is supposed to be a mix of nothing and the straight render with a factor of 1 so only the straight render is used.

The strange thing is, it appears correctly in the viewer node.

There isn't supposed to be any image file, the setup is supposed to automate render stacking. After the first frame is rendered, it creates the file for the image sequence node to read. See this for more detail on what the node setup is supposed to do: http://blender.stackexchange.com/q/5017/599 The first image is supposed to be a mix of nothing and the straight render with a factor of 1 so only the straight render is used. The strange thing is, it appears correctly in the viewer node.
Member

Added subscriber: @ZhangYu

Added subscriber: @ZhangYu
Member

IMHO, it seems not strictly a bug. That's because the offset value you set is -1, and the relevant frame# to that is 0000, which doesn't exist in the sequence folder, I'm afraid, which causes the Mix node cannot receive a valid data for the first image input. So, The image1 input got no alpha, which considered as an zero-Alpha image, which cannot mixed by the Mix node, since it doesn't currently support Alpha mix with Image1 input, which may be improved some?

I think a solution to your case is to render an image0000.png in step 4, which will solve the black issue, and no need to render from Frame 2, too.

Btw, I indeed met another problem which caused blender crashing (a real bug?), repeated as below:

  1. Open gandalf3's file, link Viewer node to Image,
  2. Switch File Output format from png RGB to RGBA;
  3. Alt click on the compositor background, crash happend.

If you cannot repeated, try use a valid local image with the same name as xxxx0001.png or something.

IMHO, it seems not strictly a bug. That's because the offset value you set is -1, and the relevant frame# to that is 0000, which doesn't exist in the sequence folder, I'm afraid, which causes the Mix node cannot receive a valid data for the first image input. So, The image1 input got no alpha, which considered as an zero-Alpha image, which cannot mixed by the Mix node, since it doesn't currently support Alpha mix with Image1 input, which may be improved some? I think a solution to your case is to render an image0000.png in step 4, which will solve the black issue, and no need to render from Frame 2, too. **Btw, I indeed met another problem which caused blender crashing (a real bug?), repeated as below:** 1. Open gandalf3's file, link Viewer node to Image, 2. Switch File Output format from png RGB to RGBA; 3. Alt click on the compositor background, crash happend. If you cannot repeated, try use a valid local image with the same name as xxxx0001.png or something.
Author
Member

The mix node should not need to receive any image in the second image input, because on frame one the mix factor will be 1, meaning that the mixed result will be a mix of 100% bottom input. The top (missing) input is not needed, so it shouldn't have any affect on the output.

I'm not sure I understand what you mean by the alpha of the bottom input being zero, but it works fine in the viewer node:
http://www.pasteall.org/pic/62922

EDIT: The reason it works fine in the viewer node is because the viewer does not display the image with the alpha channel by default. Enabling Use Alpha causes the background image to disappear.

The mix node should not need to receive any image in the second image input, because on frame one the mix factor will be 1, meaning that the mixed result will be a mix of 100% bottom input. The top (missing) input is not needed, so it shouldn't have any affect on the output. I'm not sure I understand what you mean by the alpha of the bottom input being zero, but it works fine in the viewer node: http://www.pasteall.org/pic/62922 EDIT: The reason it works fine in the viewer node is because the viewer does not display the image with the alpha channel by default. Enabling **Use Alpha** causes the background image to disappear.
Member

The mix factor cannot be taken into account here because this is generally a variable per-pixel value, so it has to be evaluated for each pixel combination of the input images. The problem arises before this can actually be done, in the image node rather than the mix node. Compositor currently relies too much on resolution and has no way of detecting invalid inputs.

The mix factor cannot be taken into account here because this is generally a variable per-pixel value, so it has to be evaluated for each pixel combination of the input images. The problem arises before this can actually be done, in the image node rather than the mix node. Compositor currently relies too much on resolution and has no way of detecting invalid inputs.
Lukas Tönne self-assigned this 2013-11-22 09:39:37 +01:00
Member

@gandalf3, When I say "thefirst image (or image 1) in Mix node", I do mean the top image socket, which is the base image, not the bottom one. Sorry for confusing.

@gandalf3, When I say "the**first image** (or image 1) in Mix node", I do mean the **top** image socket, which is the base image, not the bottom one. Sorry for confusing.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Since this is a know design limitation without a quick solution, i will put this on TODO for now. The resolution system in the compositor needs a complete refactoring anyway.

Since this is a know design limitation without a quick solution, i will put this on TODO for now. The resolution system in the compositor needs a complete refactoring anyway.
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
4 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#37562
No description provided.