Jump to content

Merge multiple VDBs


Recommended Posts

Yeah, but if i have 30 different VDB objects? VDB combine has ony 2 inputs

right now im doing: convert all VDBs to poly and then back to VDB. Can I somehow merge all vdbs into one without the conversion to poly?

Edited by JJ FX
Link to comment
Share on other sites

14 hours ago, JJ FX said:

Yeah, but if i have 30 different VDB objects? VDB combine has ony 2 inputs

right now im doing: convert all VDBs to poly and then back to VDB. Can I somehow merge all vdbs into one without the conversion to poly?

hmm 30 vdbs. That's an interesting problem there. Probably for each is the way to go, but how to properly set it up then. or volume wrangle/vop. I don't have time now to have a look at it, but I'm curious how to do it now.

Link to comment
Share on other sites

Hi Try to use this shelf tool to make a chain of multiple VDB combine nodes by selecting & clicking once.

  1. Select multiple VDBs.
  2. Execute this script.
selected_nodes = hou.selectedNodes()
vdbcombines = []

for x, node in enumerate(selected_nodes):
    if x < len(selected_nodes)-1:
        vdbcombine = node.createOutputNode('vdbcombine')
        vdbcombine.setNextInput(selected_nodes[x+1])
        vdbcombine.setParms({'operation':'add'})
        vdbcombines.append(vdbcombine)

for x, vdbcombine in enumerate(vdbcombines):
    if x < len(vdbcombines)-1:
        vdbcombine.setInput(1, vdbcombines[x+1])

 

  • Thanks 1
Link to comment
Share on other sites

No need for loops and stuff. Take one VDB and put it in the first input, merge all the others and put it in the second input. On the VDB Combine choose "Flatten All B into A" and choose the appropriate operation, like SDF Union for sdfs.

 

Screenshot from 2017-03-29 11-29-36.png

Edited by Skybar
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...