Spreadsheet: Add Volume grid's active voxel count #105515

Closed
Erik Abrahamsson wants to merge 1 commits from erik85/blender:ss-voxel-count into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Adds the count of active voxels to the spreadsheet editor.
This can be useful for example when debugging volume related problems
or to keep an eye on for performance reasons.

bild

Adds the count of active voxels to the spreadsheet editor. This can be useful for example when debugging volume related problems or to keep an eye on for performance reasons. ![bild](/attachments/3a3d546e-0c7f-4681-b505-e4884bdba204)
311 KiB
Erik Abrahamsson added 1 commit 2023-03-07 01:21:49 +01:00
Erik Abrahamsson requested review from Hans Goudey 2023-03-07 01:23:54 +01:00
Erik Abrahamsson added the
Interest
Nodes & Physics
label 2023-03-07 01:24:20 +01:00

This could be a performance problem.

I'd expect the spreadsheet to only display information that's readily available. If it has to traverse the tree for every grid in every draw that could be slow with a bunch of highly detailed volumes.

It may also cause the tree and voxels to be loaded from disk when it wasn't before.

This could be a performance problem. I'd expect the spreadsheet to only display information that's readily available. If it has to traverse the tree for every grid in every draw that could be slow with a bunch of highly detailed volumes. It may also cause the tree and voxels to be loaded from disk when it wasn't before.
Author
Member

This could be a performance problem.

I'd expect the spreadsheet to only display information that's readily available. If it has to traverse the tree for every grid in every draw that could be slow with a bunch of highly detailed volumes.

It may also cause the tree and voxels to be loaded from disk when it wasn't before.

That's true, I didn't think that far.
Do you think it would make any sense to instead show the saved metadata for each grid (if available)? That is boundingbox min/max, memory usage and active voxel count.
The problem is this would have to be rewritten every time the grid is updated. But maybe that's not that bad, I don't know.

> This could be a performance problem. > > I'd expect the spreadsheet to only display information that's readily available. If it has to traverse the tree for every grid in every draw that could be slow with a bunch of highly detailed volumes. > > It may also cause the tree and voxels to be loaded from disk when it wasn't before. That's true, I didn't think that far. Do you think it would make any sense to instead show the saved metadata for each grid (if available)? That is boundingbox min/max, memory usage and active voxel count. The problem is this would have to be rewritten every time the grid is updated. But maybe that's not that bad, I don't know.

It looks like a task for some kind of cache. Or a single-value attribute of the of the domain size...

It looks like a task for some kind of cache. Or a single-value attribute of the of the domain size...
Author
Member

It looks like a task for some kind of cache. Or a single-value attribute of the of the domain size...

Grid metadata is a builtin feature of openvdb.

edit: I meant addStatsMetadata() and getStatsMetadata() from here

> It looks like a task for some kind of cache. Or a single-value attribute of the of the domain size... Grid metadata is a builtin feature of openvdb. edit: I meant `addStatsMetadata()` and `getStatsMetadata()` from [here](https://www.openvdb.org/documentation/doxygen/classopenvdb_1_1v10__0_1_1GridBase.html)

Updating metadata for every edit or frame also has a cost. I guess it's acceptable if a user chose to inspect the volumes in the spreadsheet.

Perhaps this could still work like a cache, generating the metadata on demand when missing.

Updating metadata for every edit or frame also has a cost. I guess it's acceptable if a user chose to inspect the volumes in the spreadsheet. Perhaps this could still work like a cache, generating the metadata on demand when missing.
Hans Goudey requested changes 2023-03-08 21:50:15 +01:00
Hans Goudey left a comment
Member

I agree with Brecht's point here. I think the patch should demonstrate that this doesn't have a significant performance cost, or that should figure into the design somehow it does. Working with volumes is already expensive, we should be careful of making that worse.

I agree with Brecht's point here. I think the patch should demonstrate that this doesn't have a significant performance cost, or that should figure into the design somehow it does. Working with volumes is already expensive, we should be careful of making that worse.
Member

Closing this PR, since there are remaining questions about performance, and the volume API has changed significantly recently.

Closing this PR, since there are remaining questions about performance, and the volume API has changed significantly recently.
Hans Goudey closed this pull request 2024-01-12 17:50:40 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
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
4 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#105515
No description provided.