Cycles > Volume > Alpha Channel #73152

Closed
opened 2020-01-15 23:11:34 +01:00 by filip mond · 11 comments

System Information
Operating system: Darwin-19.0.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel HD Graphics 4000 OpenGL Engine Intel Inc. 4.1 INTEL-14.2.16

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-01-14 23:08, hash: 3edd8d5b07
Worked: (optional)

Short description of error
Transparency of scene is determinated by objects using non-volumetric material only.

Exact steps for others to reproduce the error

  • Keep Cube
  • Add Sphere
  • Add Sphere a Material with Emission node plunged into Volume socket
  • Film > Transparent

Example use Cube with Visibility > Holdout to rise problem more visible.
Sorry, probably a bit confusing.

Solid Mode
Screenshot 2020-01-15 at 22.22.21.png

Render Viewport Mode is OK
Screenshot 2020-01-15 at 22.20.34.png

Render (F12) results with ERROR - spheres are rendered, but object itself is ignored for alpha channel
Screenshot 2020-01-15 at 22.21.36.png

Render viewed as Color (without alpha)
Screenshot 2020-01-15 at 22.29.14.png

test_Edge.blend
Note: spheres (volumetric) are not calculated also for ID Mask or Cryptomatte as well

**System Information** Operating system: Darwin-19.0.0-x86_64-i386-64bit 64 Bits Graphics card: Intel HD Graphics 4000 OpenGL Engine Intel Inc. 4.1 INTEL-14.2.16 **Blender Version** Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-01-14 23:08, hash: `3edd8d5b07` Worked: (optional) **Short description of error** Transparency of scene is determinated by objects using non-volumetric material only. **Exact steps for others to reproduce the error** - Keep Cube - Add Sphere - Add Sphere a Material with Emission node plunged into Volume socket - Film > Transparent Example use Cube with Visibility > **Holdout** to rise problem more visible. Sorry, probably a bit confusing. Solid Mode ![Screenshot 2020-01-15 at 22.22.21.png](https://archive.blender.org/developer/F8280726/Screenshot_2020-01-15_at_22.22.21.png) Render Viewport Mode is OK ![Screenshot 2020-01-15 at 22.20.34.png](https://archive.blender.org/developer/F8280732/Screenshot_2020-01-15_at_22.20.34.png) Render (F12) results with ERROR - spheres are rendered, but object itself is ignored for alpha channel ![Screenshot 2020-01-15 at 22.21.36.png](https://archive.blender.org/developer/F8280728/Screenshot_2020-01-15_at_22.21.36.png) Render viewed as Color (without alpha) ![Screenshot 2020-01-15 at 22.29.14.png](https://archive.blender.org/developer/F8280742/Screenshot_2020-01-15_at_22.29.14.png) [test_Edge.blend](https://archive.blender.org/developer/F8280760/test_Edge.blend) Note: spheres (volumetric) are not calculated also for ID Mask or Cryptomatte as well
Author

Added subscriber: @FilipMond

Added subscriber: @FilipMond
filip mond changed title from Cycles > Volumetric > Alpha Channel to Cycles > Volume > Alpha Channel 2020-01-15 23:46:06 +01:00
Member

Added subscribers: @brecht, @lichtwerk

Added subscribers: @brecht, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Using a proper Volume Shader (Principled Volume / Volume Scatter) instead of emission directly will give proper alpha (but also adds to rendertime of course):
(Also shouldnt Emission be mixed with transparent if used at all?)
test_Edge_corrected.blend

However I think it was possible to use an Emission shader with Transparent and get alpha when saving to EXR (but honestly cannot get that to work atm)
Correction: this looks like it is expected behavior

In #65993#704571, @brecht wrote:
If you have only emission and zero density, as in this node setup, then alpha is supposed to be zero.

In any case, there was also the issue with seeing this correctly in blenders Image Editor, see e.g. #42755 (Volumes do not appear when transparent film is enabled) and the mother of the Image Editor Issue #52680 (Alpha difference Viewport/F12 )
However part II: this now also seems to work now (I can see the alpha from the volumes in the Image Editor now with my file)... bit confused, will get a coffee :)

Using a proper Volume Shader (Principled Volume / Volume Scatter) instead of emission directly will give proper alpha (but also adds to rendertime of course): (Also shouldnt Emission be mixed with transparent if used at all?) [test_Edge_corrected.blend](https://archive.blender.org/developer/F8281307/test_Edge_corrected.blend) However I think it was possible to use an Emission shader with Transparent and get alpha when saving to EXR (but honestly cannot get that to work atm) Correction: this looks like it is expected behavior > In #65993#704571, @brecht wrote: > If you have only emission and zero density, as in this node setup, then alpha is supposed to be zero. In any case, there was also the issue with seeing this correctly in blenders Image Editor, see e.g. #42755 (Volumes do not appear when transparent film is enabled) and the mother of the Image Editor Issue #52680 (Alpha difference Viewport/F12 ) However part II: this now also seems to work now (I can see the alpha from the volumes in the Image Editor now with my file)... bit confused, will get a coffee :)

Added subscriber: @troy_s

Added subscriber: @troy_s

Viewer is broken. Has been for nearly two decades.

Only associated alpha can encode the values, and the viewer pipeline breaks the association.

Just to be clear, it would be useful to add a composite against a coloured background to show that the alpha is being encoded properly.

This is a known bug though, due to broken alpha handling throughout Blender.

Due to TIFF and other proper file encodings being mishandled, the only way to encode this image is in an EXR if you seek to save this to disk.

Viewer is broken. Has been for nearly two decades. Only associated alpha can encode the values, and the viewer pipeline breaks the association. Just to be clear, it would be useful to add a composite against a coloured background to show that the alpha is being encoded properly. This is a known bug though, due to broken alpha handling throughout Blender. Due to TIFF and other proper file encodings being mishandled, the only way to encode this image is in an EXR if you seek to save this to disk.

Closed as duplicate of #52680

Closed as duplicate of #52680

There is indeed a bug in the viewer, but the alpha channel contents is as designed.

There is indeed a bug in the viewer, but the alpha channel contents is as designed.

Added subscriber: @Christian-Fritz

Added subscriber: @Christian-Fritz

Wait, so having density at 0 and emission at != 0 or only connecting emission shader to volume renders correctly from the looks of it but has alpha = 0 AND this is designed to be like that? ALPHA = DENSITY? I really do hope this is a joke...

Wait, so having density at 0 and emission at != 0 or only connecting emission shader to volume renders correctly from the looks of it but has alpha = 0 AND this is designed to be like that? ALPHA = DENSITY? I really do hope this is a joke...

Alpha is, and always has been, degree of occlusion of the resulting spatial sample. It’s a rasterized representation of geometry. Emission without occlusion is extremely common.

Alpha is, and always has been, degree of occlusion of the resulting spatial sample. It’s a rasterized representation of geometry. Emission without occlusion is extremely common.
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
5 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#73152
No description provided.