Volume density not working correctly #118852

Open
opened 2024-02-28 14:12:14 +01:00 by Arjjacks · 7 comments

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.61

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: 2.93 seems to work better...

Short description of error
Shader volumetrics disappear when used in conjunction with mixed surface shading that uses the Is Reflection Ray output from the Light Path Node as the mix factor, and is mixing between a non-emissive and emissive surface shader. But only on larger sized objects (problem appears to start at a diameter of 250 meters or more on a cylinder, for instance) and only when the output of a procedural texture is plugged into at least one socket of a volume shader with scattering (absorption alone appears to work correctly, but combined with scattering breaks it). Results vary somewhat, procedural texture to texture (particularly normalized vs non-normalized), but always the density input of the volume shader ceases to have any effect at all above that of zero. Is a Cycles only issue, Eevee works as expected.

Exact steps for others to reproduce the error
Open attached file, see that setting density does not affect output very much.

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.61 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: 2.93 seems to work better... **Short description of error** Shader volumetrics disappear when used in conjunction with mixed surface shading that uses the Is Reflection Ray output from the Light Path Node as the mix factor, and is mixing between a non-emissive and emissive surface shader. But only on larger sized objects (problem appears to start at a diameter of 250 meters or more on a cylinder, for instance) and only when the output of a procedural texture is plugged into at least one socket of a volume shader with scattering (absorption alone appears to work correctly, but combined with scattering breaks it). Results vary somewhat, procedural texture to texture (particularly normalized vs non-normalized), but always the density input of the volume shader ceases to have any effect at all above that of zero. Is a Cycles only issue, Eevee works as expected. **Exact steps for others to reproduce the error** Open attached file, see that setting density does not affect output very much.
Arjjacks added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-02-28 14:12:15 +01:00
Iliya Katushenock changed title from Disappearing Volumetrics in Shading to Regression: Disappearing Volumetrics in Shading 2024-02-28 14:13:01 +01:00

In 3.6 principled shader has 0 transmission, but in 4.2 it is fully transmissive. Is this file created in version 3.6? If so then I think, that there are 2 issues:

  • Shader settings are not converted correctly
  • If transmissive shader is used only with reflection rays, and strongly emmisive shader otherwise for surface, the volume should not be visible anyway.

@Arjjacks Is this summary correct or is there any misunderstanding on my part?

In 3.6 principled shader has 0 transmission, but in 4.2 it is fully transmissive. Is this file created in version 3.6? If so then I think, that there are 2 issues: - Shader settings are not converted correctly - If transmissive shader is used only with reflection rays, and strongly emmisive shader otherwise for surface, the volume should not be visible anyway. @Arjjacks Is this summary correct or is there any misunderstanding on my part?
Richard Antalik added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-02-28 19:02:51 +01:00
Author

@iss

No, this file was made in 4.0 but I didn't test this file specifically in 3.6. I have no idea why the transmission your end is suddenly ever 0. It shouldn't be. Transmission should always be 1, in any and every version of Blender. The volume should always be visible and the emissive rays should only be visible when reflecting off other, separate objects. That's how it's supposed to work.

Thing is, I discovered this issue when I opened in 4.0 a rather complex water material I'd made in earlier versions of Blender, and found that the volumetrics were disappearing. But they don't disappear in 3.6 with the water material, but I'm now discovering that this simple setup is disappearing them in 3.6 as well, which I didn't anticipate at all, thinking I'd finally managed to pinpoint what was going wrong.

But apparently there's something else happening in my water material that prevents the volumetrics from vanishing in 3.6 (and earlier), but not in 4.0 and up, I just have no idea what it could be now. I didn't upload the water material blend file for the bug report because it is insanely complex and would be absurd to expect anyone else to try to wade through the chaos, so I tried replicating the problem with a simpler setup instead.

Regardless, though, this still shouldn't be happening at all in any version of Blender, right? It makes no sense that procedurally affected volumetrics vanish and the density slider stops working just because of object size and reflection ray factor mixing between non-emissive and emissive surface shaders? The emission is not visible unless reflected off of other objects, so you should still see the volumetrics inside the transmissive surface, which you do if you unplug all inputs from any other texture nodes going into the (scattering) volume shader.

