andyhosking
Hi all,
I'm looking to batch write .vdb files of 100's of 45-60 second Maya scenes 1 scene at a time as they're created. I've tried using mayabatch and a simple python script, but it doesn't like simply using maya.cmds.currentTime() to step through the frame range to write each vdb file, saying time is already connected to something else.

Background:
To create our final rendered videos, we run seeded simulations, then run several other fx passes, and then render, all through our own custom c++ app and python scripts ... and all is working fine.

But we are looking to update our fx pipeline to use vdb files for obvious efficiency gains etc. We're starting to be limited in our fx choices simply using Maya fx solutions because of processing time / storage etc.

Could anyone offer any thoughts on how this could be achieved?
Quote 0 0
pshipkov
There is a wide range of potential issues with batching, which can lead to extensive for and back between us, before we narrow down a fix/solution/workflow that works for you.
The fastest way for us to help you is if you can provide a minimal example of a scene with data that has to be written out as VDB cache.
Let me know if you don't have the time to create such a case, but can share a production scene - we can do this in private.

Thanks.
Quote 0 0
andyhosking
It was really just a general question about if it's possible to create the .vdb files using mayabatch and a mel/python command, ... instead of pressing play from within the maya ui.
Quote 0 0
andyhosking
I found this script and managed to solve it for my simple purposes.
https://gist.github.com/taikomatsu/260a290111c6fd78831c53eda0ae4025

It seems I needed to use 'evaluate()' to force the files to be created.
Here's my simple solution if anywhere cares >>>


from pymel.core import *

def exportVDB():

    print "\n\n ====== export vdb started"

    start=0
    end=100

    loadPlugin('BE_OpenVDB', qt=True)

    writeNodeName = 'BE_VDBWrite1'
    writeNode = PyNode(writeNodeName)

    currentTime(start)

    for frame in range(start,end+1):
        ## goto next frame
        currentTime(frame)

        ## evaluate writeNode
        writeNode.VdbOutput.evaluate()

print "\n\n ====== export vdb complete"
Quote 0 0
pshipkov
Glad to hear you figured it out.
Quote 0 0
juanjo_bernabeu
Hello, so this thread does not get lost since I find it very interesting ... I would like to request something similar to File Cache Node de Houdini.

A node where we could centralize all the writings .. as much of Geometry Cache or Ncloth for Soup as VDB or other formats.

Thanks.


3D Supervisor
Quote 0 0
pshipkov
Or maybe a script or something that wraps the different nodes and functionality into one ?
Quote 0 0
juanjo_bernabeu
I think it is important to maintain a line of easy comprehension for this type of nodes.
The first time I entered Houdini and did not know how to do it, it took me 3 minutes to find this type of node and understand its functionality.

Achieving that minimum learning curve should be the key to the success of that node.

Maybe we could replicate it completely. A File that can be used to load all kinds of files and a file cache to write in queue, independently of Maya? It would be a dream. 🙂
3D Supervisor
Quote 0 0
pshipkov
Point taken.
Quote 0 0
pshipkov
So lets identify the types of data we want to deal with ...
Quote 0 0
juanjo_bernabeu
I dont have to much experience but without thinking too much...

Write : mcx, mcc, abc, usd, field3d, bif, vdb, rpc...

Read: obj, abc, bif, vdb, field3d, rpc, partio formats...

Prioritiy for: abc, vdb ,🙂
3D Supervisor
Quote 0 0
pshipkov
Just to clarify it - this will be a massive-massive effort 🙂
Quote 0 0
juanjo_bernabeu

pshipkov wrote:
Just to clarify it - this will be a massive-massive effort 🙂


ah aha ah.  I'm agree.xd.

I believe that putting the first stone ( read and write abc and vdb... ) is enough in 90% of cases and if the experience is positive continue implementing more extensions. It would be amazing.

I dream every day with a much more artist friendly Soup ( ala Mash ) and with a great documentation ... 🙂

3D Supervisor
Quote 0 0
pshipkov
Yes, documentsation. We have the first draft in place. Jeremy did a great job at it. But i am dragging him down with not having the time to put the finishing touches.
Quote 0 0
samadoni

i was always dreaming about a cache node like houdini for maya. I never asked for it here cause i always felt this should be something in the core of maya and would require a big load of work.

Now with maya 2019 around the corner and we saw that they are actually working on an interactive caching system, i'm curious to see what we will have.

Is this thing will be a node or not, and if it will be only for anim/rig stuff?

So will see, and if it's not enough satisfactory we will come back to you for a better solution Peter hahaha 😋      

Quote 0 0