Jump to content

transform points from static to animated geo


Juraj

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.

post-11577-0-37728300-1424300587_thumb.j

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

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