Cycles renders volumetrics very differently on CPU vs. GPU #50193

Closed
opened 2016-12-07 17:05:15 +01:00 by Kai Kostack · 26 comments

I stumbled on this very inconsistency while working on some volumetrics where a notable difference in render results for CPU vs. GPU became visible. This effect appears for both Path Tracing and Branched Path Tracing for all types of lamps, and it gets more prominent on low sample rates. This difference is too strong to be acceptable when using a render farm with a mix of systems.

Following both images have been rendered with exactly the same settings on CPU top and GPU bellow for 1 SPP (so should look the same):
1cpu.png
1gpu.png

Here with 2 SPP:
2cpu.png
2gpu.png

Here is the blend file to test:
cycles-cpu-gpu-sampling-difference.blend

Tested with latest official build bot release on Win7 64.
Hardware: i7-980X, GTX 480

I stumbled on this very inconsistency while working on some volumetrics where a notable difference in render results for CPU vs. GPU became visible. This effect appears for both Path Tracing and Branched Path Tracing for all types of lamps, and it gets more prominent on low sample rates. This difference is too strong to be acceptable when using a render farm with a mix of systems. Following both images have been rendered with exactly the same settings on CPU top and GPU bellow for 1 SPP (so should look the same): ![1cpu.png](https://archive.blender.org/developer/F415350/1cpu.png) ![1gpu.png](https://archive.blender.org/developer/F415352/1gpu.png) Here with 2 SPP: ![2cpu.png](https://archive.blender.org/developer/F415355/2cpu.png) ![2gpu.png](https://archive.blender.org/developer/F415357/2gpu.png) Here is the blend file to test: [cycles-cpu-gpu-sampling-difference.blend](https://archive.blender.org/developer/F415360/cycles-cpu-gpu-sampling-difference.blend) Tested with latest official build bot release on Win7 64. Hardware: i7-980X, GTX 480
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @KaiKostack-3

Added subscriber: @KaiKostack-3

#79759 was marked as duplicate of this issue

#79759 was marked as duplicate of this issue

#79004 was marked as duplicate of this issue

#79004 was marked as duplicate of this issue

#78432 was marked as duplicate of this issue

#78432 was marked as duplicate of this issue

#52013 was marked as duplicate of this issue

#52013 was marked as duplicate of this issue
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner
Member

Yes, I can reproduce the issue.
The difference is caused by decoupled sampling, which is currently enabled on CPUs and disabled on CUDA. So, there are two ways to fix this problem - either allow the user to disable it on the CPU, or enable in on CUDA.
I'm not sure why it's disabled on CUDA right now, though.

Yes, I can reproduce the issue. The difference is caused by decoupled sampling, which is currently enabled on CPUs and disabled on CUDA. So, there are two ways to fix this problem - either allow the user to disable it on the CPU, or enable in on CUDA. I'm not sure why it's disabled on CUDA right now, though.

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Decoupled Ray Marching for homogeneous volumes should work on GPU (when enabled via ifdefs of course), but when I tested that, it wasn't stable. For heterogenous volumes, the current code uses dynamic mem alloc, which is slow on GPU and was giving me mem errors. That was 1-2 years ago though, situation might have changed.

I can take a look and see if we can enable it.. We shouldn't add an option to disable that on CPU, that's exactly the kind of UI clutter that we should avoid.

Decoupled Ray Marching for homogeneous volumes should work on GPU (when enabled via ifdefs of course), but when I tested that, it wasn't stable. For heterogenous volumes, the current code uses dynamic mem alloc, which is slow on GPU and was giving me mem errors. That was 1-2 years ago though, situation might have changed. I can take a look and see if we can enable it.. We shouldn't add an option to disable that on CPU, that's exactly the kind of UI clutter that we should avoid.

Added subscribers: @YAFU, @Sergey, @brecht

Added subscribers: @YAFU, @Sergey, @brecht
Member

Added subscriber: @Stefan_Werner

Added subscriber: @Stefan_Werner

Hi.

Here I mention some other examples where I encounter problems with volumetrics. I am not good with nodes, so I apologize if this is due to my mistakes with configuration.
In the following example there are differences between GPU and CPU render:
reflection default.blend

In the following example I get flickering when orbit the view in rendered view, but same problem with CPU and GPU:
flickering rendered view_0.blend

With GPU, in both cases it seems to be acting as Reflection coordinate to be default when there is nothing connected to Normal in Layer Weight. That is, apparently no problem if for example I connect Generated or Object coordinate.

Hi. Here I mention some other examples where I encounter problems with volumetrics. I am not good with nodes, so I apologize if this is due to my mistakes with configuration. In the following example there are differences between GPU and CPU render: [reflection default.blend](https://archive.blender.org/developer/F674425/reflection_default.blend) In the following example I get flickering when orbit the view in rendered view, but same problem with CPU and GPU: [flickering rendered view_0.blend](https://archive.blender.org/developer/F674426/flickering_rendered_view_0.blend) With GPU, in both cases it seems to be acting as Reflection coordinate to be default when there is nothing connected to Normal in Layer Weight. That is, apparently no problem if for example I connect Generated or Object coordinate.

Layer weight makes no sense for volumes, it requires a normal which is not available there. There may be a bug there but the shader node setup is not a practical one.

Layer weight makes no sense for volumes, it requires a normal which is not available there. There may be a bug there but the shader node setup is not a practical one.

Ok, sorry, Perhaps obvious to experienced people, but Layer Weight Node documentation did not clarify anything about not usefull for Volume. Now I have just found the right way to do what I intended to do in cycles:
https://blender.stackexchange.com/questions/23054/volume-emitter-that-is-more-intense-towards-the-outside-of-the-object

Thanks for the clarification.

Ok, sorry, Perhaps obvious to experienced people, but Layer Weight Node documentation did not clarify anything about not usefull for Volume. Now I have just found the right way to do what I intended to do in cycles: https://blender.stackexchange.com/questions/23054/volume-emitter-that-is-more-intense-towards-the-outside-of-the-object Thanks for the clarification.

The answer from that link seems correct to me, using the layer weight to control the transparency of the surface, with a fixed volume in the interior.

The answer from that link seems correct to me, using the layer weight to control the transparency of the surface, with a fixed volume in the interior.

Yes, that nodes setup from the link makes a lot more sense. I just thought that to do something like that could be as easy as mixing two Emission Nodes connected to Volume, and controlling the weight with Layer Weight. I am very bad with nodes, my mistake.

Yes, that nodes setup from the link makes a lot more sense. I just thought that to do something like that could be as easy as mixing two Emission Nodes connected to Volume, and controlling the weight with Layer Weight. I am very bad with nodes, my mistake.

Added subscriber: @ortner-effects

Added subscriber: @ortner-effects
Member

Added subscriber: @Arvind_Ravichandran

Added subscriber: @Arvind_Ravichandran

Added subscribers: @xnonamex, @Josephbburg

Added subscribers: @xnonamex, @Josephbburg

Added subscribers: @Arken, @iss

Added subscribers: @Arken, @iss

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @Firepal

Added subscriber: @Firepal

Added subscriber: @MoonMoth

Added subscriber: @MoonMoth

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges self-assigned this 2021-11-18 21:38:30 +01:00

Volume sampling quality is now the same for CPU and GPU rendering with Blender 3.0.

Volume sampling quality is now the same for CPU and GPU rendering with Blender 3.0.
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
13 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#50193
No description provided.