ruchit
Hi,
here is quick solution to export mayaFluid as VDB using openVDB plugin by Evgeny.

vdbExport.png 

    Usage:
    -----------------------------------------------------
    1). Put vdbExport.py in C:\Users\xxxxxxxx\Documents\maya\xxxx\scripts

    2). Inside maya script editor(python TAB). Run this

       
Code:

import sys
        sys.path.append('C:\Users\xxxxxxx\Documents\maya\xxxx\scripts')
        import vdbExport
        reload(vdbExport)
        vexprt = vdbExport.vdbExportUI()
        vexprt.show()


    3). Select Fluid container and hit load.
    4). Add element name.
    5). Set start/End Frame.
    6). On/Off fluid channel to export.
    7). Done

Quote 1 0
omento
Hi Ruchit! Thanks for the script, although I seem to be getting an error that's preventing runtime. I've tried this multiple times, even using the actual script in the editor, but no dice, always this error:

Code:
# Error: line 1: unexpected indent


I've gone through the script with Sublime Text, and the only place that uses non-spaced indents or tabs is in a commented section where you tell us what to do.


Update:
I've tried just about every variation of Windows / Unix characters ('\' and '/') and indents throughout the initiation script to now avail. Any help would be appreciated.
Quote 0 0
ruchit
Due to extra space added in post, you r gettin error, Try this.

Code:

import sys
sys.path.append('C:\Users\xxxxxxx\Documents\maya\xxxx\scripts')
import vdbExport
reload(vdbExport)
vexprt = vdbExport.vdbExportUI()
vexprt.show()
Quote 0 0
omento
Still nothing. Here's the output:
  
vdbExportError.PNG

vdbExportErrorP2.PNG 
Quote 0 0
omento
I've also shared this on the Redshift forums, and a question was brought up:

Quote: Wonder if it still works if you add some other nodes in between like remap.

Any input on this?
Quote 0 0
ruchit
Try this,
Quote 1 0
userv28
for maya 2017 doesn't work, has new python bindings, pyside2, has to be rewritten :(
Quote 0 0
ruchit
Try this for 2017
Quote 1 0
userv28
awesome, thank you so much!
Quote 0 0
omento
That fix worked beautifully Ruchit. Redshift users also reported success with this non-indented version.

I've also found the just starting at `import vdbExport` in the initiation script works as long as the script is in a known place for Maya, like 201X\scripts, prefs\scripts, or maya\scripts, etc
Quote 0 0
ruchit
Good to know that it's working. Enjoy
Use sys.path.append if script is not @ proper place.
Quote 0 0
omento
Got it. I haven't gotten the chance to test it fully yet, but does your script support nodes past the fluidshape? Like if I pipe the FluidShape into a VDBfromFluid then into a remap node (or other configuration) then to a Write node/Visualize node, will it retain all of that info? Or does it go straight from FluidShape > Export?

Thanks for the script!
Quote 0 0
djx
Since no one mentioned it... This will not work in python due to the \ used in the path.
sys.path.append('C:\Users\xxxxxxx\Documents\maya\xxxx\scripts')
Use / instead and you should be ok.

David
Quote 0 0
ruchit
@omento

I would like to suggest you, use my script to export maya fluid (without cache) as VDB & then do whatever VDB operation you like to add on top of it.

Mostly i avoid simultaneous calculation Bcz it makes workflow slow :( may be i have superstitious.
Quote 0 0
theartofsaul
Can someone update this for Maya 2017?
Quote 0 0

Add a Website Forum to your website.