Search Unity

Motion Vector Map Makes Flipbook Animation Flicker

Discussion in 'Visual Effect Graph' started by kayronjm, May 31, 2020.

  1. kayronjm

    kayronjm

    Joined:
    Jun 15, 2019
    Posts:
    32
    I've downloaded the trial of EmberGen, which has a couple of nice presets to play around with. One is a simple explosion, meant to be output as a flipbook animation for Unity and such. For instance, this is a screenshot of my base colour flipbook export:



    And this is a screenshot of my corresponding motion vectors flipbook export:



    The issue I'm having is if I set up my VFX graph with Uv Mode set to Flipbook Motion Blend, and I then select the above motion vectors flipbook (with scale left at 1), the animation flickers rapidly with copies of the explosion appearing from different sides. This happens all the way through the animation.

    These are my import settings (which I'm unsure if they are correct or not):



    I can't find any documentation online about this so I'm wondering if someone has been able to use motion vector maps in their flipbook animations used in the VFX graph. Thank you!
     
  2. kayronjm

    kayronjm

    Joined:
    Jun 15, 2019
    Posts:
    32
    I believe I figured out the problem so I'll post my fix here for anyone who reads this post.

    I misunderstood the VFX graph parameter of Motion Vector Scale, by default set to 1 (which I left as such). I thought this meant the image size itself relative to the animation flipbook, so I thought leaving it at 1 was obviously the correct value. It's actually to do with the speed at which to go through the motion vector map. I noticed the Unity Spaceship Demo used some of these on fires at the end, and I played around with them there. The values used there ranged between 0.1 and 0.4 generally, so I tried this and mine was flickering until I went down to a value of about 0.01. At that point I had a smooth animation, so that's what solved it!

    I'm sure I can do a better job of framing the animation's frames when rendering the flipbooks anyway. This was just a quick test for EmberGen use in Unity, which worked out great. I recommend it!
     
    Last edited: May 31, 2020
unityunity