Hi Grant!
I suspect that you will have to run a Stoke Magma intermediate object just to convert the VDB channels to matching Fume channels for the time being (unless Houdini already saved them as Smoke, Velocity etc.) We hope to add conversion modifiers (e.g. a Stoke Magma Modifier) in the future to allow channel remapping to be done without a Stoke Magma base object.
Regarding the adaptive grid saving, we are using the FumeFX SDK which is quite funky and it is a wonder it actually does anything at all. We don’t believe we would be able to use it in its current form to save an adaptive grid using Fume’s feature. Also, the FumeFX grid does not allow for negative voxel coordinates, so we have to translate our grid into FumeFX space, so if the Stoke grid size was changing in the Min. Z axis, the FumeFX Grid would shift incorrectly.
That being said, the actual FumeFX export is a hybrid MAXScript/C++ implementation, and we could tweak it on either side to possibly get something working.
The MXS side of the exporter code can be found in Stoke_FieldDataExporter.ms. The relevant part looks something like this:
local f = StokeGlobalInterface.CreateMXSField theField
StokeGlobalInterface.WriteFXDFile (getFileNamePath theFile + theFileNameFile +(formattedPrint (currentTime.frame as integer) format:"04i")+".fxd" ) theField f.BoundsMin f.BoundsMax f.Spacing
f.Clear()
As you can see, we create a MAXScript field out of the actual Stoke object which returns an interface that gives us the Bounds, Spacing, Channels and ways to clear and sample data:
Interface: MXSField
Properties:
.BoundsMin : point3 by value : Read
.BoundsMax : point3 by value : Read
.Spacing : float : Read
.Channels : string array : Read
Methods:
<void>Clear()
<fpvalue by value>SampleField <string>Channel <point3>Position
Actions:
OK
I guess we could add an option to StokeGlobalInterface.CreateMXSField() to return a shrunk grid, or expose properties that give us the min. and max. bounds of the actual populated voxels taking all channels into account. You could even run 3 FOR loops in MAXScript and sample the grid with the given bounds and spacing through all channels to find the optimal grid bounds yourself. Then, when calling StokeGlobalInterface.WriteFXDFile(), you just have to provide the smaller bounds and your FumeFX file will be written as you need it. You could ensure that the Min. Z is never changed to keep the base consistent and prevent the Fume grid from shifting vertically due to the positive space limitation I mentioned already.
I tested this by creating a simple default Stoke Magma with a Position -> Magnitude -> Less (30.0) -> Density and saved to disk using
f = StokeGlobalInterface.CreateMXSField $
StokeGlobalInterface.WriteFXDFile ("c:/temp/testbounds.fxd" ) $ f.BoundsMin (f.BoundsMax-[0,0,53]) f.Spacing
When I loaded the resulting FXD file, it contained only the bottom half of the grid. So this proves you could change the grid bounds yourself.
What I have not tested yet is what happens if you vary the bounds over time - our Stoke Field Loader would not mind, but I don’t know whether FumeFX will like that. I hope it would.
Hope this helps!
I will log your request as a Wish, but since we just released Stoke last week and have other projects going on, I cannot give you an ETA when we might be able to address this.