Alpha from texture blended over material with multiply/screen/... is ignored. #33639

Closed
opened 2012-12-20 21:13:44 +01:00 by Tobias Oelgarte · 6 comments

%%%I appended an example file in which the background of the plane should show the green diffuse-color of the material. But it gets multiplied with black where the image is transparent. The alpha works in many other blend modes as a factor multiplied with the influence factor in the texture settings, except for multiply, screen and some others. In this modes it is treated as black where it is transparent and fully opaque. The modes mix, add, subtract use the alpha as just an influence factor, others don't.

Is there any reason why it is that way? I can't imagine a good reason.%%%

%%%I appended an example file in which the background of the plane should show the green diffuse-color of the material. But it gets multiplied with black where the image is transparent. The alpha works in many other blend modes as a factor multiplied with the influence factor in the texture settings, except for multiply, screen and some others. In this modes it is treated as black where it is transparent and fully opaque. The modes mix, add, subtract use the alpha as just an influence factor, others don't. Is there any reason why it is that way? I can't imagine a good reason.%%%

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Man, that's crap!

I traced this blend mode code back to 2004, and it has a typo for Multiply, Screen and Overlay modes...
Fixing that makes it work as you would expect, but it will change past renders in ways... at least for alpha images. However, it will show correct results!

I'll fix this in svn, and keep an eye open at the consequences for other renders. If you can check that is welcome too. Thanks!%%%

%%%Man, that's crap! I traced this blend mode code back to 2004, and it has a typo for Multiply, Screen and Overlay modes... Fixing that makes it work as you would expect, but it will change past renders in ways... at least for alpha images. However, it will show correct results! I'll fix this in svn, and keep an eye open at the consequences for other renders. If you can check that is welcome too. Thanks!%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

%%%Thank you for the fix. But "Darken" and "Lighten" only work while rendering. Inside the 3D view the alpha is still ignored.%%%

%%%Thank you for the fix. But "Darken" and "Lighten" only work while rendering. Inside the 3D view the alpha is still ignored.%%%

%%%"Divide" gives also different results. But i guess it is a question of definition what it should do in some cases (division by zero).%%%

%%%"Divide" gives also different results. But i guess it is a question of definition what it should do in some cases (division by zero).%%%
Member

%%%Darken was wrong (fixed), Lighten was OK in your file (and the code same too)...

Divide glsl shader is exactly same as the render module - that this fails for (near) black I cannot fix... all new code for me :)
Will ask brecht about it.

Thanks!%%%

%%%Darken was wrong (fixed), Lighten was OK in your file (and the code same too)... Divide glsl shader is exactly same as the render module - that this fails for (near) black I cannot fix... all new code for me :) Will ask brecht about it. Thanks!%%%
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
2 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#33639
No description provided.