Cycles: Magic Texture
in Volumetric World Shaders render differently with the CPU and GPU #92036
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#92036
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
Operating system: Linux-5.14.0-1-amd64-x86_64-with-glibc2.32 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.63.01
Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-10-08 02:23, hash:
de07bf2b13
Worked: Unsure as prior to Cycles-X the cause was a lack of equiangular sampling support on the GPU.
Short description of error:
When rendered with a certain volumetric world shader, it can appear drastically different between the CPU and GPU which lead to issues with rendering with CPU+GPU
Exact steps for others to reproduce the error:
Download the attached file below and render it with the CPU, GPU, and test with CPU+GPU and observe the different results.
TT92036 - Volumetric rendering differences.blend
World Shader
withMagic Texture
with the output connected to aColor Ramp
, with the output of theColor Ramp
connected to the input of theColor
ofVolume Scatter
node which is connected theWorld Output
node.Color Ramp
(primarily shifting the black handle to the left) until the shader disappears when rendering in Cycles with the GPU.While setting up this material you may notice that the
Magic Texture
node produces a different result for the GPU and CPU when in theWorld Shader
. This can be tested by connecting theColor
output from theMagic Texture
directly to theColor
input of theVolume Scatter
node. This is probably what's causing the issue.Added subscriber: @Alaska
Cycles: Certain Volumetric World Shaders render differently with the CPU and GPUto Cycles: `Magic Texture` in Volumetric World Shaders render differently with the CPU and GPUChanged status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @leesonw
I fiddled a bit and found that it disappears around 0.466 and 0.467 where as on the CPU this happens almost at 1. There appears to be a few differences between the node_ramp_util.h and ramp_util.h that I am investigating.
It seems there is a NaN introduced somewhere in the calculations on the GPU :-/
Added subscriber: @CharlieJolly
It seems the magic node gives huge values for the random input vector i.e. (-9481895287870032301452285067430723584.000000 53184858981249068612401265478211731456.000000 12989808383429901368005745244375089152.000000) which don't play nice with the GPU giving NaNs as results which are causing the backness I believe. These values are coming from the ShaderData P value which is set to a very large value. If you add an object for the rays to hit then the volume shader works :-)
Everywhere the ray hits a surface it has sensible values everywhere else it is NaN. You can also assign a value to the vector input of the Magic Texture and that will work also. The question is what should the value be in this case the Magic Texture says
Vector
but what does that mean in this case?
Added subscriber: @brecht
It's just the shading point position in this case. Probably we need to do something in the volume integration code to keep the volume step size reasonable, I guess it's taking very large steps now since such world volumes have unbounded size..
Yes that would be my guess :-)
I found a nice fix for this with out having to adjust the volume step.
Added subscriber: @YAFU
Hi.
I have found that the problem is also reproducible with Wave Texture, do I need to create a different report?
TT92036 - Volumetric rendering differences_wave.blend
By the way, the whole problem does not only occur with 3.0 (just in case fixes need to be applied in LTS versions as well)
Thanks for the information. Do you know any other shaders that are affected? This may mean we need to make a change somewhere else? It should be pretty easy to patch the LTS with this.
@leesonw , With that node setup I find that it renders differently with CPU or GPU also with Checker texture:
TT92036 - Volumetric rendering differences_checker.blend
I don't think it happens with other node textures that I have tried, but I don't know much about nodes setup. It would be good if someone with more knowledge than mine does a better test.
This issue was referenced by blender/cycles@3cdf714f1a
This issue was referenced by
57f46b9d5f
Changed status from 'Confirmed' to: 'Resolved'