Jump to content

Procedurally reusing a DOP Network n-times


ChristopherC

Recommended Posts

Heya,

 

I'm currently trying to simulate a bunch of smoke trails flying at high speed in many directions and I would like to split the simulation into different DOP Networks to avoid computing a large container at once (my laptop is slow).

 

It seemed intuitive to put my DOP Network inside a `ForEach` node but it doesn't seem to work and all I could find on the internet was a mention that DOP Networks obviously can't work within `ForEach` nodes. Why is that?

 

How would I go to procedurally apply the same DOP Network a variable number of times as I've tried to do in the attached scene?

 

Cheers!

 

split_simulation.hipnc

Link to comment
Share on other sites

Thanks Christian, this link has been really helpful! I can't believe that I didn't stumble on it after all the time spent in the docs!

 

I've attached the resulting scene—it allows to generate a variable number of animated spheres, each starting to emit smoke from a user-defined frame.

 

I ended up not using directly the `Clustering Points` node since I intended to manually define the clusters, which means that I only had to update my graph to feed the actual feature that I was after: the smoke object instancing.

 

Also, and if someone wouldn't mind explaining, I'm still curious about what's wrong with the `ForEach` approach? Could it theorically work if the object and data names were unique amongst all the iterations?

 

split_simulation.hipnc

Link to comment
Share on other sites

I don't have time to look into your hip file at the minute, but make sure they're vel.x_[0-numcluster] etc...

Each source corresponds to a different simulation domain.

 

As for the forEachSOP, I don't know the technical answer and I might be completely wrong on this thought process, but the forEach would have to remain open in the session to work sequentially as a simulation. Each frame it would have to return to the iteration, pull the data from the last frame, progress forward etc... Don't think it really works like that. It just iterates and closes at the end, next frame it iterates then closes, so sequential solvers won't work. Or that's how I think about it anyway, might be completely wrong.

Link to comment
Share on other sites

You were right—I manually named the velocity volumes “vel_#.x/y/z” instead of “vel.x/y/z_#”. Everything is working well now.

 

There's still one weird thing which makes me wonder if I set up everything properly—Houdini crashes when I plug the `Gas Resize Fluid Dynamic` node in the pre-solve plug of the smoke solver, and the `Source Volume` in the post-solve, like it seems to be the case with the shelf tools. But I'll leave that one alone for now, I need to move on.

 

Thanks again Christian!

 

split_simulation.hipnc

Link to comment
Share on other sites

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...