Jump to content

update vel,P in popwrangle [SOLVED]


JJ FX

Recommended Posts

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
Link to comment
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

Link to comment
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

Link to comment
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 :)

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