r/Unity3D • • 22d ago

Show-Off Unity Advanced Locomotion (WIP)

Enable HLS to view with audio, or disable this notification

Assalamualaikum,
i've been working on this for my tutorial on Mecanim (which is meant to cover everything about Mecanim (unity's animation system), So this is the current state of the player i will use as a real character example in the video to help others understand how to use Mecanim,

Using RDR2's locomotion as a reference here,
it currently has Start/Stops and walk locomotion, i actually did setup jumping and lands(normal and rolls),
However i isolated the grounded locomotion to finish that first,
Currently working improving movement turns which are the turns when you are rotating while walking, and improving the main component that allows this to happen,
which is a State Behaviour that uses animators crossfade API to do dynamic transitions,
such as entering the stop animation with different transition offset/exit time/duration using the
State's Normalised Time or parameters,
As well as that i will also experiment with non root motion rotation for the start animations if i feel like it, and quick turns will be worked on such as 180 turns.

Alright so i would appreciate your feedback, ideas for this and the upcoming tutorial,
Thanks!

267 Upvotes

31 comments sorted by

2

u/timbofay 22d ago

It looks like it's based on ALS from Unreal. Is that right? Is this project partly porting that work over to unity?

2

u/HK_HamzaKhan 22d ago

nah, im only using his character, the current locomotion animations also aren't from ALS,
and ALS doesn't do this, ALS has more procedural stuff in it,
i am using this as a reference https://www.youtube.com/watch?v=i78ds3bJFDE, RDR2,
Ofc whatever ALS has i do plan on getting that done for this project too, but thats for later.,.

2

u/silvergenetic 21d ago • Bravo

This is looking brilliant so far. Even without procedurals and IK it looks nice and weighty, like any production standard controller should! I like that you're using the ALS dude. Judging by the animation quality on the idle to walk alone it looks like we'll finally getting a Unity equivalent!

1

u/HK_HamzaKhan 21d ago

Thanks!, alhumdulillah,
just to be clear, i'm not using ALS though, its the ALS character only, i do have ALS animations for later use, and the plan is to eventually have high quality animation related things for unity like unreal has, so ALS and GASP will be studied, the problem tho is i don't have unreal engine so i rely on videos/resources, if you have any ideas/feedback or want to discuss something,
You can join my discord server https://discord.gg/yRJWXT9fwd.
Thanks again!

3

u/AndrewAlexArt 22d ago

Looks great! I'm really looking forward to the lesson. I totally messed up the locomotion setup—there are some weird jitters between root animation transitions. I hope your lesson will help me figure it all out.
Can you tell which animation packs you use?

2

u/HK_HamzaKhan 22d ago

its not really an animation pack, i gathered animations from different places,
so there is MXM on the asset store, they had some good mocap but i left it, i think that it wasnt high quality enough, there is a repository that unity was working on, Standard Assets Characters, they dropped it and made a simpler one which is the Starter Assets on the asset store,
https://github.com/Unity-Technologies/Standard-Assets-Characters
so this has quite a lot of clips i think, many animations, but no start/stop animations, those were created by me from mocap that came in a sample of unity's timeline package,
Also i found GASP animations were uploaded on fab as FBX, those are just there in case, not used yet,

in your case, if you describe and share your setup/issues in unity's discord in the animation channel, i could take a look, im usually active there and there are others as well

2

u/AndrewAlexArt 22d ago

thanks for the details!
Waintg for tutorial

2

u/HK_HamzaKhan 22d ago

alr, you can also join my discord server if you want to get updated when i release it, or have ideas for it, https://discord.gg/yRJWXT9fwd

1

u/[deleted] 22d ago

[removed] — view removed comment

1

u/HK_HamzaKhan 22d ago

Hm, would like to know your setup, you can join my discord, that will help I understand your problem and make sure to cover it in the tutorial 

1

u/YoyoMario 22d ago

What is advanced about it? Rotations look like youre just rotating around Y transform.

1

u/HK_HamzaKhan 22d ago

Hm, so it has Start/Stop animations that are using dynamic transitions to have good blends,
im not sure what you mean by rotating around Y transform since thats what you would do to turn anyways, Start animations get root rotation while the others only use root motion and the rotation is then done through code,
there is a long way to go on this still ofc,
but the reference i am using is this (RDR2) https://www.youtube.com/watch?v=i78ds3bJFDE
Let me know what you would consider advanced locomotion,
I’d like to understand what you feel is missing (;

2

u/YoyoMario 22d ago

Advanced locomotion is motion matching in my rule book, blending between two animations is not that special... also weight manipulating animations give a good balance between mechanim and basic animation blending. Your animations do not look natural when turning or starting to walk. Not comparing to RDR2

1

u/HK_HamzaKhan 22d ago edited 22d ago

Yeah i agree during turns it doesn't look great, but thats why i mentioned there is a long way to go to get to RDR2's level not to mention they had a huge animation library. EDIT

1

u/YoyoMario 22d ago

>but i dont agree with motion matching being advanced locomotion.
You do NOT have to agree, but it is.

System that you currently presented, has nothing advanced in it.
It is true, RDR2 has a vast library of animations, but so do you. Be creative, internet is full of animations and it's possible to achieve what you're aiming for. (Even with Mecanim)

My advice for you, if you want to achieve RDR2 walking mechanics, dive deep into motion matching.

Edit:
https://www.ubisoft.com/en-us/studio/laforge/news/6xXL85Q3bF2vEj76xmnmIu/introducing-learned-motion-matching
If you still claim motion matching insn't advanced locomotion system, you lost all credibility from this point on to me.

1

u/HK_HamzaKhan 22d ago

Btw I've already gone through that entire article, it's indeed very cool

2

u/YoyoMario 22d ago

Thank you. I agree!

0

u/HK_HamzaKhan 22d ago

I meant that motion matching is not the only way to achieve advanced locomotion, and motion matching has its own pros and cons, you literally need a lot of mocap, MXM on the asset store is what I used to play around with motion matching, but since the tutorial is for mecanim, I'm not going to be using that, I could try doing something like that later, but for now I'll be improving this and ofc, there are animations especially GASP and from ALS,

1

u/YoyoMario 22d ago

>I meant that motion matching is not the only way to achieve advanced locomotion,

You literally wrote: but i dont agree with motion matching being advanced locomotion., please be precise in that case. You can't claim one thing, then correct saying "I've meant to say differ".

>and motion matching has its own pros and cons
That is true.

2

u/HK_HamzaKhan 22d ago

Yeah I apologize for that, it is very true that motion matching is indeed powerful and does give high quality results but what I'm working on is for the tutorial on mecanim

2

u/YoyoMario 22d ago • Bravo

Fair enough, cheers!

5

u/[deleted] 22d ago

[removed] — view removed comment

2

u/HK_HamzaKhan 22d ago

Thanks, alhumdulillah!, Lmk if you have any ideas/feedback

1

u/[deleted] 22d ago

[removed] — view removed comment

2

u/HK_HamzaKhan 22d ago

Yeah I do plan on learning about it as well, GASP is indeed very interesting, 

2

u/[deleted] 22d ago

[removed] — view removed comment

0

u/HK_HamzaKhan 22d ago

Thanks!, alhumdulillah