Skip to content

(feature/nanovdb) [BUG] nanovdb-viewer produces empty files #1961

Open
@dm-tesla

Description

@dm-tesla

Environment

Operating System: Ubuntu 24.04 LTS
Version / Commit SHA: SHA: 4a186c2 (head of "feature/nanovdb")
Other: clang-18.1.3

Describe the bug

When running nanovdb-viewer on a file, it saves 100 files, and all of them have size of 0.

To Reproduce

$ nanovdb/build/cmd/nanovdb_viewer --render-output "output.%04d.jpg" grid-ok.nvdb 
Starting NanoVDB Viewer...
-------------------------------------------------------------------------------
Please note that the first time CUDA is used for rendering, the application
may stall while CUDA is compiling code for your specific GPU architecture.
This is perfectly normal, and will only happen ONCE after source-code is built.
-------------------------------------------------------------------------------
Warning: GLFW was not enabled in your build configuration. Using batch mode.
[INF]: Found grid "" from "file://grid-ok.nvdb"
[INF]: Requesting asset(file://grid-ok.nvdb) grid()
[INF]: Creating sceneNode[default]
[INF]: sceneNode[default] assigning grid attachment: file://grid-ok.nvdb
[INF]: Successfully loaded grid "" from "file://grid-ok.nvdb"
[INF]: Rendering frames 0 - 100 to output.%04d.jpg
--------------------------------------------------------------------------------
Frame    : 0
Duration : 16.335 ms
[DBG]: Exporting framebuffer to output.0000.jpg
--------------------------------------------------------------------------------
Frame    : 1
Duration : 13.6 ms
[DBG]: Exporting framebuffer to output.0001.jpg
--------------------------------------------------------------------------------
...
--------------------------------------------------------------------------------
Frame    : 100
Duration : 12.602 ms
[DBG]: Exporting framebuffer to output.0100.jpg
[INF]: Rendering complete.
--------------------------------------------------------------------------------
Average duration : 12.423 s
--------------------------------------------------------------------------------

Then inspecting the sizes - they are all zero

$ ls -la output.*
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0000.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0001.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0002.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0003.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0004.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0005.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0006.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0007.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0008.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0009.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0010.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0011.jpg
-rw-rw-r-- 1 kvark kvark 0 Nov  5 08:48 output.0012.jpg

Expected behavior

The files are valid JPEG images. If there are any issues with input or command invocation, it should tell me what's wrong.

Additional context

The input file has a grid 23x25x27, with roughly 1/3 of the voxels occupied.
The data is custom 16 bits per voxel.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions