Banding-like effect in Cycles using OpenVDB volumes #100714

Closed
opened 2022-08-30 16:14:25 +02:00 by Ghost · 22 comments

System Information
Operating system: Linux-5.15.0-46-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.85.02

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-08-29 23:11, hash: 5ae3fa50e2
Worked: unkown

Short description of error
I have some weird looking artifacts going on when importing custom OpenVDB files.
Let's take a look at these screenshots:

  • Blender 2.93.5: blender_2.93.5.png
  • Blender 3.0.1: blender_3.0.1.png
  • Blender 3.1.2: blender_3.1.2.png
  • Blender 3.2.2: blender_3.2.2.png
  • Blender 3.3.0 (beta, b814f64f4a): blender_3.3.0.png
  • Blender 3.4.0 (alpha, 5ae3fa50e2): blender_3.4.0.png

I am not talking about this giant black thing (but I wanted to show it too because this is also weird).
The point here is about this banding effect: blender_2.93.5_cropped.png
blender_weird_issue_1.webm

Hypotheses:

  • Wrong data manipulation in the shader node tree
  • My data are "corrupted" or not well defined (missing values in the volume when I generate it), so this would be an error on my side.
  • There is a bug in Blender

Exact steps for others to reproduce the error
#100714.blend
vdb_sample.zip

  • Extract VDB files and download .blend file into folder
  • Open .blend file
**System Information** Operating system: Linux-5.15.0-46-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.85.02 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-08-29 23:11, hash: `5ae3fa50e2` Worked: unkown **Short description of error** I have some weird looking artifacts going on when importing custom OpenVDB files. Let's take a look at these screenshots: * Blender 2.93.5: ![blender_2.93.5.png](https://archive.blender.org/developer/F13435504/blender_2.93.5.png) * Blender 3.0.1: ![blender_3.0.1.png](https://archive.blender.org/developer/F13435511/blender_3.0.1.png) * Blender 3.1.2: ![blender_3.1.2.png](https://archive.blender.org/developer/F13435515/blender_3.1.2.png) * Blender 3.2.2: ![blender_3.2.2.png](https://archive.blender.org/developer/F13435518/blender_3.2.2.png) * Blender 3.3.0 (beta, b814f64f4ab2): ![blender_3.3.0.png](https://archive.blender.org/developer/F13435531/blender_3.3.0.png) * Blender 3.4.0 (alpha, 5ae3fa50e224): ![blender_3.4.0.png](https://archive.blender.org/developer/F13435538/blender_3.4.0.png) I am not talking about this giant black thing (but I wanted to show it too because this is also weird). The point here is about this banding effect: ![blender_2.93.5_cropped.png](https://archive.blender.org/developer/F13435559/blender_2.93.5_cropped.png) [blender_weird_issue_1.webm](https://archive.blender.org/developer/F13435622/blender_weird_issue_1.webm) Hypotheses: * Wrong data manipulation in the shader node tree * My data are "corrupted" or not well defined (missing values in the volume when I generate it), so this would be an error on my side. * There is a bug in Blender **Exact steps for others to reproduce the error** [#100714.blend](https://archive.blender.org/developer/F13442070/T100714.blend) [vdb_sample.zip](https://archive.blender.org/developer/F13435657/vdb_sample.zip) - Extract VDB files and download .blend file into folder - Open .blend file
Author

Added subscriber: @Felix-Olart

Added subscriber: @Felix-Olart
Author

I think I have the same sort of issue using another file.
Here is what it looks like:Screenshot from 2022-08-30 16-24-59.png
blender_weird_issue_2.webm

Exact steps for others to reproduce the error

  • Open Blender 3.4.0 alpha
  • Delete everything
  • Import OpenVDB sequence (see attached files)
  • Open shading view
  • Create a new material as shown in the video above (attribute : SEDIMENT COH1)
  • Go frame 28 for example

vdb_sample_2.zip

