Page MenuHome

Images as planes missing Eevee alpha channel support
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10
Graphics card: GTX970m

Blender Version
Broken: 2.80rc2

Short description of error
When using "import Image as Plane" in EEVEE, alpha channel is black, not transparent.

Exact steps for others to reproduce the error
Switch to EEVEE, use function "import Image as Plane", choose any PNG file

Event Timeline

Brendon Murphy (meta-androcto) changed the task status from Unknown Status to Resolved.Jul 22 2019, 4:17 PM

hi, to enable transparency in eevee engine you need to go to Properties > Materials > Settings > and change the blend mode to Alpha Blend. This works with a valid Alpha .png

Brendon Murphy (meta-androcto) changed the task status from Resolved to Unknown Status.Jul 22 2019, 4:29 PM
Brendon Murphy (meta-androcto) lowered the priority of this task from 90 to Normal.

Re-opening, whilst not technically a bug, the addon should have checks for eevee/cycles and activate the alpha blend mode if eevee is the render engine. As it does not work as expected atm, this could be considered a bug.

Brendon Murphy (meta-androcto) renamed this task from EEVEE - alpha channel support to Images as planes missing Eevee alpha channel support .Jul 22 2019, 4:36 PM

I don’t think the add-on should check for the render engine. If the user imports an image while the current render engine is Cycles, and then switch to Eevee, they’d expect the image to behave the same. Besides, the material setting is ignored by other render engines, so it should be okay to set it anyway.

diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index ca55ef70..17a2eb79 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -1004,6 +1004,8 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
             material = bpy.data.materials.new(name=name_compat)
 
         material.use_nodes = True
+        if self.use_transparency:
+            material.blend_method = 'BLEND'
         node_tree = material.node_tree
         out_node = clean_node_tree(node_tree)
Damien Picard (pioverfour) changed the task status from Unknown Status to Resolved.Sep 11 2019, 9:54 PM

Committed in rBA0f5738d9022c.