BI: Transparent shadows fail under certain circumstances #39981
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#39981
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Win7/64, AMD HD 6850
Blender Version
at least since 2.63a, including latest build
Short description of error
Under certain circumstances, transparent shadows are black even though "Receive transparent" is enabled.
Exact steps for others to reproduce the error
Open the attached file. Description:
Render the scene. The problem is: The shadow on the floor is completely black even though the glass above has alpha=0.2 and the floor has "receive transparent" enabled.
After a long journey, I found out that, if the floor uses a node material AND the glass uses a node material, not the alpha value of material "glass" that is used in the node setup of "glass node" is used for shadow transparency. Instead, the alpha value of the node material "Glass node" itself is used. However, the latter is not visible in the UI if the material is a node material. Therefore, you have to
Enable "use nodes".
Render again and the problem is "solved", i.e. the shadow is not completely black anymore. This can only be considered a workaround because one manually has to keep the alpha values of "Glass" and "Glass node" (which is only visible when temporarily disabling "use nodes") in sync.
In addition: This all is only true if the floor uses a node material, too. So, starting with my orignal test file again, select the floor and assign material "Floor", which is not a node material. Render again. Now, transparent shadows work even though the glass uses a node material and it's hidden alpha value is 1.
Maybe complicated to explain, but I don't think that this is a very rare setup.
Thanks!
TransparentShadows.blend
Changed status to: 'Open'
Added subscriber: @willi-2
Added subscriber: @mont29
Addition: Same problem with Transparency -> Filter property.
I always have to disable nodes, change the property value, enable nodes.
Probably applies to other properties as well.
Added subscribers: @brecht, @Sergey
@brecht, would you mind having a look into this report? Thanks! :)
Added subscriber: @IRIEShinsuke
This is caused by "if(shi->nodes==0 &&" in rayshade.c L.544, which has been added in order to prevent infinite recursion.
Removing it resolves the issue though I'm not sure if it's still needed.
The check was added to fix #18801 (Rendering Down with RC3.).
Removing
shi->nodes == 0 &&
in the current code still makes the file TestGTR.zip from that bug report crash, so a better solution is needed.The original fix was not really addressing the issue as hinted in the bug report.
33304d022d
Perhaps a solution is to have some way to indicate when the material is being evaluated for shadow transparency, and in that case to skip tracing reflection or refraction rays.
Shadow transparency for Blender Internal node materials is fundamentally broken though. That's really a different quantity than the "combined" RGBA result that you can output now in a node setup. The amount of light that shines on a surface should never influence the shadow transparency color of a surface, but it does now. So the code can be tweaked a bit to avoid the recursion problem but there is no correct solution besides a bigger redesign.
Er, maybe @brecht misunderstands the current behavior of the transparent shadow... The shadow color always becomes black (not the "combined" color!) because the shader output node doesn't set shr->diff. (I've already noticed this strange behavior several months ago and plan to fix it.)
I think, to obtain correctly colored transparent shadows, the material node and the output node need additional sockets like "Shadeless Color" output and "Transmission Color" input, respectively.
@IRIEShinsuke, perhaps you're talking about the different issue. In this particular report issue is caused by the
shade_ray()
forced to sueshade_color()
instead of material node evaluation for the transparent shadow ray. This makes it use alpha setting from the material itself, not the nodes. Workaround would be to disable nodes, set material Alpha to 0.2 and enable nodes again.@brecht, it might work, yes bit it's a bit of a work. Meanwhile i can think of such modification of the original workaround http://www.pasteall.org/54087/diff Any thoughts?
Changed status from 'Open' to: 'Archived'
Well, not strictly speaking a bug, just raycasting is not a friend to a node trees. Will solve as a part of TODO process http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Render#Render_Engine
Thanks for the report anyway.