drew
I'm using this method to get extra volume attributes into my shaders. The more round about way is to compile them into I3D's, which I resort to when the volumes get large. BTW where he says “name primitive attribute”, read the primitive attribute named “name”.
Thanks Drew.
I'm trying this out but I can't get it to work (I can ObjectMerge from the *simulation* no problem, yes, but not from a non-simulated plain-vanilla IsoOffset-generated volume).
Here's what I'm doing:
Inside object Foo:
*/ One SOP chain (let's call it “initDensity”) defines the smoke density (ends with an IsoOffset SOP) and outputs a single volume primitive. I want Mantra to interpret this as my density.
*/ Another SOP chain (“initRest”) is a bounding box that surrounds the smoke density. This is converted into 3 separate volumes (IsoOffset*3) to represent the three components of my rest position (rest). They are Merge'd together into this chain's 3-volume-primitive output.
Now, if I ObjectMerge “initRest”, toggle on “Create Primitive Groups”, and give it a group prefix of “rest”, the SOP info tells me I now have 3 primitives in group “rest0”. And similarly for “initDensity”, I end up with 1 primitive in group “density0”.
Even if I change my shader params to match the “density0” and “rest0” group names I still get Mantra interpreting all 4 volumes as density.
Alternatively, if I add a GroupSOP to the ends of each chain and give them the group names “density” and “rest” respectively and ObjectMerge those (which already have group names assigned) with “Create Primitive Groups” toggled OFF… still no love.
I've tried several combinations of the above but I've got nothing so far.
Here's the little test file I posted over at odForce. It has a single object called “Sphere” which is set up as I describe above. The goal is to get the vector attribute “rest” over to the built-in “Billowy Smoke” shader *without* going through the simulation (i.e: skipping DOPs; just a plain volume with attributes). Could you or Jeff Lait edit it to show me how this ObjectMerge thing is done?
(BTW: I'm testing this in H9.1.139)
TIA.
P.S: Hey Jacob, the attached hip file shows all the stuff being talked about in this thread. I've commented it a bit for the
odforce post [
forums.odforce.net]. Hope it helps.