Jump to content

popForce boundingbox, soft falloff - how?


Fyre

Recommended Posts

Hey,

Im trying to have a pop force act only inside a boundin box and with a soft fall off, is this possible?

I've tried to make it with a uniform force and a mask from a sop scalar field, from a volume, but I can't seem to get it to have a smooth falloff?

Cheers

Edited by Fyre
Link to comment
Share on other sites

Are you referring to the wrangle that created the box falloff? I was initially gonna do it inside a vop ^_^

If so, are you up for a bit of a challenge? Could you try and convert that to a VOP? Afterwards post your progress here so that I (or any other member) could maybe throw some pointers? :D

Link to comment
Share on other sites

So I've given it my best shot, havn't made it far despite working late last night. Theres frustratingly little information or documentation on how to do something as simple as finding and using volume gradient information - and I've not done much with them before.

I've tried a few different things, and I roughly understand what is going on but I'm stuck. If you could take a look and clear up a few questions that would be great:

1. How do I get the gradient working in the vop

2. How do I visualize my gradient to check its working

3. How do I get that inside the DOP to drive the force

Thanks

volumeGradientFalloff.hipnc

Link to comment
Share on other sites

you can also use a volume wrangle to create the volume mask with falloff:

// fade volume near bounds
float p = chf("padding");
vector b, B;
getbbox(0,b,B);
float m = fit(@P.x,b.x,b.x+p,0,1)*fit(@P.y,b.y,b.y+p,0,1)*fit(@P.z,b.z,b.z+p,0,1)*fit(@P.x,B.x,B.x-p,0,1)*fit(@P.y,B.y,B.y-p,0,1)*fit(@P.z,B.z,B.z-p,0,1);
@density*=pow(m,chf("exp"));

  • Like 3
  • Thanks 1
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...