Page MenuHome

OptiX render engine on an RTX 3060TI producing erroneous shadows in full transparency.
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: rB0f45cab862b8
Worked: (newest version of Blender that worked as expected)

Short description of error
When rendering using OptiX on a RTX3060TI graphics card, placing 64 or more fully transparent (Alpha = 0) layers results in a shadow. This is irrespective of the transparent bounces setting in the render menu. When the renderer is set to OptiX CPU or to CUDA, this issue does not occur.

It is also noted that, under the visibility setting in the object menu, setting and unsetting the 'shadow' ray visibility option does not reliably enable or disable this option. Sometimes, when unsetting the shadow ray visibility option, the shadow is still rendered.

I have searched the forums and the bug tracker for this issue but have been unable to find it being reported. Since the issue occurs when 64 or more transparent layers are used, I strongly suspect a bug, or perhaps intentional limitation, in the OptiX renderer or driver. Or perhaps this is a little known limitation in the RTX ray tracing cores?

Exact steps for others to reproduce the error
Create 64 planes with full transparent material (either Principled BSDF Alpha=0 or Transparent BSDF) and place any light source directly above it. Ensure Alpha Blend and Shadow modes are set accordingly (Hashed or Blend). Ensure that transparency bounces are set to more than 64. Render using OptiX in GPU mode on an RTX 3060TI (Uncertain whether this issue is hardware related.). Do the same experiment with only 63 layers, and the shadow disappears. See the attached .blend file.

Event Timeline

Alaska (Alaska) changed the task status from Needs Triage to Confirmed.Jan 22 2021, 8:58 AM
Alaska (Alaska) changed the subtype of this task from "Report" to "Bug".
Alaska (Alaska) added a subscriber: Alaska (Alaska).

I am able to reproduce the bug. System specifications below.

Operating system: Linux-5.10.0-1-amd64-x86_64-with-debian-bullseye 64 Bits
Graphics card: RTX 3070 460.32.03

Blender Version
2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: rB0f45cab862b8
2.93.0 Alpha, branch: master, commit date: 2021-01-22 06:12, hash: rB2469ddc1a943

This is expected behavior: There is a limit of 64 transparent hits supported for a single ray until it hits a light source (see SHADOW_STACK_MAX_HITS in Cycles source code) on the GPU. On the CPU it can dynamically allocate more memory to extend that range, and with CUDA there is a slow fallback implementation using a loop. In OptiX that fallback implementation is disabled for better general performance, so you can't do more than 64. We could enable the fallback there as well, but that would come at a performance hit even if no more than 64 hits are encountered, so decided against it for now.

Hi.
If this is a limitation, then something would have to be done to make the Optix GPU + CPU Hybrid render give similar/compatible results in tiles? Limit CPU to the same GPU OptiX capabilities when OptiX hybrid render is used? I think @Brecht Van Lommel (brecht) has done something like that for volumetrics for CPU and GPU.

Hello

I had a suspicion this was the case, but then it needs to be made very clear in the documentation (I searched pretty thoroughly but found no mention of it), especially if blender is to be more widely adopted for commercial projects. Would it not be possible to add an option in a future build that would allow us to bypass this limitation? Perhaps an additional feature set option?

In any case, many thanks for clarifying this. I might look into cloning the cycles driver and experimenting with the SHADOW_STACK_MAX_HITS setting, if I can get the tool-sets set up on my system.

In any case, many thanks for clarifying this. I might look into cloning the cycles driver and experimenting with the SHADOW_STACK_MAX_HITS setting, if I can get the tool-sets set up on my system.

For reference, here's a patch to increase the SHADOW_STACK_MAX_HITS to 128.

As Patrick Mours has pointed out, this may have an impact on performance and potentially memory usage. So use at your own risk.

Hi only just seen this,

While can't currently use OptiX, wonder if it would help others adding a UI 'Transparency' setting soft limit of 64 while OptiX is enabled in prefs?