Volume Absorption color tint #52433
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#52433
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
elementaryOS 0.4.1, GTX 1080
Blender Version
Broken: 2.79.1, r5492d2c
Short description of error
A glass material with volume absoprtion shader plugged in creates colored caustics (with filter glossy at 1), even though the volume shader color is almost entirely white.
Exact steps for others to reproduce the error
I have a glass table with a volume absoprtion shader plugged in. The color is just slightly green. I noticed that when a lamp is shining through the glass that the caustics turn out entirely greenish. The effect is very noticable due to the filter glossy setting of 1. I found that weird, so I set the volume color back to white, and then set the red channel to 0.9999999999, so that even the node UI would show the red channel color as 1.0. So the color should be pretty much white now. Still, the caustics are the same color as before. In fact, it doesn't make a difference if the red channel is set to 0.0 or 0.9999, the caustics always have the same color.
Here's the file: volume_absorption.blend
Changed status to: 'Open'
Added subscriber: @sebastian_k
Added subscribers: @MaiLavelle, @LukasStockner, @Sergey, @brecht, @mont29
This is something for @Sergey or some other #Cycles dev (@brecht? @LukasStockner? @MaiLavelle? …)
This is caused by
kernel_volume_shadow
, which incorrectly uses the FLT_MAX ray distance from the sun sampling when applying the absorption in the glass volume - and for a distance of ~1e38, it makes sense that even the slightest absorption would cause the color to be saturated.I guess the transparent shadow calculation should clip the distance somehow, I'll look into it.
We can probably clip distance by doing something like
P524: Snippet for #52433
However, that would be tricky to get real max distance for scene with procedural world volume. Maybe that case we can simply disable from clipping for the time being.
Why is clipping by the world bounds needed? If there are no precision issues and the mesh is closed, the ray distance used for computing the transmittance should already be short.
I think the issue is that we are missing a
kernel_volume_stack_enter_exit
inshadow_blocked
for direct lighting with a transmission BSDF. We need to take into account that we are lighting from the other side of the surface and update the volume stack accordingly, same as we do for indirect light inkernel_path_surface_bounce
.Was just slapping code together, thought it was indeed clamping issue. Looking into actual cause now, and it's much deeper.
@brecht, we should indeed discard element from volume stack for
shadow_blocked
, otherwise sampling is still considered to be happening inside of the volume which is wrong. Here is an updated patchP526: Fix for #52433
The confusing part was that 2.77a was rendering this file correct, so i thought we made a mistake in volume stack somewhere. But appears it was never a case. The issue here is that after
9b6ed3a
we are not ignoring volume closures which weight is less thanCLOSURE_WEIGHT_CUTOFF
(before that refactor absorption was removed). So maybe we should do something like this:P527: Closure cutoff
For P526, I think it should only do
kernel_volume_stack_enter_exit
for transmission rays? Otherwise looks good to me.If we do P527 then we should remove the duplicate cutoff test in
bsdf_alloc
andbsdf_alloc_osl
. I don't think we should be doing this cutoff for volume closures though, unless we also take into account the distance. The cutoff is1e-5f
currently which is actually not that low if multiply it by distance of1e5f
. For BSDFs these values are already scene scale independent so it's safer to have a cutoff.Yeah, think explicit check for transmission rays would be good. Just initially thought enter_exit will not do anything if that wasn't a transmission ray because it wouldn't be reflected in the stack then. In any case, will add check and commit.
I will leave changes about closure cutoff for later, you've raised the valid point of cutoff not being small enough.maybe we can cutoff at FLT_EPS or so, but let's make it another story.
@brecht, actually, either i'm doing something wrong, or there is something else going on here. What i did is, instead of enter_exit in original patch did it like this:
and this gives artifacts in this file: volume_transparent_shadow.blend
Without check for transmission rays there are no artifacts. So still need to look into this..
I think the test should be for the direct lighting ray:
@brecht, indeed. it we need to check whether shadow ray is being transmitted or reflected back, not the previous bounce (previous bounce might have been reflection inside of the volume). Just hoped to save some multiplications.. Will run more tests now and commit.
This issue was referenced by blender/cycles@2d9e016575
This issue was referenced by
f01e43fac3
Changed status from 'Open' to: 'Resolved'