how to determine if volume primitive is 16-bit?

   6052   5   0
User Avatar
Member
1721 posts
Joined: March 2020
Offline
Hi,


What's the simplest way of detecting if a (regular) volume primitive stored in 16-bit representation in memory? (I just need for manual instpection, “Extended Info”-kind of thing, although any script command would also do. )

cheers,
Imre
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
94 posts
Joined: Aug. 2010
Offline
in the spreadsheet, look for an intrinsic attribute called “vdb_is_saved_as_half_float”

Attachments:
tmp.jpg (117.0 KB)

User Avatar
Member
9380 posts
Joined: July 2007
Offline
I believe the question was about regular volume primitive, not VDB
but maybe regular volumes don't store/change the precision, it may be just used in Volume Compress to round off the values so they are naturally compressed to smaller files
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
76 posts
Joined: Sept. 2011
Online
I think with VDB they are never stored in memory as 16-bit, it is only when they are written to disk and save half precision is enabled.

With regular volumes I'm fairly certain you can work with them in Houdini and in memory as 16-bit. There is an option to create 16-bit volumes in dops however it will slow your sim down.

As far as viewing the precision of a standard Houdini dense volume, I'm not sure how. ops:
User Avatar
Member
392 posts
Joined: Nov. 2008
Offline
Don't know if there is any smartet/simplier way, but you can create floating point attribute (32/64bit) and then sample that volume for non zero values and write them to that attribute.

If volume is in 16bit float then sampled values will have precision up to 5 decimal places. Otherwise it could have more than that (I think 9 decimal places is common standard volumes with 32bit floating point precision).
User Avatar
Member
1721 posts
Joined: March 2020
Offline
My question was about regular (non-VDB) volumes, VDBs are (afaik) always stored as floats in memory.

Thanks for the workaround suggestions. The workaround I usually go for (with mixed success, I might add) is to toggle the 16bit switch on a Volume Compress SOP and see how the memory consumption changes. Bit awkward, though.
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
  • Quick Links