Unity procedural animation tutorial (10 steps)

Поділитися
Вставка
  • Опубліковано 26 бер 2020
  • I tried to explain procedural animation in 10 steps.
    Check out my twitter: / codeerdev
  • Ігри

КОМЕНТАРІ • 422

  • @acfgcnbjh
    @acfgcnbjh 4 роки тому +1259

    Very interesting! Personally I think this is a good tutorial. Showing code will just lead to copying and pasting, if you're 100% in need of that then subjects like these are already a bit out of your grasp yet. Once you get enough experience you start thinking like "Alright, I could use this function to move the legs, and use raycasts to get blabla" at each step. Tutorials are meant to lift each other up difficult parts, not just show exactly what you need to do to create something that might only work in one enviroment. Nice tutorial!

    • @Chevifier
      @Chevifier 3 роки тому +24

      Yeah i love videos like this that doesnt challenge our intelligence we all know what raycasting is and how to check distance. All this video does is guide us in what to do with that knowledge.

    • @maindepth8830
      @maindepth8830 3 роки тому +46

      yes, but pseudocode would be helpful

    • @rahuls7039
      @rahuls7039 3 роки тому +8

      Then again who are starting new and found this tutorial at that phase then it would blow their mind.

    • @BimzyDev
      @BimzyDev 3 роки тому +1

      agreed! it's also great to see differant approaches to accomplish the same end result. Which is why i love this condensed tutorial. 😅

    • @soronorjspro3516
      @soronorjspro3516 3 роки тому

      These kind of tutorials also help if you are really new to unity but have worked with different programming languages before.

  • @carlosbisa3086
    @carlosbisa3086 4 роки тому +602

    As minimalist as it is, this might be the most helpful tutorial I've ever seen for something like this. Everything is so clear and concise; I love it. Thank you for making this!

  • @syphini
    @syphini 4 роки тому +273

    I seriously admire these kinds of tutorials. I'm not a great coder myself, but I seriously dislike watching someone else write out the code in the video and have it lead to me just copying and pasting without understanding what I'm doing. The trial and error that comes after watching these sorts of videos always feels like it promotes more learning.
    Thanks for the short video and keep it up!

    • @aminoshift1158
      @aminoshift1158 4 роки тому +3

      That is a good point, I've noticed people asking for code on my own channel and on other channels, and that definitely isn't learning. As someone who is still struggling with the basics where do you start? (I don't even understand a c# boolean admittedly. My flashlight script is actually two scripts, one deactivates the light object and one activates the light object)

    • @majorBearsky
      @majorBearsky 3 роки тому

      @@aminoshift1158 you could instead of deactivating the gameObject, deactivate the component that way you wouldn't need to reactivate the gameObject from a different source
      Also you can use something similar to this obviously this is very rudimentary and will most likely have syntax errors but it conveys the message i think.
      If(Input.GetKey("up") && lightBool == true)
      {
      lightBool = false;
      }
      Else
      {
      lightBool = true
      }

    • @aminoshift1158
      @aminoshift1158 3 роки тому

      @@majorBearsky Thanks for the tip!

    • @majorBearsky
      @majorBearsky 3 роки тому

      @@aminoshift1158 No problem hope it was helpful (and not too late)

    • @aminoshift1158
      @aminoshift1158 3 роки тому

      @@majorBearsky not at all! Though I will admit I still haven't learned how to work kinematics I have found simpler ways of animating characters and just built around my skillset, while also brushing up on some coding.

  • @ReplayerTV
    @ReplayerTV 3 роки тому +299

    For a 1 minute lesson I think it gives pretty much everything I needed, this is great!

    • @robbieaulia6462
      @robbieaulia6462 2 роки тому +1

      Except the code

    • @emoneydev8684
      @emoneydev8684 2 роки тому +5

      @@robbieaulia6462 wdym? This tutorial was great it explaned everything just follow the steps and make your own

    • @pyrosnappy7641
      @pyrosnappy7641 2 роки тому +2

      @@robbieaulia6462 yeh this is a excellent framework to work with and provides us a good roadmap to use for ourselves, the rest is easy to prototype

    • @nikistefan6868
      @nikistefan6868 2 роки тому

      @@robbieaulia6462 if you know what you need to code, coding will be an easy task. :)

    • @friendlyneighborhoodmemer18
      @friendlyneighborhoodmemer18 Рік тому +2

      @@nikistefan6868 coding never is easy alteast not for me im only good at graphical stuff.

  • @bujolg4196
    @bujolg4196 3 роки тому +62

    0:39
    sᴍᴀʟʟ
    ₑₙₑₘᵧ
    spider

    • @pchris
      @pchris 3 роки тому +3

      doo dooo doehwehowewheoeoh

    • @jacobhobbs3488
      @jacobhobbs3488 3 роки тому

      Do do dooo do do

  • @mr_hexo
    @mr_hexo Рік тому +23

    This was a very nice video!
    It's not limited to unity and easy to follow!
    Showing the main concepts of something instead of showing exactly how to do it is much better for learning imo!
    We need more tutorials like this!

  • @maxismakingstuff
    @maxismakingstuff 2 роки тому +7

    This is... one of the best tutorials for anything I've ever seen. To the point. Shows the steps in principles rather than just code.. My mind is blown at how good this format is.

  • @SemiMono
    @SemiMono 3 роки тому +5

    I figured out a lot of the stuff in this video a few years back through my own experimentation (minus moving the body based on the leg positions, but also including handling rotational velocity and eventually adding a rudimentary reset "animation"). It took me several days to figure out this stuff that you summed up so neatly in about 60 seconds.

  • @WesleyOverdijk
    @WesleyOverdijk 3 роки тому +48

    This is pretty good. "60 seconds" quickly became three days of learning new stuff haha

    • @Tofos94
      @Tofos94 3 роки тому +1

      only 3 days? took me 6 days😵 but i had to add a lot of stuff. Controller, sidestep, idle pose if you stand still .... :D

  • @lukelader
    @lukelader 3 роки тому +132

    I use unreal and was able to implement all this like how it is, great.

  • @Knuckles2761
    @Knuckles2761 3 роки тому

    That is the best tutorial format. Pure information, no stupid music, no annoying streamer in the corner. Perfection.

  • @ryan.j113
    @ryan.j113 Рік тому +1

    For years now I've been begging to have a tutorial structure for UA-cam tutorials that actually engage the viewer in the lesson, and this is PERFECT.
    As soon as you realize that all of the steps are quite simple, it's up to the viewer to decide how to make each step work, allowing them to exercise problem-solving, and the ability to apply this to their own projects, and not make an entirely new project to try it out.

  • @xxbongobazookaxx7170
    @xxbongobazookaxx7170 3 роки тому

    Amazing tutorial, short and sweet, points you in the right direction enough where anyone could follow without stretching for the 10 mins.

  • @Nika_.
    @Nika_. 2 роки тому

    Such a simplistic yet informative tutorial, honestly as much work as it was, I learnt a lot. Thank you for this!

  • @kh3naz
    @kh3naz 7 місяців тому

    This video was more helpful than all the tutorials I've looked at, it explained the steps so clearly and I was able to build my own procedural rig, thank you

  • @ThefamousMrcroissant
    @ThefamousMrcroissant 2 роки тому

    I really like the concept of a tutorial like this. It just provides intuition on how to go about it, rather than an implementation.

  • @jstra
    @jstra 2 роки тому

    I love this as a tutorial. It shows the concepts instead of the code. I think that's a really good way to teach.

  • @feri3937
    @feri3937 3 роки тому +1

    Wow, I expected a trailer or something for a longer lesson, not the lesson itself. Incredible how much information can be conveyed in such a short time!

  • @devinsmith4713
    @devinsmith4713 3 місяці тому

    Hands down the best *and* shortest video I've seen on this topic

  • @realyunggranny
    @realyunggranny 3 роки тому

    this is a great tutorial, it mirrors my thought process when writing and looking at code and give a general idea of what you wanting to do instead of only showing one way to do it sparks creativity in the programmer to write it how it will work for them instead of trying to adapt things that are written for one specific use and breaking things or having poorly optimized code

  • @rednaweamo
    @rednaweamo 2 місяці тому

    Man, thats exactly what ive been looking for about week! Love you

  • @DarkShroom
    @DarkShroom 2 роки тому +1

    best type of tutorial for experienced people... i didn't have to waste any time at all them ideas in 60 seconds

  • @extracub1974
    @extracub1974 Рік тому +1

    This was a very good tutorial. Taught me everything I need to know about how procedural animation works. Thanks!

  • @johnnyp9727
    @johnnyp9727 3 роки тому

    Dude, best tutorial ever! It's freaking short and easy to understand. I wanted to make something like this since Spore. Thanks to you now I can make my own creatures :D .

  • @Kaasbaas1234
    @Kaasbaas1234 3 роки тому +2

    This prevents copying of code but still gives a clear idea of what you should implement

  • @isawadelapradera6490
    @isawadelapradera6490 3 роки тому

    Beautifully concise yet accurate and complete. Splendid.

  • @IndieGearLab
    @IndieGearLab 4 роки тому +7

    Really nice effect!
    Simple and clear! We need more video like this

  • @barmetler
    @barmetler 3 роки тому +3

    oh wow that's actually pretty easy! I love that this video was as short as it is, no more explanation is needed!

  • @ryan.j113
    @ryan.j113 Рік тому +1

    Please make a playlist of your tutorials. This is exactly the type of tutorial I've been looking for.

  • @jimkeen7674
    @jimkeen7674 3 роки тому

    This is perfect. I was recently looking at some Sokpop games that use a system just like this for leg movement and it had me thinking about how it was done. The part I hadn't thought of was the raycasting part to get the height of the ground where the foot needs to go. Raycasting, I'm learning, is such a useful tool I never use, and really need to make a habit of using. Thanks for the tips. I agree with the other commenters that this is the perfect amount of guidance to give. It makes us learn it more deeply by having to code it ourselves, and it's even applicable to other engines and any coding language or style.

  • @xXYannuschXx
    @xXYannuschXx 2 роки тому +1

    I like tutorials like this! Instead of just putting up code that you wont understand and just copy, this just gives you the logic you need to build with code and objects, making you understand how to convert an idea/action into code.

  • @KevinMcLean
    @KevinMcLean 3 роки тому +1

    At face value, id say this is a really good tutorial and in terms of being more specific it gives you a good idea of things you want to learn first like inverse kinematics

  • @Tofos94
    @Tofos94 3 роки тому

    There was still a lot I had to add. For example, a pose when you stand still. Otherwise it would look weird. It was all so easy to do because you build everything from scratch and you know exactly how everything works. Best tutorial thanks. Took me 6 days :D

  • @user-ct8my8rv9c
    @user-ct8my8rv9c 2 роки тому

    That explained it better than an hour long tutorial. Thumbs up

  • @jdang7175
    @jdang7175 5 днів тому

    The simplest tutorials are sometimes the best ones.

  • @2dinunity10
    @2dinunity10 4 роки тому +1

    I love this and the video style! Awesome

  • @Rkyiel
    @Rkyiel 3 місяці тому +1

    Thank you so much for visualising it more clearly. I know understand it better

  • @sync3471
    @sync3471 2 роки тому +3

    My confusion was raising the foot up and down timed correctly. The solution is spherical interpolation, or Slerp. Basically, it moves one Vector3 value to another, but it does it spherically, meaning that it makes a round trip to the destination.

    • @PranjayMittal
      @PranjayMittal 2 роки тому

      can you please help me with the IK part.

  • @omegaphoenix9414
    @omegaphoenix9414 2 роки тому

    Best tutorial i've seen, keep it up!

  • @Rohan2300
    @Rohan2300 3 роки тому

    Interesting approach. This is quick-and-dirty but very effective.

  • @redpie907
    @redpie907 3 роки тому

    Oh my goooosh 😭😭😭❤️ i love it, i really would like to learn this 😭❤️ so good to see this kinda things

  • @vaepuer2290
    @vaepuer2290 3 роки тому

    Now to figure out how to raycast.. Im so glad I found this though as I've been trying to find a good solution for a quadruped animation that's dynamic to hills and such. Thanks man! I saw your DevLog too, very impressive work ^^

  • @toldfable
    @toldfable 3 роки тому

    This deserves a sub. Awesome stuff!

  • @oyunlarveparodiler3221
    @oyunlarveparodiler3221 2 роки тому

    This was wayy more usefull than i tought.

  • @warpirecords3767
    @warpirecords3767 Місяць тому

    This video helps me think about how to think

  • @doc879
    @doc879 2 роки тому

    This has started me off on a fun project thank you

  • @luckyizzac
    @luckyizzac 3 місяці тому

    much better than watching someone code for 1 hour
    helps to learn too
    Thanks for this

  • @morganlak4337
    @morganlak4337 2 роки тому

    I'm trying to recreate this in Control Rig/Animation Blueprint in UE4, I admit I might be a little stupid but I really struggled to get the "move leg toward point as the distance increases" step. Even now it doesn't look as smooth as you make it, but it works. Thanks for this video, it pushed me over the edge to start working on this stuff and I think once I figure it out it will help my game quite a bit

  • @4.0.4
    @4.0.4 4 місяці тому

    This is an excellent tutorial style which IMO doesn't need "Unity" in the title - it applies to any game engine.

  • @OlinaChang
    @OlinaChang 4 роки тому +5

    Cooooooooooooooooooooool idea!!! I am an animator. Most of time I observe to figure out movements. I always admire how coder thinks in a different way, a world I am amazed with but I can't reach. I will try!

  • @PPLorux
    @PPLorux 4 роки тому +1

    Awesome! Straight to the point! Thank you!

  • @grazeen
    @grazeen 3 роки тому +22

    For anyone that got stuck at step 3-4 at raycast downward:
    dont forget your indicator red sphere set to "ignore raycast" layer
    if you dont set sphere to that layer, your ball constantly go back and forth along ray's path
    i created my indicator ball dynamically so i use this code to set its layer :
    GameObject indicator;
    private void Start()
    {
    indicator = GameObject.CreatePrimitive(PrimitiveType.Sphere);
    indicator.transform.localScale = Vector3.one * .1f;
    indicator.layer = LayerMask.NameToLayer("Ignore Raycast");
    }
    hope this helps someone happy coding :)

    • @peppermint2087
      @peppermint2087 Рік тому

      Türkiyede bu kadar bilgili Türk oyun yapımcısı olduğunu bilmiyordum (at0m prim kasıyor sadece)

  • @blisterfingers8169
    @blisterfingers8169 4 роки тому +7

    Nice little demo of the steps; This is exactly the kind of thing to help you get started when you're first looking in to it.
    Any thoughts on doing this with physics? The body bobs a little in the last clips but I assume that's simulated for the aesthetic effect. I'm thinking about creating a sort of ragdoll and then pragmatically trying to keep it upright but I suspect it won't be that simple, especially when it comes to walking and such.

  • @westomopresto
    @westomopresto 3 роки тому

    We need more videos like this that teach concept rather than show code. Nice work

  • @guyfiber
    @guyfiber 3 роки тому

    Weird i needed this for my game and didnt even search it up it was on my recommended thanks :D

  • @brandonflorian9044
    @brandonflorian9044 3 роки тому

    Thanks for this. I needed this kind of explanation.

  • @notkeehan
    @notkeehan 3 роки тому

    A full commitment's what I'm thinking of

  • @leonardoraele
    @leonardoraele 3 роки тому

    I want more quick tutorials like this

  • @jojikYT
    @jojikYT 3 роки тому

    This video inspired me to make my own IK-Spider and I already implemented rotation :D

  • @GCKteamKrispy
    @GCKteamKrispy Рік тому

    What was very simple and cool explanation

  • @CookieJari
    @CookieJari 3 роки тому

    Hello Mr. Codeer you really inspired me to try and learn unity. Sadly I have deadlines. Keep up the good work veri nice content

  • @davidmartin3772
    @davidmartin3772 2 місяці тому

    Okay, this is what tutorials should be. Thank you for this perfect video. I think the hardest bit to implement is inverse kinematics- but I guess that's made easy with Unity's Animation Rigging package :DD

  • @omicrondelta7327
    @omicrondelta7327 3 роки тому +7

    I love this tutorial. It just gives us the basic idea so we have to do the code and feel satisfied with our own work, instead of just copy and pasting someone else's.

  • @RokrMods
    @RokrMods 3 роки тому

    This is real life magic, short and helpfull! Thanks!

  • @spacedog2980
    @spacedog2980 3 роки тому

    this is how you make a tutorial. amazing

  • @acinaces343
    @acinaces343 3 роки тому

    Great tutorial! Please make more like this where you show the basic steps without just giving the code.

  • @mdaszadqureshi148
    @mdaszadqureshi148 3 роки тому

    its a good tutorial and plz keep making these kind of tutorials

  • @ahmedshihab3266
    @ahmedshihab3266 3 роки тому

    I love this type of information thank you

  • @RenwarAram
    @RenwarAram Рік тому

    Thanks For This Amazing Tutorial!

  • @gamedevboy1181
    @gamedevboy1181 3 роки тому

    I love automatically behaving object like you did :D

  • @PaulAaronCooney
    @PaulAaronCooney 2 роки тому

    Thank you. This was very helpful.

  • @rikardcarlsson3058
    @rikardcarlsson3058 4 роки тому +13

    Hey! This is what i have been looking for a long time! Thank you for putting me in the right direction!
    There is one thing which i cant really get, Its part 7. Put legs in a zigzag pattern.
    If i litteraly put the legs in a zig zag pattern it works for a couple of steps, but then it starts to make this 2 foot jump.
    Should i make a zig zag pattern by code? Like having a sinus wave moving the target sphere back and forth?

    • @Codeer
      @Codeer  4 роки тому +9

      Hey, step 8 should fix that; check if the surrounding legs are all grounded before allowing it to take a step. That way it should automatically stay in sync.

  • @HatPeasyCat
    @HatPeasyCat 2 роки тому +1

    thx you so much. Thx to your easy steps i made it in UE5 even. Super handy video ;p

  • @costincreates
    @costincreates 3 роки тому

    This is exactly what i was looking for! Thanks for uploading!

  • @precooled
    @precooled 3 роки тому +10

    I have been trying to understand this shit for literal years and this is the first video that makes it make sense
    that might be because I'm an idiot tho

  • @ardacosar4797
    @ardacosar4797 4 роки тому +8

    One day ago ı was thinking about how can ı do this. Thank you very much

    • @grazeen
      @grazeen 3 роки тому

      9 ayda neler yaptın hayat nasıl gidiyor?
      (what did you make in 9 months how is life going?)

    • @ardacosar4797
      @ardacosar4797 3 роки тому

      @@grazeen bir mobil oyun projesi yapıyordum fakat askıya aldım, onun için izlemiştim bunu. Fakat sonradan proje başka bir şekle büründü. Bu yüzden prosedürel animasyon kullanmadım

  • @nameno7032
    @nameno7032 Рік тому

    God tier tutorial

  • @zakkaioken2812
    @zakkaioken2812 2 роки тому +1

    andreas made a good point, but I honestly didn't get anywhere using this tutorial alone this is more of a guide than a tutorial because if you don't already basically know what to do this isn't helpful

  • @ampmunkey
    @ampmunkey 3 роки тому

    you're a wizard dude....

  • @boxitor9355
    @boxitor9355 3 роки тому

    YOU ARE A LEGEND

  • @dev1611
    @dev1611 3 роки тому +2

    @Codeer I've figured out all of it except the the rotating body based on difference between leg heights. Could anyone please point out how the angle to be rotated can be calculated??

  • @thereadypunk757
    @thereadypunk757 2 роки тому

    I love this style of tutorial. Its forces one to actually do work, and not just copy the code shown on the screen without understanding. I'm currently learning a lot while making a 2D physics based version of this. Its quite satisfying to watch.

  • @jenrl5633
    @jenrl5633 11 місяців тому

    this should be the way that all tutorials should be! I was able to make procedural walking not in unity, but in rec room!

  • @snoanashi1597
    @snoanashi1597 Рік тому

    Thank you so much for this!

  • @castlecodersltd
    @castlecodersltd Рік тому

    Nice, thanks for sharing ☺

  • @gianlucafiorini
    @gianlucafiorini 3 роки тому +1

    I finaly made it, all the steps beautifull lesson, i am just with a little problem when i walk too fast the feet almost cincronize, the velocity of the step is totaly related with the velocity of the body?

  • @isto_inc
    @isto_inc 3 роки тому

    Just discovered this. I LOVE this. nice stuff

  • @MithiSevilla
    @MithiSevilla 3 роки тому

    Really cool thanks for sharing

  • @werewolf4259
    @werewolf4259 3 роки тому

    I think that's the best tutorial i've seen in my life

  • @videoactif
    @videoactif 3 роки тому +2

    Thank you very much for this video. I try since a while to reproduce it and with the help of another video ( the spider tutorial) I finally succeed to make the foot lifts up. But I have a question, do you set a point attached to the body as IK target of the leg, or is it a point on the ground ? Regards !

    • @PleaseWait...
      @PleaseWait... 3 роки тому +1

      how did you make the leg lift up localy??? which video you watch

  • @k4keshaw
    @k4keshaw 3 роки тому

    this is really great

  • @southpawdevelopment
    @southpawdevelopment 3 роки тому

    so simple! thank you

  • @mohammedthaier1718
    @mohammedthaier1718 3 роки тому

    Great job!

  • @clarkkent1473
    @clarkkent1473 5 місяців тому

    Who knew it was this simple o.o

  • @umadbroyo2388
    @umadbroyo2388 3 роки тому

    What I love is that you show what I need to do and what it will achieve. Just looking at code works but only for 1 time solution and you dont learn much...

  • @nOograss1
    @nOograss1 3 роки тому

    super explanation thanks alot :D

  • @No573N
    @No573N 3 роки тому +1

    Thank you very much, bud. Everything else I came across is fecal matter. This tutorial really helps. Much appreciated.

  • @gianlucafiorini
    @gianlucafiorini 4 роки тому +7

    how to choose the leg of the first step, beacause when using 2legs in the same axis they move together if i use the is grounded techinique they stop moving, i try to put one leg in front of the other and then it worked but if move to fast they end up in the same axis again and stop.

    • @modprog
      @modprog 3 роки тому +2

      You should store the state of each Leg (moving/grounded) in a variable, that way when the first wants to start moving, the second leg knows that, even though the first leg is still on the ground.

    • @Tofos94
      @Tofos94 3 роки тому

      i had a boolean for every leg (inAir)... if an leg is in the air every other leg is blocked and they are not allowed to do a step until the leg is ending his step

  • @amalgjoseph1458
    @amalgjoseph1458 2 роки тому +1

    Legendary videos are mostly short 😙.

  • @RecombobulatedStuff
    @RecombobulatedStuff 4 роки тому +1

    This is very helpful but how did you get the leg to move up and over to the target?