Jump to content
Sign in to follow this  
JJ FX

update vel,P in popwrangle [SOLVED]

Recommended Posts

Posted (edited)

Hi,

So I Want for my particles to stick to the surface. So besically I just need to tell the solver to use @v from the geometry. Sounds easy. This is the code I used in popwrangle:

float radius = 2;
int maxPoints = 10;

int handle = pcopen(1,"P",@P,radius,maxPoints);
vector vel = pcfilter(handle, "v");

@v = vel

I spawn points on the surface. And then I want them just to follow the surface (for now). And works nice, as long the geometry from popsource (I use surface emission) is not moved too far from the rest postion. Once its way too far, the points spawn on the rest position... And I can increase the radius, and then they do follow surface. But still the spawn in a wrong place

What I want to achieve is the same resault if I just used point deform on my points to the animated geometry.

So why does this code fails in popwrangle? Tried to do it on sopsolver in pointwrangle, but does not work at all

Edited by JJ FX

Share this post


Link to post
Share on other sites

Hey JJ

Is it just that the code fails? You're missing a last semi colon in that example you've paste

Do you have an example scene? Might be easier to debug if you have something simple you can share.

Cheers

Share this post


Link to post
Share on other sites
17 minutes ago, Mikal said:

Hey JJ

Is it just that the code fails? You're missing a last semi colon in that example you've paste

Do you have an example scene? Might be easier to debug if you have something simple you can share.

Cheers

No no, the code is not pasted. Because Of security I cannot copy/paste the code. So I mistyped it here :)

Cannot share anything, later tonight when I come home I will recreate the issue and post the file

Share this post


Link to post
Share on other sites

Actually I just tried simple attrib transfer @v in sopsolver (which is besically the same thing) and Im getting the same issue... So....

 

Wait...... Am I just emitting on a rest position?

Yes I am!

 

So the code is working, its just my chaos on the scene :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×