Volume Displace blocky #81983

Closed
opened 2020-10-23 00:13:23 +02:00 by Gurra · 15 comments

System Information
Operating system: Windows 10
Graphics card: GTX 970

Blender Version
2.91 Beta

Short description of error
When using the Volume Displace you get weird blockyness when rendering in Cycles.
This is a suzanne turned into a volume with a displace turned to 0 (doesn't matter what value I use, still looks the same)
voldispbug1.jpg

And this is with the modifier turned off
voldispbug2.jpg

Exact steps for others to reproduce the error
Create monkey, create an empty volume, add a Mesh to Volume modifier (bump up the voxel amount higher for clearer effect of the bug), add a Volume Displace modifier, render in Cycles.
volbug.blend

**System Information** Operating system: Windows 10 Graphics card: GTX 970 **Blender Version** 2.91 Beta **Short description of error** When using the Volume Displace you get weird blockyness when rendering in Cycles. This is a suzanne turned into a volume with a displace turned to 0 (doesn't matter what value I use, still looks the same) ![voldispbug1.jpg](https://archive.blender.org/developer/F9038574/voldispbug1.jpg) And this is with the modifier turned off ![voldispbug2.jpg](https://archive.blender.org/developer/F9038599/voldispbug2.jpg) **Exact steps for others to reproduce the error** Create monkey, create an empty volume, add a Mesh to Volume modifier (bump up the voxel amount higher for clearer effect of the bug), add a Volume Displace modifier, render in Cycles. [volbug.blend](https://archive.blender.org/developer/F9038655/volbug.blend)
Author

Added subscriber: @Gurra

Added subscriber: @Gurra

#82458 was marked as duplicate of this issue

#82458 was marked as duplicate of this issue
Gurra changed title from Volume Displace to Volume Displace blocky 2020-10-23 00:13:46 +02:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I think this happens for the following reasons.

  1. The volume displace modifier prunes the resulting openvdb tree to reduce memory consumption. This might remove leaf nodes when all voxels in it have the same value. The logical voxel value does not change, because an internal node stores the value of all voxels.
  2. Cycles generates a mesh on the boundary of a volume, presumably to speedup rendering. This mesh is generated incorrectly in the pruned tree.

This should really be solved before the release. I'm looking into it now.

I think this happens for the following reasons. 1. The volume displace modifier prunes the resulting openvdb tree to reduce memory consumption. This might remove leaf nodes when all voxels in it have the same value. The logical voxel value does not change, because an internal node stores the value of all voxels. 2. Cycles generates a mesh on the boundary of a volume, presumably to speedup rendering. This mesh is generated incorrectly in the pruned tree. This should really be solved before the release. I'm looking into it now.
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

This patch removes much of the optimization, but it solves the problem: P1754.
I won't finish a patch that still contains the optimization today.

This patch removes much of the optimization, but it solves the problem: [P1754](https://archive.blender.org/developer/P1754.txt). I won't finish a patch that still contains the optimization today.

Just a guess, but maybe we are not handling tile values correctly?
https://www.openvdb.org/documentation/doxygen/overview.html#subsecValues

We iterate over leaf nodes, but I'm not sure what happens when internal nodes have a tile value for example.

Just a guess, but maybe we are not handling tile values correctly? https://www.openvdb.org/documentation/doxygen/overview.html#subsecValues We iterate over leaf nodes, but I'm not sure what happens when internal nodes have a tile value for example.
Member

Yes indeed, I'm pretty sure that is the issue here. We can actually see that the "inside" of the volume is rendered empty. The conversion to a dense matrix in cycles yields the same result (I checked adding up all the densities with and without modifier, and they are the same).

We just have to find a good and correct way to build the mesh taking into account internal nodes as well. It does not seem too hard, but I need to think about it a bit more.

2020-11-05 18-26-28.mp4

Yes indeed, I'm pretty sure that is the issue here. We can actually see that the "inside" of the volume is rendered empty. The conversion to a dense matrix in cycles yields the same result (I checked adding up all the densities with and without modifier, and they are the same). We just have to find a good and correct way to build the mesh taking into account internal nodes as well. It does not seem too hard, but I need to think about it a bit more. [2020-11-05 18-26-28.mp4](https://archive.blender.org/developer/F9210823/2020-11-05_18-26-28.mp4)

Added subscribers: @FilipMond, @iss

Added subscribers: @FilipMond, @iss

This issue was referenced by blender/cycles@7901828599

This issue was referenced by blender/cycles@7901828599ee3870df8666ca413028f7f325ecf0

This issue was referenced by 13ec512f4b

This issue was referenced by 13ec512f4b9a9232d04a8995fab1837798ef4c39

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-11-16 20:06:14 +01:00

Note sure why this report was not auto closed, doing manually.

Note sure why this report was not auto closed, doing manually.

Added subscriber: @PetterLundh

Added subscriber: @PetterLundh
Thomas Dinges added this to the 2.91 milestone 2023-02-08 16:20:09 +01:00
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
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#81983
No description provided.