I think I have the same sort of issue using another file. Here is what it looks like:![Screenshot from 2022-08-30 16-24-59.png](https://archive.blender.org/developer/F13435787/Screenshot_from_2022-08-30_16-24-59.png) [blender_weird_issue_2.webm](https://archive.blender.org/developer/F13435790/blender_weird_issue_2.webm) **Exact steps for others to reproduce the error** * Open Blender 3.4.0 alpha * Delete everything * Import OpenVDB sequence (see attached files) * Open shading view * Create a new material as shown in the video above (attribute : SEDIMENT COH1) * Go frame 28 for example [vdb_sample_2.zip](https://archive.blender.org/developer/F13435805/vdb_sample_2.zip)

Added subscriber: @iss

Added subscriber: @iss

Looking at provided VDB, I see there is volume filling the space, which seems to be the black thing you saw in previous versions. Here it is rendered as blackbody

Untitled.png

I am not very knowleddgable in this area and not sure how shader is supposed to blend blackbody. I would guess it should be pure emissive color if it has no density, which it does not have, but not sure really, will have to read up on this.

Looking at provided VDB, I see there is volume filling the space, which seems to be the black thing you saw in previous versions. Here it is rendered as blackbody ![Untitled.png](https://archive.blender.org/developer/F13438177/Untitled.png) I am not very knowleddgable in this area and not sure how shader is supposed to blend blackbody. I would guess it should be pure emissive color if it has no density, which it does not have, but not sure really, will have to read up on this.
Author

First, thank you very much for your answer.
Ok, so if I understand correctly, this area corresponds to volume, but does not have enough density to be rendered? Or something like that?
I tried to replicate what you have done with the second example I provided, here is the result: Screenshot from 2022-08-31 08-54-36.png

Here is the result when I boost the density (multiplied by 1e9): Screenshot from 2022-08-31 08-53-27.png
So I am not sure to be right seeing this, I thought I would see the whole volume turn red as the density would be > 1 for each voxel.

I tried to set the clipping value of the volume down to 0 instead of 1e-4.
Here is the result: Screenshot from 2022-08-31 08-57-40.png

Thus, it seems to be solving my issue:Screencast from 31-08-2022 08:59:23.webm
I don't really understand why.

First, thank you very much for your answer. Ok, so if I understand correctly, this area corresponds to volume, but does not have enough density to be rendered? Or something like that? I tried to replicate what you have done with the second example I provided, here is the result: ![Screenshot from 2022-08-31 08-54-36.png](https://archive.blender.org/developer/F13440056/Screenshot_from_2022-08-31_08-54-36.png) Here is the result when I boost the density (multiplied by 1e9): ![Screenshot from 2022-08-31 08-53-27.png](https://archive.blender.org/developer/F13440050/Screenshot_from_2022-08-31_08-53-27.png) So I am not sure to be right seeing this, I thought I would see the whole volume turn red as the density would be > 1 for each voxel. I tried to set the clipping value of the volume down to 0 instead of 1e-4. Here is the result: ![Screenshot from 2022-08-31 08-57-40.png](https://archive.blender.org/developer/F13440062/Screenshot_from_2022-08-31_08-57-40.png) Thus, it seems to be solving my issue:[Screencast from 31-08-2022 08:59:23.webm](https://archive.blender.org/developer/F13440069/Screencast_from_31-08-2022_08_59_23.webm) I don't really understand why.
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

If I understand correctly, lowering the clipping to zero fixes the issue. Is that correct?
This seems similar to #53472. Voxels in the volume whose value is less that the clipping value are "turned off" and are not rendered resulting in those empty spaces.
So the workaround for now is to never turn off any voxels by lowering the clipping to zero.
I am not sure why that depends on the viewing angle as you have showed though. So I will tag the module for more information.

If I understand correctly, lowering the clipping to zero fixes the issue. Is that correct? This seems similar to #53472. Voxels in the volume whose value is less that the clipping value are "turned off" and are not rendered resulting in those empty spaces. So the workaround for now is to never turn off any voxels by lowering the clipping to zero. I am not sure why that depends on the viewing angle as you have showed though. So I will tag the module for more information.
Omar Emara changed title from Banding-like effect in Cycles using OpenVDB volumes to Banding-like effect in Cycles using OpenVDB volumes when clipping is not zero 2022-08-31 10:13:58 +02:00
Author

Hum. I tested it on the first sample I provided and it does not give the same result.
Screencast from 31-08-2022 10:27:20.webm
I think with this video we can clearly see the "black bars" which are not visible using the first shader and then revealed using the second shader.
Thus, we can sort of deduce how this banding-like effect is affected by the viewing angle.

So to answer your question, I am not convinced that lowering the clipping value to zero fixes the issue.
About #53472, if I understand correctly, that issue is more related to camera clipping values.
Whereas I was mentioning the clipping settings in the volume properties. I don't know if it is related but I don't think so.

Hum. I tested it on the first sample I provided and it does not give the same result. [Screencast from 31-08-2022 10:27:20.webm](https://archive.blender.org/developer/F13440342/Screencast_from_31-08-2022_10_27_20.webm) I think with this video we can clearly see the "black bars" which are not visible using the first shader and then revealed using the second shader. Thus, we can sort of deduce how this banding-like effect is affected by the viewing angle. So to answer your question, I am not convinced that lowering the clipping value to zero fixes the issue. About #53472, if I understand correctly, that issue is more related to camera clipping values. Whereas I was mentioning the clipping settings in the volume properties. I don't know if it is related but I don't think so.
Member

Changed status from 'Needs Developer To Reproduce' to: 'Needs Triage'

Changed status from 'Needs Developer To Reproduce' to: 'Needs Triage'
Member

Does the scale of the volume object have any effect on the banding effect?

Does the scale of the volume object have any effect on the banding effect?
Author

No, it does not seem to have any effect.
Screencast from 31-08-2022 10:46:26.webm

No, it does not seem to have any effect. [Screencast from 31-08-2022 10:46:26.webm](https://archive.blender.org/developer/F13440386/Screencast_from_31-08-2022_10_46_26.webm)
Member

Just a note, looking at the attached files, it seems they include negative values, contrary to a number of OpenVDB file samples I looked at, and those negatives values seems to take the shape of those bands, so I suspect this might have something to do with the issue you are experiencing.

Just a note, looking at the attached files, it seems they include negative values, contrary to a number of OpenVDB file samples I looked at, and those negatives values seems to take the shape of those bands, so I suspect this might have something to do with the issue you are experiencing.
Author

Yes, I think you are pointing out an interesting element. I also checked the values and some of them are negative. I did not managed to see how these data are arranged but that could be something causing my issue.
Maybe this could explain why setting the clipping value to 0 was not giving any result in this video.

In #100714#1410503, @Felix-Olart wrote:
Hum. I tested it on the first sample I provided and it does not give the same result.
Screencast from 31-08-2022 10:27:20.webm

So to answer your question, I am not convinced that lowering the clipping value to zero fixes the issue.

Indeed, if the negative values are causing these artifacts, then setting the clipping value to 0 or not won't probably change anything.
That said, is it still normal that the volume is rendered like that for negative values? Because it seems to act like a powerful filter.

Yes, I think you are pointing out an interesting element. I also checked the values and some of them are negative. I did not managed to see how these data are arranged but that could be something causing my issue. Maybe this could explain why setting the clipping value to 0 was not giving any result in this video. > In #100714#1410503, @Felix-Olart wrote: > Hum. I tested it on the first sample I provided and it does not give the same result. > [Screencast from 31-08-2022 10:27:20.webm](https://archive.blender.org/developer/F13440342/Screencast_from_31-08-2022_10_27_20.webm) > > So to answer your question, I am not convinced that lowering the clipping value to zero fixes the issue. Indeed, if the negative values are causing these artifacts, then setting the clipping value to 0 or not won't probably change anything. That said, is it still normal that the volume is rendered like that for negative values? Because it seems to act like a powerful filter.
Member

I will try to ask the developers about this and get back to you.

I will try to ask the developers about this and get back to you.
Contributor

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Omar Emara changed title from Banding-like effect in Cycles using OpenVDB volumes when clipping is not zero to Banding-like effect in Cycles using OpenVDB volumes 2022-08-31 16:08:57 +02:00

This issue was referenced by b5ff47667d

This issue was referenced by b5ff47667da593860b9a207daa24fec48163ee67

This issue was referenced by e665f0f497

This issue was referenced by e665f0f497f6ea6a4cff36e977bbac29dd762c00

This issue was referenced by None@63016

This issue was referenced by None@63016

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-08-31 20:55:59 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
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#100714
No description provided.