Jump to content

Get Sop Vel to pops


mhspadez

Recommended Posts

I'm trying to find a way to get bring in the velocity from a field i created in sops into pops directly. 

I can do this easily in dops with a sop geo and a particlestofield node, but i can't seem to replicate this in pops. I've seen this done before in a pop wrangle, but I don't know the code myself. Can anybody help me out?

Link to comment
Share on other sites

in a pop wrangle, set your first input binding to your vel volumes SOP path, then:

// using VDBs
vector v =  volumesamplev(0,0,@P);

// or using Houdini volumes
float vx = volumesample(0,0,@P);
float vy = volumesample(0,1,@P);
float vz = volumesample(0,2,@P);
vector v = set(vx,vy,vz);

 

 

 

  • Like 1
Link to comment
Share on other sites

@bunker Thanks for the reply, very much appreciated. But I'm still not able to get it to work. Maybe I'm doing something wrong. I assumed in the sops level I have to convert my vel field to a vdb, but that didn't work either, and then I copied your code for vdbs into my wrangle. Would you be able to show me a sample file?

I've uploaded the .hip where I'm trying to just test the vel update. 

 

Also, Just to clarify on my first post -- i'm just looking for any way to bring the vel into pops. It doesn't have to necessarily be using a wrangle. 

vToPOPs.hip

Link to comment
Share on other sites

@Sepu I appreciate the response, but I'm not trying to add velocity to the emission source. I'm trying to bring in a separate velocity field that would affect particles that enter the area of the field. This additional field would be separate from the emission source. So while the trail sop would add velocity to a sop, I'm more specifically asking about how to get those velocity fields to affect particles in a pop sim.

Link to comment
Share on other sites

Thanks Martin, this definitely works and is a perfect solution for this sample file. When it's scaled up creating the volume definitely starts to get heavy though. There must be another way to bring in the velocities directly without the conversion to a volume. 

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