Search Unity

VFX Graph morphing animations

Discussion in 'Visual Effect Graph' started by marcnon, Apr 6, 2022.

  1. marcnon

    marcnon

    Joined:
    Sep 2, 2021
    Posts:
    7
    Hey there,

    I just try to morph an animated mesh smoothly to another one like in this video


    I achieved to get the animation on the mesh running via a skinned mesh renderer component inside the VFX Graph. This works fine. But how can I morph to another mesh since just exchanging the mesh results in popping the particles immediately to the position of the other mesh. So how can I get a smooth transition to the new position?

    Cheers, marc
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    Did you try moving them towards target position, for example like it does Mathf.MoveTowards?
    Instead of setting position directly from mesh/map you would move them just a bit towards target position or you can use velocity to simulate attraction or other more complicated stuff.
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I want to do a similar thing, isnt there a simple youtube tutorial that shows how?

    In my case my 3 objects to morph into each other are not animated, just static meshes, does that make anything easier?
     
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    I would probably do something like this:

    You evaluate two positions, one for first skinned mesh, second for next one - using two sample skinned mesh nodes.
    And lerp between this positions using some arbitrary time.