@iss No, this file was made in 4.0 but I didn't test this file specifically in 3.6. I have no idea why the transmission your end is suddenly ever 0. It shouldn't be. Transmission should always be 1, in any and every version of Blender. The volume should always be visible and the emissive rays should only be visible when reflecting off other, separate objects. That's how it's supposed to work. Thing is, I discovered this issue when I opened in 4.0 a rather complex water material I'd made in earlier versions of Blender, and found that the volumetrics were disappearing. But they don't disappear in 3.6 with the water material, but I'm now discovering that this simple setup _is_ disappearing them in 3.6 as well, which I didn't anticipate at all, thinking I'd finally managed to pinpoint what was going wrong. But apparently there's something else happening in my water material that prevents the volumetrics from vanishing in 3.6 (and earlier), but not in 4.0 and up, I just have no idea what it could be now. I didn't upload the water material blend file for the bug report because it is insanely complex and would be absurd to expect anyone else to try to wade through the chaos, so I tried replicating the problem with a simpler setup instead. Regardless, though, this still shouldn't be happening at all in any version of Blender, right? It makes no sense that procedurally affected volumetrics vanish and the density slider stops working just because of object size and reflection ray factor mixing between non-emissive and emissive surface shaders? The emission is not visible unless reflected off of other objects, so you should still see the volumetrics inside the transmissive surface, which you do if you unplug all inputs from any other texture nodes going into the (scattering) volume shader.
Author

@iss

Update: this does indeed happen with my water material as well in 3.6, if I crank the density to anything higher than 2. That's also a factor, apparently. In 4.0, the problem starts occurring from a density of 0.2 and higher.

@iss Update: this does indeed happen with my water material as well in 3.6, _if_ I crank the density to anything higher than 2. That's also a factor, apparently. In 4.0, the problem starts occurring from a density of 0.2 and higher.

@Arjjacks When I open this file in Blender 3.6, this is what I see:

Screenshot_2024-02-29_19-45-46.png

I assume, that this is not correct?

@Arjjacks When I open this file in Blender 3.6, this is what I see: ![Screenshot_2024-02-29_19-45-46.png](/attachments/0792f249-b622-4e02-8d6b-aac524b8da77) I assume, that this is not correct?
Author

@iss

No, not at all. I don't know why your transmission is zero. When I download and open the file in 3.6, I see this:

image

Which is the main problem I'm having.

@iss No, not at all. I don't know why your transmission is zero. When I download and open the file in 3.6, I see this: ![image](/attachments/877f9227-f5a3-46d5-816b-175af13e9afe) Which is the main problem I'm having.
1.3 MiB

Thanks for screenshot. Ok So lets say, that baseline is with transmission set to 1. Then in 4.0/4.2 I see pretty much same image apart from bit different colors:

118852.png
I am mostly trying to see the regression from 3.6 to 4.0 clearly, but I guess it does not apply to this particular file?

I can confirm, that when density is set to 0.2, the volume is much more visible. I guess that would be the effect you want to see - would make sense when object is this big. If I add new cylinder with 1m radius, it still has this issue when density is set to 1000, but the whole range acts more normally.

So I can confirm density being buggy, more so with large objects.

Thanks for screenshot. Ok So lets say, that baseline is with transmission set to 1. Then in 4.0/4.2 I see pretty much same image apart from bit different colors: ![118852.png](/attachments/fdc474cc-6a15-4d50-b1a5-28f928f5a5b0) I am mostly trying to see the regression from 3.6 to 4.0 clearly, but I guess it does not apply to this particular file? I can confirm, that when density is set to 0.2, the volume is much more visible. I guess that would be the effect you want to see - would make sense when object is this big. If I add new cylinder with 1m radius, it still has this issue when density is set to 1000, but the whole range acts more normally. So I can confirm density being buggy, more so with large objects.
1.1 MiB
Richard Antalik changed title from Regression: Disappearing Volumetrics in Shading to Volume density not working correctly when surface is transmissive 2024-03-01 19:55:46 +01:00
Richard Antalik added
Module
Render & Cycles
Status
Confirmed
and removed
Status
Needs Information from User
labels 2024-03-01 19:56:07 +01:00
Richard Antalik changed title from Volume density not working correctly when surface is transmissive to Volume density not working correctly 2024-03-01 19:58:11 +01:00
Author

@iss

No worries; yeah, I was mistaken about the regression being between 3.6 and 4.0, the density amount that triggers the problem is somewhat different, between the two versions, but the problem does actually occur in both after all. The key aspect of all this, though, is that all the different elements have to come to together for the problem to occur, not just density, otherwise everything works fine.

If you unplug the noise from the volume shader, it works. If you mix two non-emissive surface shaders together, it works. If you mix with certain other light path outputs, it works, though it varies amongst all of those, admittedly. Shadow and diffuse rays show the same problem, but camera, glossy, singular, and transmission rays all work correctly (when used as the mix factor).

@iss No worries; yeah, I was mistaken about the regression being between 3.6 and 4.0, the density amount that triggers the problem is somewhat different, between the two versions, but the problem does actually occur in both after all. The key aspect of all this, though, is that all the different elements have to come to together for the problem to occur, not just density, otherwise everything works fine. If you unplug the noise from the volume shader, it works. If you mix two non-emissive surface shaders together, it works. If you mix with certain other light path outputs, it works, though it varies amongst all of those, admittedly. Shadow and diffuse rays show the same problem, but camera, glossy, singular, and transmission rays all work correctly (when used as the mix factor).
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
2 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#118852
No description provided.