Jeffrey Charles Higgins
jhiggins
About Me
EXPERTISE
CG Supervisor
INDUSTRY
Film/TV
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Saving Detail Attributes into VDB July 29, 2014, 2:18 p.m.
Thanks edward,
i'll follow it up with support, just wanted to make sure it was something worthwhile to submit first, and it wasn't something that I can do on my end.
Thanks a lot!
j.
i'll follow it up with support, just wanted to make sure it was something worthwhile to submit first, and it wasn't something that I can do on my end.
Thanks a lot!
j.
Saving Detail Attributes into VDB July 28, 2014, 5:06 p.m.
Hey edward,
So i've been told the secret sauce to reading/writing out detail attributes into a vdb is along the lines of the following.
for writing:
openvdb::Vec3IMetadata myVec3iDetailAttrib(openvdb::Vec3i(x, y, z));
openvdb::MetaMap:
tr metaMap = file.getMetadata();
metaMap.insertMeta(“myVec3i”, myVec3iDetailAttrib);
for reading:
openvdb::MetaMap:
tr metaMap = file.getMetadata();
openvdb::Vec3IMetadata::ConstPtr myVec3iDetailAttrib = metaMap->getMetadata<openvdb::Vec3IMetadata>(“myVec3i”);
The example is a for vec3i detail attrib, but I'm guessing there would be similar analogs for other data types ( string, float, vector, etc ) and similarly there's decent way to loop all of the MetaMap data similarly which I'm guessing would be something more along the lines of how it would be integrated into the translator.
Let me know if this will work and more so if I need to follow this up with a formal BUG submission.
Again this would be really helpful fix for what I'm currently trying to do. I would hope if it were possible it could go into an h13 build.
Cheers,
j.
So i've been told the secret sauce to reading/writing out detail attributes into a vdb is along the lines of the following.
for writing:
openvdb::Vec3IMetadata myVec3iDetailAttrib(openvdb::Vec3i(x, y, z));
openvdb::MetaMap:
tr metaMap = file.getMetadata();metaMap.insertMeta(“myVec3i”, myVec3iDetailAttrib);
for reading:
openvdb::MetaMap:
tr metaMap = file.getMetadata();openvdb::Vec3IMetadata::ConstPtr myVec3iDetailAttrib = metaMap->getMetadata<openvdb::Vec3IMetadata>(“myVec3i”);
The example is a for vec3i detail attrib, but I'm guessing there would be similar analogs for other data types ( string, float, vector, etc ) and similarly there's decent way to loop all of the MetaMap data similarly which I'm guessing would be something more along the lines of how it would be integrated into the translator.
Let me know if this will work and more so if I need to follow this up with a formal BUG submission.
Again this would be really helpful fix for what I'm currently trying to do. I would hope if it were possible it could go into an h13 build.
Cheers,
j.
Saving Detail Attributes into VDB July 26, 2014, 2:05 a.m.
Hi edward,
I guess I know this is possible b/c i'm trying to post-process filter a vdb (generated outside of houdini) and the problem i'm having is that the detail attributes are now becoming primitive attributes thus not allowing me to keep the data the same going in and out as the input vdb which is causing me issues.
I will post a similar question to the OpenVDB Forum, but I feel pretty positive there is a way to do it.
This is what I was able to quickly find so far from looking at the docs.
http://www.openvdb.org/documentation/doxygen/codeExamples.html#sHandlingMetadata [openvdb.org]
Specifically, this part
“Metadata of various types (string, floating point, integer, etc.—see metadata/Metadata.h for more) can be attached both to individual Grids and to files on disk. The examples that follow refer to Grids, but the usage is the same for the MetaMap that can optionally be supplied to a file or stream for writing.”
I'm guessing the MetaMap would consist of the detail attributes and can be written to disk independent of being associated with a grid.
Let me know your thoughts, this would be really helpful!
Cheers,
j.
I guess I know this is possible b/c i'm trying to post-process filter a vdb (generated outside of houdini) and the problem i'm having is that the detail attributes are now becoming primitive attributes thus not allowing me to keep the data the same going in and out as the input vdb which is causing me issues.
I will post a similar question to the OpenVDB Forum, but I feel pretty positive there is a way to do it.
This is what I was able to quickly find so far from looking at the docs.
http://www.openvdb.org/documentation/doxygen/codeExamples.html#sHandlingMetadata [openvdb.org]
Specifically, this part
“Metadata of various types (string, floating point, integer, etc.—see metadata/Metadata.h for more) can be attached both to individual Grids and to files on disk. The examples that follow refer to Grids, but the usage is the same for the MetaMap that can optionally be supplied to a file or stream for writing.”
I'm guessing the MetaMap would consist of the detail attributes and can be written to disk independent of being associated with a grid.
Let me know your thoughts, this would be really helpful!
Cheers,
j.