"Step by Step" Procedural Animation
HTML-код
- Опубликовано: 3 фев 2025
- Full length course on control rig: www.udemy.com/...
Discord server centred around procedural animation: / discord
Free download of the spider model: / lincolnmargison
More coming soon, subscribe, follow, all that jazz.
1:33 Open paint :> .
3:24 Create Control Rig file, set Pelvis.
5:49 Animation Blueprint: Set Control Rig
7:30 Set first leg.
11:00 Set settings for all legs
13:41 pelvis
19:13 individual index.
20:32 Calculate velocity
25:30 to world location.
31:37 Random.
33:00 Foot timing.
55:32 Calculate average
spiders don't have paws
why?@@elektra81516
@@Vaneko911 I did it for myself, I needed a structure so that I could return to the right moment whenever I wanted. But I'm glad it helped others.
@@shion1364 thanks. I was actually about to the exact same, and also put it into a comment so my work wasn't wasted just on me. Thank you for your service. Also, spiders don't have feet either. "Paw" is recognizable. Some people take their misery out on others, I guess.
@@Vaneko911they’re doing more than you are so what’s the issue?
😢that photorealistic drawing blew me away , ur drawing skill is Noice
i've read your comment first THEN saw him drawing the photorealistic spider and I lost it
I hope you're kidding. That spider is far from being photorealistic. It's missing it's eyebrows!
@@xKeraysame
@@666thmoabis your pfp a bomb or a zeppeline?
@@googoogly its a moab from bloons td 6
"let me know in the comments and I'll delete it" Underrated humor right there.
Also: "Excuse the lag on the recording (...) but you get what you pay for"
Love that extremely dry humor.
We need more content like this. Such quality deserves recognition. Well done.
Holy shit dude, thank you so much for this.
Not only was it a fantastic intro into control rig, but you also talked about the methodology in a way that was easy to understand.
Do not ever even think about deleting this video, I tried making exactly this and I failed, then I saw your awesome video! Please also show the spider tutorial in blender, that would be awesome!
I never ever thought of doing this until today so this video is an amazing drop! You even dropped the 3d model! big thanks!!
It's awesome that you made this. Thanks!
Currently studying to become a technical artist and wanted to dive into procedural animation so this is exactly what I've been looking for! 10/10
What a great tutorial, thank you for breaking down the control rig a little bit. It's pretty hard to get an idea about the potentials of control rig and you brought some light into this room
For anyone sturggling to figure out why the imported skeleton won't stick to the ground, just delete the import PhysicsAsset. Took me about 2 hours to stumble into that solution, lol.
Thanks, that saved me 2 hours.
I think this should only affect things if you are simulating physics? Which we aren't in this tutorial. Maybe I'm misunderstanding the issue.
@@LincolnMargison Maybe the physics asset is overriding something? Because i had the same issue and deleting it helped as well. At the stage at the start where you did Sphere Trace by Channel, the spider wouldn't snap to the ground. Deleted the physics asset from the content drawer and it fixed it right away.
ur my god, that saved me 2 hours too.
@@Sh1nshon istaghfiroluh Allah bro wtf ?
You're really good at drawing "photorealistic" spiders. Can you make a tutorial on how to draw next? Bits aside, incredibly helpful tutorial just like the control rig gun tutorial you made. :]
I've been looking for a good guide like this! Looking forward to more content like this!
I'm loving your great course on procedural animations, thank you so much!
This was one hell of a ride but the end result was so worth it! Hopefully in the future you could create more procedural animation videos for like sticking to walks!
The absolute king of spiders in unreal engine, everything worked fine,
thank you ♥
Your tutorials are really good on some very complex topics
And the humor, A+
This is so inspiring. Thanks for taking the time to make this video!
Wow, dude thank you so much for putting this up, this is exactly what I've been looking for!
Great work, breakdown, and end result. Been hoping for something like this ever since I saw your "Procedural Walk System" teaser video. Take my sub!
What a beast of tutorial!! Looking forward to your new deep dives, learned really a lot, really appreciate it
Awesome tutorial! thanks for posting this. procedural animation is on my "must learn" list. I was using the simple procedural walk plug-in up until now and although that works well I wanted to do something a little more bespoke for my current project. I'm using 5.3 and so far so good.
Awesome tutorial, best explanation I have found so far for foot IK! Wish there were more of this kind of "step-by-step" tutorials! thank you for your time making this!
Thanks you for this. That debug line tip is something i have been desperately needing!
One of the best tutorials out there. Fantastic work man, thank you.
Loved this Tutorial! You clearly explain everything and I learned quite a bit. :) Can't wait for more. Couple suggestions: Add chapters! At almost an hour this is an epic length tutorial. It is really hard to navigate if you mess up and need to go back to an earlier part. Also, slow down a tad. Particularly near the end you really sped up. For someone who doesn't type quickly it was hard to keep up.
Amazing tutorial! I learned so much here as it's my first time with control rig. I did it with 5.2, and as already mentioned the main difference is that the "Construction Event" replace the "Setup Event". Otherwise everything works perfectly. As you said at the end of the video, a tutorial for the Blender rigging part would be great! Thanks for your work!
Thanks a million!
You are a God and i wish nothing more than endless happiness to you, keep it up, you don't know how much you're helping ppl!!
Holy shit Thai video is amazing bro keep up the great work and I promise you your gonna grow big in absolutely no time 🔥
That final scene reveal was a big old jumpscare, god knows why I want to replicate this as a big arachnophobe! Thank you for the in-depth tutorial, I'm hoping to take this knowledge and apply it to my own little critters.
Giant. Enemy. Spider. *Starts singing*
very very very cool and honestly not too hard if you have some patience. Was able to do this in a couple of hours. Ran into some of the same problems others did in the comments but rest assured they are all solvable with some research and going over things with a fine toothed comb.
Thanks for making my project 10x cooler.
Thank you god of the Algorithm to show me this Masterpiece right in the moment wher I need it 🙏🏽
58:05 love that kind of humor, like
This is such a good tutorial. Been meaning to get into procedural anim in Unreal. Keep it up!
Really brilliant! Many thanks Lincoln
Recreated this successfully thanks!
Thanks for the video, leveled up my control rig understanding :)
if you get to the end of this in 5.2 and your mesh starts sliding forward, clamp the value you plug into average location on the return in CalculateAverageFootLocation between something like 1 and 150. I got errors that the value wasn't normalized. that's the fix. you can also use the hit normal in a vector to vector quaternion to automatically handle the rotation for you as well
Hey, i am using 5.2 as well and cant find the set bone transform in the beginning. How did you find that node?
@@urielnequiz986 Just search Set Transform. Then you can set the type to bone in the node itself.
Thank you ive been looking for a video like this one
this is just amazing !!!!
thanks a bunch for making this mate. cheers !
I'm using 5.3.2 - the foot timings are increasing by delta time, but the "set at" after the branch in the CalculateNewFootTargets won't reset them back to 0 for whatever reason - it just keeps increasing infinitely. Does anyone know of a different way to accomplish this?
sup, check if my comment above might be related to your problem. I also had issues with this function.
set at doesnt work, so right after your set ats, just set the foot timings variable with the value from the set at.
@@MasterPiffy can u be more specific pls? i cant put the foot timer back to 0, it will always increase for me too.
@italianjack there is no elaboration thats all there is to it. Set you variables after the set at nodes.
did u solve this? :)
Thanks for the chalk and talk, really appreciated.
This is the only tutorial that I could find Thank you so much
Thank you so much for your generous sharing,This tutorial is the best I have ever seen.Please keep creating~~❣
Thankyou for this guide so far im really enjoying it, however at around the 31:00 min mark I'm getting an error a few others have in the comments and cant seem to solve., even after you fix your compile errors. "Array Index (0) out of bounds (count 0)." I think it has something to do with the "WorldTargetFootLocation" Array being out of range or inaccessible or something.. Any help would be really appreciated!
Ok restarting the editor fixed it... strange!
@@Ty0_art Since UE5, I had this kind of stuff. The simplest ">" would always return false somehow
I also had this issue. Restarting fixed it because prior to the restart, the Return node in the IncreaseFootTimings function was in the loop (Lincoln also fixes this at 35:12). Restarting the editor automagically connected it to the 'Completed' pin, fixing that issue!
@@AntiCheatBot was stuck at this for hours holy shit finnaly thanks for explaining so i know what not to do in the future
this is weird, was trying to find out what I did wrong, then saw this thread, and checked all return nodes, but nothing worked. then just restarted the project, and then the error was gone.
UE5.3 Update
- Debug: ControlRig.EnableDrawInterfaceInGame 1
- Rig Node: Use "Construction-Event" Node replace "Setup-Event"
thanks alot,I really come up with a lot of problems in 5.3,
CalculateVelocity don`t work.
Thanks
If u not seeing the debug line in UE 5.3+, u will also need `ControlRig.EnableDrawInterfaceInGame 1`
Just bought the course, seemed like a no brainer. 10/10 tutorial!
Exactly what I wanted! very good stuff
I laughed way too hard at "And now we can see we've made a squid."
This was great - made it to end... mines a jittery but good nuff lul. Wish I had a blueprint png to scrutinize to find my failures
I would also be very grateful if you could provide an image of the blueprints. I dedicated a few days and followed the steps, but I didn't get the same result.
Hi, I have a problem at the minute 33:57 with the "Foot Timings and the Current Foot Index -> At -> Greater than 2 -> branch", the At give me problem "Array Index (0) out of bounds (count 0)". Someone can help pls??
Restart your editor, but I'm sure you've already done that by now.
I have the exact same issue, don't know what to do
You can right click on your skeletal mesh(skeleton), and create a control rig from that :). Save ya a step. Also, @5:38 I connected mine exactly as yours, and it did NOT pop to the floor!!! Mesh, is also not snapping to the floor :(
great tutorial but for some reason at 36:00 my set at foottimings array does not set the given index to 0 anyone know how to fix this cheers
nvm just had to reset unreal for some reason
28:48 i still get an error
Great stuff ! Just one question : Can it work with, let's say , a creature which has more than 3 joints in its legs ?
Sure, but you'd need to use something other than the Basic IK node. EG Fabrik, or FullBodyIK. FullBodyIK probably will give you the best results
got it, thanks,, I'll see what I can do !
did they get rid of the setup event? im not finding it.
Update: they replaced it with construction event, and if the editor crash when you hook anything up to it, go verify your build of unreal engine.
thank you, was just encountering this!
Yeah construction event replaces setup. I think searching 'setup' still finds it. I hadn't encountered the crashing issue but good to know for future reference.
UE versrion 5.3 "Set at" FLOAT variable not workig... Other vars working. This bug
Yeah just had the same issue. Did you manage to find a work-around?
Edit: Resetting the Editor fixed it.
@@bass-dc9175 что за сброс редактора? и использовал to int * 100000 :D
@@bass-dc9175 What is Resetting the Editor&
Great!
I have a suggestion. Instead of creating lots of variables to make a correct index you can use search for bones with a name containig "foot" and only after this make a loop command without making branches. Index of loop will be fine.
Lots of problems in 5.3: Arrays must be dynamicaly created - otherwise they cause error. 36:43 get worldlockedfootlocations - the array is empty - causes problems. Still stucked here, because with empty array all legs aim towards zero
Damn bro. Keep up the good work.
Hi there! I had the problem with "Array Index (0)" bug, so I reset the editor and indeed it fixed the errors, but after that the foot location got locked to the world position and they stopped moving forward (It looks like in the 20:16 moment). Does anyone had similar problem? (I'm on unreal engine 5.3.2).
I'll take a look into it, someone else had a similar issue recently. I wonder if there's something about the array updating method or logic that has issue on 5.3.
I might make a followup video to explain some tweaks that can be made to improve the process.
@@LincolnMargison Thank you for the respond! Your videos inspired me to work on Procedural Animations in general 🤓 I might not finish this tutorial now, but I am continuing with your course for human characters💪 Looking forward for any updates!🥰
That would be great! I'm also stuck with this bug.@@LincolnMargison Thank you anyway for thew great tutorial :)
Awesome, thanks a lot for making this! Lost it at the squid lol
Incredibly amazing.
I've gotten to the 37:10 mark and while it was mostly good there, I started getting issues with the legs splaying out in the opposite direction. Do you know why it might do that?
Hi! Thanks for sharing such a powerful technique so accessible. I have a problem with Foot timing calculation. For some reason array elements don't set from its own function at all, so I moved the calculation right into CaculateNewFootTargets, before the branch. But values I receive from delta time added to cached array element are too small, and never become greater than 0.01xx. Looks like the array doesn't cache the previous value and just writes a new value from delta time on each call. Any advice on how I can beat the issue?
I've found the issue, apparently they changed the behavior of "Set at" node in the increaseFootTime function (it went from passing by reference to copy), to make it work you have to add a Set FootTimings and connect the array to the result of Set at node
@@fabiomorini4281 Hey, sorry I don't quite get where this fix goes? Can you help some more please, picture perhaps?
Thank you for this!@@fabiomorini4281
G'day - hope this helps@@Wiljami3D . What works is everytime there's a 'Set At' node in tht tutorial, you need to add another node which is a 'set' (variable), ie. foottimings directly next to it, link the execution pin to the 'set' and link the array out link from the 'set at' to the array in of the 'set'. It helped me but you have to find them all. I found one in IncreaseFootTimings function (add a set FootTimings straight after the Set At), and a few in the CalculateNewFootTargets function: A new 'set WorldFootLockedLocations, a new Set FootTimings, and a new SetWorldTargetFootLocations after each of the relevant 'set at' nodes with the input array matching those I stated. In short, everytime the tutorial uses as 'set at' node, also add a 'set' node by dragging in the array variable and link the output of the 'set at' to the input of the 'set' then continue the execution as described. Hope this helps a few - I got stuck here for a few days! \m/
Every time i do that the whole engine crash :(@@fabiomorini4281
this youtube recommendation..i dont know why im watchin this, but dayum, this is interesting xD
how much of processing power does this cost in comparison with traditional animations?
I've not done specific comparisons but it's all run in the same way as animations are through the animBP (which I believe is a separate thread), so it's performant. I think the only time you really notice any slowdown is with loads of linetraces. You could probably slow it down with some huge loops too.
So far for anything I've used it for, it's been negligible performance loss.
@@LincolnMargison
How do I add pre-made animations to this system, like attacking or jumping
Let me get something to eat while watching this video
Can i download the blueprints for this?
its possible make full procedural animation locomotive system for human? crouch, run, walk etc?
If you see my other videos, I'm working on something like this. It's definitely possible, but also some added difficulty with humans
@@LincolnMargison you make some tutorials?
@@plasid2 I will do, but I think it'll be more conceptually explaining how it works rather than step-by-step, so this video is to show the basics
@@LincolnMargisonI actually really like this approach as opposed to just doing a step by step "plug this here, and this there" type tutorial. I want to understand the thought process behind it so I can adapt it to my needs, this is exactly what I'm looking for, I cant wait to see more! Thank you Lincoln!
@@CosmicComputer Good thing will be series, few episodes step by step and autor will get more sub and views
Brilliant tutorial!
This was such an awesome tutorial, but the control rig only seems to be working when within 15000 units of 0,0,0. Am I doing something wrong?
UPDATE: For anyone having the same problem, increase the greater node at 50:17. I don't know why but this part makes it so it can only be so far from the 0,0,0 in world.
As soon as I move it farther than 15000 units the legs stop walking and just start twitching. and he just slides around instead of walking.
@@GlassGameDev Weird, I don't think I experienced that when I tested it on a large level, but perhaps I didn't go beyond that distance. Maybe some mistake in the logic at that timeframe. It *should* just be clamping the velocity that it adds on, to a reasonable value. Maybe when saving the velocity there's some mixup with world vs global space or something. Thanks for pointing it out + the fix
Hi, I was wondering how you were able to drag the spider model forward while the game was running? Do I need to set anything up here?
@@痕迹梁 hit f8 and you will kind of exit your player character and enter a free fly mode where you can manipulate the scene
you have to hit simulate then select the skeletal mesh on the viewport and from there you can move it@@痕迹梁
Can we get a updated version for 5.4?
Video is very helpful indeed. Thank you muchly
For the sake of avoiding getting into bad habits, running a string search in a loop that's running every frame (for every instance of a creature) is absolutely a horrible idea
For sure, but for time constraints I did it this way. Ideally I'd recommend adding them/naming them in an array but that's less dynamic, so the alternative would be the save the references or names after the initial search on construction.
In the udemy course on the topic we do it the latter way, but for this 1 hour video I kept things simple. But you're absolutely correct.
Does it also comprehend the switch from world to local position as well? Big up for the content 🙌🏽
Brilliant tutorial! Please make more like this😄
Hey there! I see you published this a while ago but i have areally quick question that coud help clear up my understanding of global vs world space. At about 22:35 you set a variable after converting it to world space, but then directly compare it against the value before its conversion. Therefore, you are comparing values that live in two different spaces. Can you touch on that? Would you not want to compare the values all in world space?
Bro all things aside i love your drawing skills like best easy han total mess free.
Please help soon. I cannot figure out how to do this on a two legged creature. specificially at ~8:44 getting the pull vectors right and stuff
I think I replied to this elsewhere (perhaps in the discord?) but essentially the pole vector is the direction that the knee wants to point. So if your primary and secondary axis is correct, you just want to set the pole vector to some position off in the distance, that is in the direction that the knees (middle of the two leg bones) should be pointing.
In the case of this tutorial, it was always just upwards, because the legs bend 'up', but for a human it would be forwards (unless their feet are rotated).
@@LincolnMargison Thanks. How do I get the Primary/Secondary axis right? I tried so many values but it seems something is always off and it acts up.
yess please show how to make spider in blender (and how to import properly to ue5 if you dont mind)
The command a.AnimNode.ControlRig.Debug 1 does not appear to be working in UE 5.3. The debug line does not draw.
Yeah saw that. Not sure about a work around either.
Good Job
10/10 stopped me from pulling my hair out
podrias refinar el tutorial, que me quede en una parte y de ahi no pase a lo siguiente =(
goat
I don't know what to say. I'm newbie in all of this and this "control rig" makes me crazy as shit. Video lost me somewhere near 33:30 where i'm trying to attach CurrentFootIndexLocal to GetFootTimings in the node At. System writes an error "Array Index (7) out of bounds (count 0)" and not compiling at all. I reviewed video several times and can't find the difference. This broken shit exhausted me completely. What can i add if when you're compiling the blueprint it suddenly can't go through and after you're "shaking" your monitor, the code succesfully compiled...
P.S. Using Unreal 5.3.2, looks like in every new subversions this plugin gets new view...
this was some serious hardcore wizardry. your kung fu is strong
How would you approach making that spider walk on walls and ceilings?
That would be more a blueprint (or C++ if you prefer) problem. The animation system essentially (with a minor tweak I think?) would work for this. If the foot traces trace 'down' relative to the character (not world down, but rigspace down) then it wouldn't matter if the character was oriented upside down or whatever, it would trace the right direction to the surface.
As for how you'd do it in BP/C++, it definitely has its complications. Rotating the correct direction when shifting onto a wall is a little hard to figure out (eg. if the wall is on the right, you would 'roll' counter-clockwise, if the wall is straight in front, you would 'pitch' straight up). Tricky math to get all that to work. The second main issue is with collisions. If the character capsule is a sphere this is a lot simpler (rotation makes no difference on the collision with a sphere). But if it's some other shape, you would have to make sure that during rotating onto a surface there'd be space for the rotation to happen without the character intersecting the floor.
Then there's a bit of stuff to figure out with the actual movement component, to make them move along walls. I think unreal engine has a movement mode built in that has 'spider' movement where you can traverse walls but I think it needs a lot of work/messing with to get it to be useful. Alternatively you could just use your own system for movement using traces and such.
There are plugins on the marketplace that do it all though, which you could use and incorporate with the proc animation side of things. Or look at for reference for how it works to recreate it.
@@LincolnMargison Thanks a lot for this answer!
I have a few ideas on how to approach it, I'll try some.
I did use a free gravity plugin before, it might just work with a few tweaks.
@@Helgrind44 Yeah I've used some free one before. Think in the promo video it showed the character walking around a sphere and such. That one seemed to work well for whatever I was using it for at the time.
Would the pelvis bone be used for the normal mannequin or a person with 2 legs? Or would we need to use a different bone
does this tutorial also work for spiders with more than just a thigh, calf and foot bone? the model im using has 4 bones in each leg and the legs on mine have buckled into the centre underneath the spider ?
For more bones, I'd recommend using the FBIK node rather than BasicIK.
would you able to apply this to a humanoid locomotion? this is a great video
Not this exact process, but similar. I'm making a full length course on that topic
@@LincolnMargison oooo. Im currently trying my damn hardest to translate this tutorial to my humanoid character model and its a little janky but its actually mostly working. If you have a cleaner BP for humanoids ill be greatly looking forward to the tutorial. This has been really helpful for getting my head around whats happening programming wise. I dont have a coding background, I have an art background. So rigging has been a rather frustrating process.
in my case when my humanoid thighs dont move with the legs, any solutions for that? :/@@krysc96
How to make it crawl on the wall or upside down??
Hello there. I have some issue at 18:43. When I plugged Element in to Translation. It's said "DISPATCH_RigVMDispatch_ArrayGetAtIndex::Array:TArray,Index:int32,Element:FVector': 'Array Index (0) out of bounds (count 0)" . How do I fix that error. I'm using UE 5.4. I think they are change something logic that new version. Hope you will update news if they are change. I'd love to your course step by step. Because I don't rarely use procedural animation in unreal
The approach used in this vid is more prone to that error/bug, but it happens from time to time regardless. Just try pressing compile a few times, and if that doesn't work, close and restart controlrig. If *that* doesn't work, restart the editor.
Will be updating this comment as I go
at 04:09, If you don't see "Set Transform - Bone" that is ok. When you add "Get Transform - Bone" add the transform to the value found in "Set Transform - Bone" and everything will fall into place.
How?
Get it? Step by step? Because it's walking animation?
On a serious note, very good video
Really, thanks for that tutorial! Though, I still have some issues with the "CalculateVelocity" function : when I move on X axis, the vectors goes on -Y, and when I move on Y, it goes on +Y and it seems to be good on Z.
Thank you again, it so hard to find anything on procedural animations, you're really make some people save a lot of time!
I'm not certain what the issue is you're describing, but Y is 'forward' within the global-space. I'm not sure if that depends on how the character is created or not, but I don't think so. Maybe some confusion being caused with control rigs 'global space' as opposed to world-space?
I think i know what you mean, I've spent hours trying to find the cause of weird body movement, in your CalculateVelocity function just switch setting calculated Velocity first and then set the PreviousWorldLocation.
Edit: i regulated the body movement but now the legs are not rising at all, i hope i'll find a solution for both..
@@LincolnMargison I have the same issue, I am using the UE4 mannequin. At the 26min part of the video you are making the calculate velocity function. With the UE4 mannequin, the feet move in the X direction when I move in the global Y direction, and they also move in the Y direction when I move in the global X direction. The mannequin movement componen has the forward direction as the X - axis. Do you have any idea how to fix it?
@@dcad6934 Hmm it's not an issue I've come across, and I've also been using the UE4 mannequin. If I'm understanding correctly, and the mannequin is facing down the X axis, you could set an import transform of 90 degrees in yaw and that may possibly correct for it.
@@LincolnMargison an u show that for unity c#
this tutorial is super sick. I'm trying to follow along, but somehow my spider is sliding everywhere along the way. did anyone encounter this / know which part i should back track to?
Do you mean the feet are sliding along the floor? If so, this could be a bunch of things, but essentially the feet should be being set to a world location and stay there (unless being lifted). So either the feet are lifting/moving too often (make sure the feet are correctly 'cycling' from moving to stationary), or you're not getting the right location - perhaps missing some conversion "From World" or "To World". Hard to guess any more specifically as it could be caused by a few different issues.
@@LincolnMargison Well, now they're kind of stuck and not moving up as frequently. Going to pass through this tutorial again and see if i can identify it. They aren't lifting often enough, so I think it's where they're being set that I made a mistake.
@@LincolnMargison okay yay it looks a lot closer to yours! unreal crashed once or twice and connections got deleted in the process. I'm going to reskin the skele and try it out with a different character and share the results >:3
@@indira4435 Sounds good, feel free to link it here when you do
18:24 i am having truble on this, i get a compiler error on the array, apparantly the array never gets updated to it remains empty, but i cant figure out what it is that has been done wront, i had to use a Construction event instead of the start thingy of yours due to updates i supose.. any help?
The construction event is just a renamed Setup event, so that will be fine, but sometimes the compiler errors get fixed by restarting the editor, or in some cases just recreating the array.