Announcement

Collapse
No announcement yet.

Distance Matching Locomotion : Giving it a shot !

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Distance Matching Locomotion : Giving it a shot !

    Hello, decided to look into distance matching locomotion over the last two weeks and here are the results.

    The Paragon presentation from Laurent Delayen was trully an inspiration!

    Last edited by MaximeDupart; 02-20-2019, 10:09 AM.
    LinkedIn | Link custom Shaders in 4.21 | Atmosphere Modelisation | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

    #2
    Awesome!! any chance to share the code or some tips?? I'm very interested in this!

    Comment


      #3
      Oh i'm open to talk about what i've done and how to set it up on your own. As far as code sharing not so much, still spent a couple serious hours on this.
      Yet, Epic might distribute their own solution as mentionned a couple times on stream anyway.

      I think the hardest part is to solve the first order derivative equation of the characterMovement component, to predict where the pawn will stop/Pivot.
      Highschool math right there, otherwise it's rather straight forward:
      1. Compute Distance to point
      2. Search the animation file' distance curve for proper time to be at
      3. Play the animation on single frame mode and provide the time you found as input
      4. Repeat
      Last edited by MaximeDupart; 02-22-2019, 01:41 PM.
      LinkedIn | Link custom Shaders in 4.21 | Atmosphere Modelisation | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

      Comment


        #4
        Thank you for sharing this. I watched epic's original stream when it first came out. This has been on the todo list ever since. Need to get serious about this soon.
        UE4 Tutorials for 3rd person Blueprint project from scratch: Youtube Channel
        Use Blender 2.8 to make UE4 compatible animations: Blog

        Comment


          #5
          Hi! How to get value from animation curve at specified time? I know, that I need to implement this method through c ++

          Comment


            #6
            Originally posted by gipovalik View Post
            Hi! How to get value from animation curve at specified time? I know, that I need to implement this method through c ++
            Not sure it's answering your question properly, but in C++ , given a UAnimSequence pointer, you can access the curve data by calling GetCurveData()

            http://api.unrealengine.com/INT/API/...etCurveData/1/

            Then accessing the actual float curves by acessing... FloatCurves , then iterate trough curves while checking their displayname and access the curve you want:

            Code:
            void UMagicAnimInstance::Tralala(UAnimSequence* Sequence)
            {
            
            FRawCurveTracks CurvesOfAnim = Sequence->GetCurveData();
            TArray<FFloatCurve> Curves = CurvesOfAnim.FloatCurves;
            
            for (int i=0; i<Curves.Num(); i++)
                {
                    if (Curves[i].Name.DisplayName == "DistanceCurve")
                    {
                      // Do Magic with Curves[i].FloatCurve.Keys[].Value
                    }
                }
            
            }
            LinkedIn | Link custom Shaders in 4.21 | Atmosphere Modelisation | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

            Comment

            Working...
            X