Page MenuHome

png color and alpha with unexpected behaviour in cycles
Closed, ResolvedPublic

Description

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)

Event Timeline

Thibaut Bequet (Littleme) raised the priority of this task from to 90.
Thibaut Bequet (Littleme) updated the task description. (Show Details)
Thibaut Bequet (Littleme) edited a custom field.
Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.

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)