png color and alpha with unexpected behaviour in cycles #41920

Closed
opened 2014-09-23 14:37:51 +02:00 by Thibaut Bequet · 7 comments

System Information
win8.1 pro 64bit, nvidia gt650M 2gb

Blender Version
Broken: 2.71.6 d919218
Worked: na

Short description of error
The cycles image texture node gives unexpected results with png alpha channels (alpha set to zero but color channel is non-zero) in rendered 3D view.

Exact steps for others to reproduce the error
Say you have a png image with alpha set to 0 at some places, but where color is non-zero.
Plug the Color output of image texture to emission node.
Checking/unchecking the "Use Alpha" property in the image texture properties panel should update the 3D rendered view and show or not show color when alpha is zero.
Packed images are updated in 3D view as expected, but non-packed images aren't.

On the uploaded file:
png file is shown with alpha and color channels on the lower half.
(png image is packed)

  • set 3D view to rendered mode
  • uncheck/check "Use Alpha" in Image Texture properties
  • 3D rendered view is updated as expected (F12 render is updated expectedly as well)
  • unpack the image texture
    (png image is not packed)
  • check/uncheck "Use Alpha" in Image Texture properties
  • 3D rendered view is not updated as expected (although F12 render is updated expectedly)
    png_alpha.blend
**System Information** win8.1 pro 64bit, nvidia gt650M 2gb **Blender Version** Broken: 2.71.6 d919218 Worked: na **Short description of error** The cycles image texture node gives unexpected results with png alpha channels (alpha set to zero but color channel is non-zero) in rendered 3D view. **Exact steps for others to reproduce the error** Say you have a png image with alpha set to 0 at some places, but where color is non-zero. Plug the Color output of image texture to emission node. Checking/unchecking the "Use Alpha" property in the image texture properties panel should update the 3D rendered view and show or not show color when alpha is zero. Packed images are updated in 3D view as expected, but non-packed images aren't. On the uploaded file: png file is shown with alpha and color channels on the lower half. (png image is packed) - set 3D view to rendered mode - uncheck/check "Use Alpha" in Image Texture properties - 3D rendered view is updated as expected (F12 render is updated expectedly as well) - unpack the image texture (png image is not packed) - check/uncheck "Use Alpha" in Image Texture properties - 3D rendered view is not updated as expected (although F12 render is updated expectedly) [png_alpha.blend](https://archive.blender.org/developer/F111847/png_alpha.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @ThibautBequet

Added subscriber: @ThibautBequet
Sergey Sharybin was assigned by Bastien Montagne 2014-09-23 14:52:47 +02:00
Author

I think the following problem is related so I won't add it as another bug.

With the same uploaded file:
part 1:

  • duplicate the Image Texture node
  • link the new Image Texture node vector input to the UV output of the existing Texture Coordinate node
  • add a MixRGB node between the two Image Texture nodes and the Emission node
  • connect the two Image Texture node color outputs to the two color inputs of the MixRGB node
  • connect the color output of the MixRGB node to the color input of the Emission node
  • leave the rest of the MixRGB node to default (Mix, no clamp, Fac=0.5)
    part 2:
  • load file and follow part 1 steps
  • leave the image texture packed
  • on one of the Image Texture nodes, set the image texture to single user and uncheck "Use Alpha" in the properties
  • 3D view AND F12 render is updated accordingly (50%color+50%black where the alpha is zero)
    part 3:
  • load file and follow part 1 steps
  • unpack the image texture
  • on one of the Image Texture nodes, set the image texture to single user and uncheck "Use Alpha" in the properties
  • 3D view AND F12 render are NOT updated accordingly (100%color+0%black or 0%color+100%black where the alpha is zero, depending on the order of color inputs in the MixRGB node)
I think the following problem is related so I won't add it as another bug. With the same uploaded file: **part 1:** - duplicate the Image Texture node - link the new Image Texture node vector input to the UV output of the existing Texture Coordinate node - add a MixRGB node between the two Image Texture nodes and the Emission node - connect the two Image Texture node color outputs to the two color inputs of the MixRGB node - connect the color output of the MixRGB node to the color input of the Emission node - leave the rest of the MixRGB node to default (Mix, no clamp, Fac=0.5) **part 2:** - load file and follow **part 1** steps - leave the image texture packed - on one of the Image Texture nodes, set the image texture to single user and uncheck "Use Alpha" in the properties - 3D view AND F12 render is updated accordingly (50%color+50%black where the alpha is zero) **part 3:** - load file and follow **part 1** steps - unpack the image texture - on one of the Image Texture nodes, set the image texture to single user and uncheck "Use Alpha" in the properties - 3D view AND F12 render are NOT updated accordingly (100%color+0%black or 0%color+100%black where the alpha is zero, depending on the order of color inputs in the MixRGB node)

This issue was referenced by 502f6d538d

This issue was referenced by 502f6d538dc2c3f54d56bf4af5e27be92d21e2d6

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 502f6d538d.

Closed by commit 502f6d538d.

This issue was referenced by 7fe3161611

This issue was referenced by 7fe316161170d874608d59e64ba5953176aef736
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#41920
No description provided.