Distance Matching Locomotion : Giving it a shot!

Any progress on this amazing technique? : )

Hi! Can you share the presentation file? Thank you in advance!

Guys, how do you retrieve time from “DistanceCurve” by distance value?

Yes :slight_smile:

Here You go!

You have to look in selected animation sequence for curve, which you named and for taken distance looking for proper time.
Look at this video: https://www.youtube.com/watch?v=yP4ygKHwlS0

Video or didn’t happen ; D

Be patient :slight_smile: :wink:

Hey! Thanks for video, but I know how to start animation from specific time or get curve value from current playing animation. I need to know how to access curve in animation and its keys and values for searching time for starting animation from. Sorry for my English, still in beta :slight_smile:

Little tip: Deep dive into Engine Code, You will find almost everything You need.

Do you mean “AnimationSequence->RawCurveData.GetCurveData”? It’s not working in builded project :frowning:

Check UAnimSequence::EvaluateCurveData for reference. It implements two paths: bUseRawDataOnly, which uses RawCurveData, or CompressedData.CurveCompressionCodec->DecompressCurve(CompressedData, CurveUID, CurrentTime). This second option might be what you are looking for.

Try “AnimationSequence->GetCurveData().FloatCurves”.

Nope, this is won’t work in build too (UE 4.24). I have an answer from Martin Wilson:

FAnimCurveBufferAccess

For example, code below works in build:


 float UCustomNodes::GetNumSamples(UAnimSequence *AnimationSequence, FName CurveName)
{
    checkf(AnimationSequence != nullptr, TEXT("Invalid Animation Sequence ptr"));

    FSmartName CurveSmartName;
    AnimationSequence->GetSkeleton()->GetSmartNameByName(USkeleton::AnimCurveMappingName, CurveName, CurveSmartName);

    FAnimCurveBufferAccess CurveBuffer = FAnimCurveBufferAccess(AnimationSequence, CurveSmartName.UID);
    return CurveBuffer.GetNumSamples();
}
 

I still playing with it, but I think this should works fine!

2 Likes

*** New Update ***
Please keep in mind like always, that is still WIP, thanks.
Any sugestions are welcome. :wink:

Watched on mobile, so possibly not the best advice.
@ 104, it seems like its jumping frames.
I would use a longer blend time

also, no idea here but are you timing the planting animation based on which foot is currently leading?
basically if your left foot is down, then the animation only has to adjust the right foot and viceversa.
not sure if that’s happening or not.

slight glitch at 120. Not sure what that was or if its reproducible.

everything else looks pretty ■■■■ good until the end shuffle. I think that’s like I mentioned before just a blend time thing.

as a side note.
I have used TwinBlast for a couple sample videos myself. Any idea what’s up with his motion blurred clothing? Looks ridiculous, however since I don’t intend to use him in a final project I never bothered looking into it.

This is very good for normal speed. If i am going to nitpick, i would slow the video to 0.25 speed.

Turn off Motion Blur in project settings )

That’s not really a solution. The problem is specific to the clothing on twin-blast. I have custom clothed assets that don’t really have this issue, in the same project.

Thanks [USER=“3140864”]MostHost LA[/USER] for your very useful feedback like always.
No i don’t, it is orientation warping and ground friction set to 1.5 when moving and changed to 6.0 ~ 8.0 when pivot turning.
Motion blurred happens to me on another character (Sparrow) aswell, but
but it does not appear in 4.21 version.

I know how to fix these glitches, so…
stay tuned for another video and new features. :slight_smile: :wink:

@pickersZ Do you need a slower video or can you do it on this? :slight_smile:

@ Show us your work, please. I’m very curious. :slight_smile:

I have nothing to show yet, except this

I got stuck on time calculation for animation start. I currently work on solution with FAnimCurveBufferAccess. I’m not c++ programmer and c++ makes me cry)

It looks like solid base. Do you calculate each postion via BP or C++?
What about time calculation for animation start? What is wrong?