Hi,
I had a few questions about the file format for image 3D files.
1) Is it true that only the “density” channel is written to the file? I'm writing some i3D VEX code based off of the tutorials that Jason Iverson wrote on odforce (thx again Jason!) but am confused a bit. It would be so handy to be able to write additional data into the i3D file! I gotta feeling this is being done, but not sure how yet. In one example (see below), Jason declares a var to be “exported”, but when I gen up the i3D file, it appears only the “density” channel is written.
2) Is the i3D file format published anywhere? I can dump the contents using a utility like “od -vcx” but it would be a lot easier if I didn't have to reverse engineer it …
3) Where does one place the .ds file. I was able to make an OTL and import that into Houdini, but I don't feel 100% comfortable with OTLs yet and would like to know how to “install” the i3D VEX function. I looked through the $HFS/houdini/vex tree and didn't see any examples I could learn from.
This file format is really interesting and if I can get more data into the file, I've got ideas for using Real Flow data with 3d “texture” files … groooooovy! If it can't be done I suppose I could write a plugin to create my own file format, but would rather not create yet another protocol to deal with …
Thanks!
–Mark
image3d blend_attribute( vector freq={1,1,1} )
{
float d = 0, max = 0;
vector clr = 0;
export vector blended_color=0;
forpoints( P )
{
d = mdensity(P); //get density of metaball
if (d > max)
{
clr = mattrib(“Cd”, P); //get the unblended color attribute
max = d;
}
blended_color = d * mattrib(“Cd”, P); // blend based on density
}
density = max;
}