Jump to content

Lerp() in FEM dent?


shawn_kearney

Recommended Posts

In the FEM Masterclass there is an example of using FEM for denting. In the example the author used a lerp() function to interpolate between the current position and the rest position to prevent the shape from deforming back to it's initial shape. I found that it works ok but had trouble with the interpolation resulting in weird, unpredictable behaviour causing deformation after energy is fully dampened.

I figured that since what I really wanted was the new shape on each frame to simply be the deformed shape, I removed the lerp() function and simply set @restP to @P, and it seems to work and is more predictable.

 So my question is what did the example call for interpolation in the first place?

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