f3d icon indicating copy to clipboard operation
f3d copied to clipboard

VDB not shown as volume by default

Open stremeor opened this issue 1 year ago • 2 comments

Describe the bug If I open, or drag'n'drop a .vdb file into f3d window it does not show as volume but an opaque bounding box, even though the .vdb config enables "volume" as default. The same is true for thumbnails for .vdb files.

To Reproduce Steps to reproduce the behavior:

  1. Start f3d
  2. Drag a .vdb file into f3d window
  3. Check settings, volume is off
  4. Press "v" to enable volume mode

Expected behavior The .vdb config enables "volume" by default but this seems not respected by f3d.

System Information:

  • OS: Windows 10
  • GPU and GPU driver: RTX A6000, 525

F3D Information F3D 2.4.0

F3D - A fast and minimalist 3D viewer Version: 2.4.0. Build date: 2024-04-03 14:39:50. Build system: Windows 64-bits. Compiler: MSVC 19.38.33135.0. External rendering module: ON. Raytracing module: ON. VTK version: 9.3.0-2200-g1312f8a726 (date: 20240312). Copyright (C) 2019-2021 Kitware SAS. Copyright (C) 2021-2024 Michael Migliore, Mathieu Westphal. License BSD-3-Clause. By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Additional context image

stremeor avatar Apr 23 '24 17:04 stremeor

Hey Steffen!

I'm happy to see that you are using F3D!

So I just checked with the 2.4.0 release on Linux and dropping armadillo.vdb and it seems to work out of the box:

a

Can you try with this file ?

Could you share your config by the way ? It looks like you changed a few options ?

mwestphal avatar Apr 23 '24 21:04 mwestphal

Hey @stremeor , please provide more info about your issue if you can. All our testing seems to indicate that volume is indeed used with the default config.

mwestphal avatar Apr 28 '24 09:04 mwestphal

I like f3d a lot, now that it also supports .vdb and .usd. Great additions!

Tried the armadillo, and it actually does show as "volume" in thumbnails - but not when I open it in f3d app. Strange! Then I removed my user config.json file, and suddenly it also works in the app. I did not change anything in the global config files. Not sure what causes the hiccup in my local config. See my config below. BTW, the public OpenVDB samples don't like the "inverse" option it seems.

{
   ".*": {
       "resolution": "1200,800",
       "bg-color": "0.7,0.7,0.7",
       "color": "0.5,0.1,0.1",
       "fxaa": true,
       "timer": true,
       "progress": true,
       "axis": true,
       "bar": true,
       "verbose": true,
       "roughness": 0.2,
       "grid": true,

       "camera-direction": "0.5,-0.3,-0.9"
   },
   ".*vt.": {
       "edges": true
   },
   ".*gl(tf|b)": {
       "raytracing": true,
       "denoise": true,
       "samples": 3
   },
   ".*mhd": {
       "volume": true
   },
   ".nhdr": {
    "volume": true
}
}

stremeor avatar Apr 29 '24 12:04 stremeor

it actually does show as "volume" in thumbnails - but not when I open it in f3d app. Strange!

This is expected, the thumbnails have dedicated configuration files

Not sure what causes the hiccup in my local config. See my config below.

This looks like a pre-plugin/pre-vdb config file. Since it doesnt contain any configuration about .vdb, F3D resort to not setting anything at all

We improved A LOT the config file mechanism. I would suggest to start your config from scratch using the config in the package you downloaded as a start. It is now split in different files.

BTW, the public OpenVDB samples don't like the "inverse" option it seems.

It seems to work fine here:

./bin/f3d ~/data/tmp/armadillo.vdb --inverse=0

a

mwestphal avatar Apr 29 '24 14:04 mwestphal

There seems to a difference between "levelset" and "fogvolume" type .vdb. The true volumetric .vdb work with "inverse off" like bunny.vdb vs. bunny_cloud.vdb. Would be cool if f3d could differentiate between the two variants.

Screenshot 2024-04-29 17 04 32

Screenshot 2024-04-29 17 04 43

With "inverse off" the bunny_cloud.vdb sample looks good.

Screenshot 2024-04-29 17 04 57

stremeor avatar Apr 29 '24 15:04 stremeor

Indeed, this is a limitation of the current implementation and a way forward for this would be quite complex as F3D rely on filename and extension to determine which option to enable or not. VDB support also point clouds which F3D will (unsuccessfully) try to display as volumes. This is why we consider VDB support to be experimental.

One way to improve this is to first implement #1193 in order to be able to implement custom behavior for individual readers.

I suppose your issue with config file was resolved ? I could rework this issue to focus on what could be improved in the VDB support if thats ok with you.

mwestphal avatar Apr 29 '24 16:04 mwestphal

I have re-done my user config files, .vdb show as volume now.

stremeor avatar Apr 30 '24 17:04 stremeor

Just a last comment, due to the great support of custom configs in f3d, it seems easily possible to add a pre/postfix to the vdb file name (like "xxx_levelset.vdb") and add a case for those names in the config file with special settings.

stremeor avatar May 03 '24 14:05 stremeor

Absolutely, this is supported! I should have mentionned it.

mwestphal avatar May 03 '24 14:05 mwestphal