# transform points from static to animated geo

## Recommended Posts

Hello,

I have a particle system on static geometry like in attached picture.

I want to transfer points on same geometry which is animated - deforming.

Do you have any ideas how to solve this problem?

I've came across this paper. I think they had similar problem which they solved using barycentric coordinates. But I believe there might be a simpler soultion. Any clues?

Thanks.

##### Share on other sites

I guess, you can try try to transfer the position based on UV-Space?

Just an intuition, not sure if it would work...

##### Share on other sites

Look into AttribInterpolate -- if you have prim and primuv from Scatter?

##### Share on other sites

I have a particle system on static geometry like in attached picture.

If you use scatter sop then turn on primnum and primuv and then use primuv() VEX function in AttribWrangle to match P.

##### Share on other sites

If you are not familiar with VEX then yes you can use new AttribInterpolate sop as well without any code.

##### Share on other sites

I solved it using AttribInterpolate, thank you very much for your help.

I created particle system in DOPs, so I had to create attributes myself (I could not use scatter's prim and primuv attributes.)

I found this thread which helped me a lot. There is example file which explains how to create those attributes (prim and primuv) in PointVOP using Intersect VOP. I then plugged particle system with prim and primuv attributes and deforming geometry into AttribInterpolate.

In example file mentioned above there is also PointVOP version of AttribInterpolate which might be faster (have not compared - just guessing). It uses Primitive Attribute VOP which takes as input primitive number and UV coordinates and outputs any attribute (I need P attribute) on source geometry.

When thinking about paper I mentioned in first post I think it is very similar solution. But not as scary as it sounds

Next challenge would be to port this solution to AttribWrangle which should not be that difficult.

##### Share on other sites

Much simpler then I feared

Into first input goes points with normals, into second geometry at rest postion and into third defromed geometry.

```int primID;
vector primUV;
vector orig = @P - (0.1*@N); // move inside along Normal
vector temp;

primID = intersect(1,orig,@N,temp,primUV.x,primUV.y);

@P = primuv(2,"P",primID,primUV);
```

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×