HDA containing FLIP sim

   1343   5   1
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
I know this is a weird one, here goes:

I have an HDA with a simple flip sim inside it. I have some geo that the sim collides with; the HDA has multiple outputs, one for the collider geo and another for the meshed flip sim.

I have a Timeshift node after my DOPnet, which holds the sim at a specified frame.

The HDA allows me to procedurally randomize the collider shapes, some noise seeds, etc. The idea is that I'd like to have one setup that lets me make lots of different abstract splashy shapes.

This all works fine, until I try to generate multiple splashes procedurally. For example, if I have several planes, and I want to iterate over each plane and place a different splashy shape on each, what I end up with is the same splash everywhere. I can see the collision geometry is different per instance, but the meshed splash is the same.

What I *think* might be happening is that the DOP sim runs once, and that splash mesh gets cached in ram, but this gets stepped on by subsequent dop sims...could this be what's going on? I'd like to avoid having to write out data to disk for every splash, if possible.

Might anyone have advice? I admit I haven't tried this before, so I'm unsure if what I'm trying is even possible.

Thanks!

Attachments:
Screenshot 2022-07-30 221644.png (823.9 KB)

User Avatar
Member
207 posts
Joined: 11月 2015
Offline
On a bit more investigation, this seems to be happening when I try using this HDA within a foreach loop; if I just duplicate several of these and merge them, I see the variation I expect. It's only when I try creating several variations from within a loop that they seem to 'get stuck', specifically the DOPnet bit of it. I can see the colliders changing per loop iteration, just not the flip sim.
Edited by dhemberg - 2022年7月31日 16:28:25
User Avatar
Member
8592 posts
Joined: 7月 2007
Offline
as you noticed it's not about the HDA
you simply can't use time dependent DOPnets inside of for loops as houdini would not be able to keep track of them between frames
there is also no guarantee that you are iterating over the same pieces every frame, etc...

so I'd suggest to use TOPs and wedging instead
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
Ugh, the inability to time-varying stuff inside foreach loops alreays trips me up; it's a limitation I still fail to have an intuition for.

Can you elaborate on how one might use TOPs for this? I admit I'm far less familiar with them, thought I've tried to wrap my head around them, and would welcome the opportunity to use this as a use case to learn more about them. My understanding is that I can have my HDA 'pull' a wedge value from a TOP node, but it's unclear to me how to 'push' the current iteration of my foreach loop into Tops to trigger all of this.
User Avatar
Member
8592 posts
Joined: 7月 2007
Offline
dhemberg
but it's unclear to me how to 'push' the current iteration of my foreach loop into Tops to trigger all of this.
you don't

you will need to replace your foreach with TOP based wedges
1 workitem per iteration, so essentially you will run N parallel sims
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
Hm, ok.

At the moment, I'm reliant on using a for-each approach because I would like to place these splashy shapes at various locations around a procedurally-generated set. So, say, placing them on N shelves, where I don't know the number of shelves beforehand.

What I'm hearing you say is that I need to separate my 'creating the various splashy shapes' bit from the 'placing them around the scene' bit. I can still use my current for-each to place the shapes, but I need to detect how many shapes I will need beforehand, and will need to pre-generate my shapes before entering the for-each step.

Because I find Tops difficult to learn, I spent about 5 minutes being lazy and thinking "Oh wait, I can use copy-stamping to do the pre-generation bit, I understand how to do that." But, lo, H19.5 documentation discourages this, and in fact the Copy Stamp node is hidden in 19.5. So, I need to bite the bullet and figure this out.

I can't seem to find an example showing how to do what I'm trying to do, and though it *seems* like it should be simple, I'm having trouble figuring it out. Attached is a scene file I'm banging around in. For the moment, I'm just trying to figure out how to use tops to wedge a Mountain node and bring it back into sops...I can add in the DOPS stuff once I figure this basic bit out. What I expect to see is a single sphere going into the Top Geometry network, and 10 differently-shaped spheres coming out, which I can pick apart using groups. But I can't seem to get it to do this, and it's not clear to me what I'm misunderstanding.

Can you tell me where I'm going wrong? I don't need (and would prefer not) to have to write anything to disk, and would like to avoid any need to manually poke buttons or individually trigger work items.
Edited by dhemberg - 2022年8月1日 22:20:47

Attachments:
tops_test.hiplc (259.0 KB)

  • Quick Links