I’ll probably sound like a broken record, but many modern AAA games do stuff like this. They’ll often have a base animation with certain “key points” that they’ll modify the timing and distance too on the fly. For example, bungie does this in destiny for many of their reload animations, since the speed can change, but they want the certain “important” actions to stay at the same speed (like a mag dropping out of a gun)
I remember an example of how not to do it in Planetside 2. The blue faction had an smg which had it's reload speed nerfed and so the unique reload animation was slowed down so much it looked ridiculous.
Yeah, procedural animation is nothing new. It's a very well established discipline of game animation. The vast majority of AAA games use some amount of procedural animation (IK on limbs, for example). Even games like Overwatch, which are known for their pixar-like, hand-keyed animations use procedural animation where it makes sense, like for Lucio's wallride.
yeah this is very commonly used. thats why there is IK. some complex base animation need human key framing but you then adapt it to the environment dynamically.
Interesting to see a non-animators perspective on player animation and feel. Using a procedural solution can be effective but is also very situational, even in something like a fire animation depending on what you are trying to achieve. You may benefit by working with some animators and getting feedback on how your animation feels when seen through the lens of someone who traditionally keys. That could help you achieve some goals that not only make your animation look good, but FEEL good as well.
appreciate the feedback! I would love to have the opportunity to work with actual professionals in the industry someday. There's only so much I can do as a hobbyist
muzzle flare might help tie the bullets to the gun better- when you're moving, the bullets feel disconnected from where you're standing/where the gun is
I use the procedural animations for my weapons sway and ads. I thought everyone does it for the sway. I use it procedurally because I don’t want to spend time on 500+ ads anims depending on what sight you have, barrel you have, grip you have and gun you have.
I find it’s good to make one manual ads animation for iron sights. Then procedurally offset it for each sight. This give a nice feeling add without having to make that many animations
@@arkle111 sounds like a cool idea but do you offset the camera or the arms with IK? I use an IK system because I don’t like the feel of the 2 camera system.
I recommend the GDC talk called "Animation Bootcamp: An Indie Approach to Procedural Animation"... even very detailed and complex animations can be achieved by interpolating the right way between keyframes!
The best results are often achieved with hybrid approaches. You can blend animations and use them as components that you assemble and transform however you need with code to get the detail and expression of hand-crafted animation (or motion capture) and variation and flexibility of algorithmic animation. The Animation Tree is Godot could help!
@@Manimal1920 yea correct. As a hl2 fan who extracts assets and models from hl2 i can confirm. The only place i saw procedural animations were the walk animations on the foor of humans , striders and anything else that walks on grounds
I've been doing this for every fps game i make i do it for the camera i do it for weapons bobbing i do it to animate Ui i even do it to cheaply simulate gravity Cause i feel like I'd rather learn how to simulate every single detail than to hand animate it in blender cause that's super and even if you somehow managed to make a decent animation you still have to somehow make it blend with everything smoothly soo yeah I'd use this method over animating every time even if it comes with the cost of details
Eh, be careful with simulating "everything". A game only need to look like its doing things, ot don't actually need to do it. So a game don't need to have realistic simulated wind in trees, just look like it. You might already know just don't sound good when said that way I personally think a mix of animations and procedural animations is what looks best
In the game I’m working on we have a mix of key frame and procedural generated animation it’s definitely worth doing on a time crunch. And honestly it looks better (because the animations react to things like stairs and bumpy areas in the maps)
That's procedural animation, it's a known thing :) I use it on the helicopter I'm currently building, especially on the mounted machine guns which are a mix of procedural (recoil, movement, bullet belt) and hand animated (reloading movements e.g swapping out the ammo box). It's absolutely a great thing to mix in not only for ease of development but also just good game feel (e.g weapon sway when turning)
In theory you could make a single key frame animation of a pose to interpolate between, which you could get the smaller details in, like the slide of the gun recoiling back.
If you haven't already, I highly recommend checking out David Rosen's 2014 GDC conference on procedural animation. Some of the most time-saving techniques I have ever learned for animating are from that conference (which is only like 20 minutes)
You absolutely can. From the perspective of the engine/rendering code the hand-crafted key-frame animation is just as procedural as the stuff detailed in the video, it's just happens to be defined in more detail.
On a related note, as a fellow indie dev, I do this with sort of thing sound effects too. Instead of having 10 different shooting sound effects for example, I have a single one and just have random variables shift the pitch and volume slightly each time it's played. You could do this with footsteps, gun shots, dropping objects on the ground, pretty much any kind of sound effect you would play a lot and don't want to get grating and repetitive. I found it adds a lot of depth to the sound-scape for very little effort. And I know nothing about sound editing lol.
When you're doing animations in blender, it's not like the computer doesn't do the math for you, it's just that you're doing it visually instead of programatically. What you're doing is basically procedural animation, which I'm also a fan of.
Ive been working on procedural recoil for about 1 year, so its a very tricky thing. First off it doesnt always look great, cause you dont have manual control over curves for rotation and translation, all you have is just interp functions( like lerp or sprint interp). Secondly, frame dependency. Sometimes you procedural animation can look weird or even crash the engine at 10 fps. So I would say that procedural approach for weapon's recoil is limited, very limited. Look at how DICE designed their recoil for bf5 - they are using semi procedural approach, by adding extra rotatuon/translation offset to the existing recoil animation. And it looks and feels pretty well. Combining existing aporoches is the best way to achieve great results I think.
In my personal game, I haven’t made animations yet for any guns, I’m gonna try to use only IKs for gun animations so I save lots of time by making a few extra lines of code
I don't know how to feel about this, in one part this is amazing! This is a very convenient tool for one man projects. But I'm afraid AAA companies catch up and use it as an excuse to underpay their animators :(
procedural animations can be really powerful. mostly animations depend on the visual point of view so you dont need to do EVERY property of x,y,z ex. like for things that are in front of the camera the x and y value are fully enough since you dont percieve z that much from objects that are so close
Would be nice if the procedural animations where also what controls the spread of the gun, the bullet doesn't need to come out of the gun itself, the the gun model can have raycast that tells where your super eye lazer guns shoot at
I think that frame rate and animation are both important. Especially if you want to make them look smooth in ultra-high frame rates. Because sometimes if they aren't done in a certain way, it would look like a mess or a jarring viewing experience.
you can use an RNG to modify animation on the fly. We would call this a Multiplier. You could also RNG the Peak of the recoil animation location. just want others to know that animation can have the same customization on the fly as your procedural animation will have
What I tend to do in big projects like a game, I do the easier stuff and the hardest stuff last. Something like that. What I would do is make placeholder animations that dont look too good, but represent whats happening, then build off of those animations and make them better once you feel like you need to.
well there's a technique that pretty much does the same thing except you do need an animation, once you do. you pick a keyframe(s) and procedurally change it. this is sometime used in weapon recoil, running and any animations that may get looped
I'm sure I'll end up using a bunch of different animation techniques by the time the game is done. Not sure how I would do this in godot, but it sounds useful
From a technical standpoint you are interestingly totally correct the next gen animations are not pre-baked animations but instead are procedurally made animations. They are not using neural network AIs to create locomotion systems based on pre-baked animations so you can just throw some animations at it and then you get an epic game system go check out 2 minute papers he has some great videos on some next-gen locomotion that is procedurally generated.
you can make a simple animation like the guy pulling the trigger, the hammer falling down, the slide coming back and you could sync it up with the randomized recoil for instance. giving you back some flexibility while also having the little details. however that would be a little different workflow i guess but if i had to do it like that, i'd do that instead
This reminds me of the shooting animations in Phantom Forces, which feel a lot like the weapon itself is a fixed object and the accuracy depends on it's recoil and how it handles. For example, the first shot of the weapon is always accurate (if you account for bullet drop) but it imbalances the weapon in a way making the next shot miss, if you don't wait for the weapon to stabilise that is. It's like the weapon is help by springs and the damping and strength of those springs is what makes every weapon handle differently.
This was interesting to watch being a 2d hand drawn animator in training, I do prefer animating most of my animations without the use of code but I do see your point. I'll probably use this from now on for animating more simpler things that are honestly boring and I've redone way to many times, things like the gun recoil, character turns. Tho I do enjoy animating things like runs, jumps etc. Action stuff basically.
Procedural animations is good for prodecural reactions to the environment. Hand animations or good for specific things like reloads or character movements. You can combine the two, like hand animating the bolt cycling on a gun and procedurally adding the recoil as a rotation and translation with RNG.
Would be pretty cool if you made a video about your procedural recoil animations, I imagine you use a base pose + 2 IKs that make the hand fixed to the gun, then in code rotate the gun + translate by random amounts ?
You can also get some great results from doing a hybrid approach; setting up poses in blender and blending between them with different curves in engine. The swinging animations in spider-man ps4 are completely just static poses with super smartly designed curves interpolating from one to another. I believe pretty much all the animation except the foot planting in Overgrowth is also done that way.
I feel like i can a lot quicker make a more detailed and visually appealing shooting animation by animating it than doing a few quick lines of code. Though making nice looking procedural animations takes a lot pf time as well
Video Idea: Another character controller, BUT this time with walking animations and generally animations for multiplayer. (also how to make player walk on planets like in for example astroneer(I figured it myself, but maybe you can come up with better solution))
@@oldfallstorm3064 my previous comment was misleading and this is not the way you should do this instead I used relative position to the center of the planet as vector(ofc with values scaled)
I always thought this is how weapons were coded to begin with. Rather than having an animation for walking and a separate one for swaying and then interpolating between the two, I figured the go-to approach was just basic math governing both. I've always simply used math for my games to control every little detail in their translations and rotations (jogging, sprinting, turning, crouching, strafing, jumping, aiming, basic firing, etc.) and then used actual animations for things like reloading and melee attacks, or other one-off actions.
This is a good explanation of the benefits of programmatic animation, but I'll note that you missed a type of animation at 0:35 - _deformation._ Rotation, translation and scale are scene graph manipulations. Deformation is object manipulation. The difference is pretty stark; basically the difference between Southpark's animation and like... Spirited Away.
1:53 Garbaj: I don't want to do keyframe animation! Also Garbaj: look, I can set 2 poses and the computer will interpolate between them! * *does keyframe animation, but with ✧・゚: *✧・゚:* *_c_* *_o_* *_d_* *_e_* *:・゚✧*:・゚✧* *
btw, I get the difference between the two approaches, but in the core they are the same. It's just a matter of detail and (subjectively) easier manipulation with gui vs fast iteration and flexibility. You could probably do just as intricate animations with code if you wanted to, but it would still require the same workflow as animating by hand: setting a bunch of key poses and adjusting interpolation between them.
Procedural generation is always attractive to programmers, although using it too much can start to look mechanical as statistical patterns emerge over large quantities (like No Man's Sky and We Happy Few)
Actually in some cases i like to mix both procedural and animation? way of animating for example like when ur firing the gun I will make a animation in which the player pulls the trigger and animate the pistol slide and then use a script for weapon recoil both combined make a really solid system
Small suggestion: make the bullets inherit the velocity of the player so they don't drag behind as soon as they leave the barrel of the gun. This is a small but realistic touch as well.
Yeah you basically discovered procedural animation and interpolation (which is actually cool). There's a cool GDC about this. Also in your demo, your gun should slide to the opposite side when the player looks around, in animation this is called follow-through
What i like to do is cut out the weapon components in my 3d software (the moving parts like slides, hammers, magazines, bolts etc) and export them as seperate .obj meshes and then reassemble it in godot, using spatial nodes as makeshift bones containing the seperate meshes. Then you can just maniuplate the child nodes transforms in the animation player to animate the weapon, and they maintain their orientation because they are child nodes of the main body of the firearm.
This could be a good fit for my game. I'm not too worried about the extra draw calls separating the models like that and it would add a lot of extra flexibility. Thanks for the idea :)
@@garbaj Another easy method for a muzzle flash is to make an AnimatedSprite3D, give it a 2d animation of a muzzle flash set to play continuously and then just stick it on the end of your gun and toggle it's visibility on/off through code whenever the gun is fired
I’ll probably sound like a broken record, but many modern AAA games do stuff like this. They’ll often have a base animation with certain “key points” that they’ll modify the timing and distance too on the fly. For example, bungie does this in destiny for many of their reload animations, since the speed can change, but they want the certain “important” actions to stay at the same speed (like a mag dropping out of a gun)
I remember an example of how not to do it in Planetside 2. The blue faction had an smg which had it's reload speed nerfed and so the unique reload animation was slowed down so much it looked ridiculous.
you know...I could actually use that in my game. Not a broken record at all, this is very helpful
Yeah, procedural animation is nothing new. It's a very well established discipline of game animation. The vast majority of AAA games use some amount of procedural animation (IK on limbs, for example). Even games like Overwatch, which are known for their pixar-like, hand-keyed animations use procedural animation where it makes sense, like for Lucio's wallride.
yeah this is very commonly used. thats why there is IK. some complex base animation need human key framing but you then adapt it to the environment dynamically.
half-life (1999) does this
Interesting to see a non-animators perspective on player animation and feel. Using a procedural solution can be effective but is also very situational, even in something like a fire animation depending on what you are trying to achieve.
You may benefit by working with some animators and getting feedback on how your animation feels when seen through the lens of someone who traditionally keys. That could help you achieve some goals that not only make your animation look good, but FEEL good as well.
appreciate the feedback! I would love to have the opportunity to work with actual professionals in the industry someday. There's only so much I can do as a hobbyist
hi sully
The best animation mechanics probably use a best of both worlds approach - Insurgency I'm looking at you!
Damn, didn't know you were still alive...
funny bird viewmodel guy
muzzle flare might help tie the bullets to the gun better- when you're moving, the bullets feel disconnected from where you're standing/where the gun is
yep, that'll get fixed soon, once I get the core mechanics done I can start polishing
@@garbaj maybe replace the movings bullets with just a straight line as well, like that you can more easily set its speed and position
I use the procedural animations for my weapons sway and ads. I thought everyone does it for the sway. I use it procedurally because I don’t want to spend time on 500+ ads anims depending on what sight you have, barrel you have, grip you have and gun you have.
i'd be surprised if any games did sway manually these days, but ya never know
I find it’s good to make one manual ads animation for iron sights. Then procedurally offset it for each sight. This give a nice feeling add without having to make that many animations
@@arkle111 sounds like a cool idea but do you offset the camera or the arms with IK? I use an IK system because I don’t like the feel of the 2 camera system.
@@polar1991 I would just have a parent object to the gun. Then you just add to the y position by the heigh of the weapon sight.
I recommend the GDC talk called "Animation Bootcamp: An Indie Approach to Procedural Animation"... even very detailed and complex animations can be achieved by interpolating the right way between keyframes!
That is, until something entirely unexpected breaks literally everything related to it
The best results are often achieved with hybrid approaches. You can blend animations and use them as components that you assemble and transform however you need with code to get the detail and expression of hand-crafted animation (or motion capture) and variation and flexibility of algorithmic animation.
The Animation Tree is Godot could help!
And it has to be so good that most people will not notice. If you want people to think it is just as good if not better than just fully by hand.
100% controlling a lot of the more mundane animations with code is the way to go! I’ve heard a lot of AAA games do this, especially valve games.
Someone lied to you lol
@@Manimal1920 Yeah I'm pretty sure most valve games use tons of animations instead of procedural, because they have the resources and time to do it.
@@dorious8734 as someone who does nothing but animate for valve games, this is correct
@@Manimal1920 I get to see my heroes in the wild ?? Man, your guys' games are the most captivating of them all
@@Manimal1920 yea correct. As a hl2 fan who extracts assets and models from hl2 i can confirm. The only place i saw procedural animations were the walk animations on the foor of humans , striders and anything else that walks on grounds
I've been doing this for every fps game i make i do it for the camera i do it for weapons bobbing i do it to animate Ui i even do it to cheaply simulate gravity
Cause i feel like I'd rather learn how to simulate every single detail than to hand animate it in blender cause that's super and even if you somehow managed to make a decent animation you still have to somehow make it blend with everything smoothly soo yeah I'd use this method over animating every time even if it comes with the cost of details
Similarly I take pride in synthesizing all my drum sounds from scratch every time I make a piece of music.
Eh, be careful with simulating "everything". A game only need to look like its doing things, ot don't actually need to do it. So a game don't need to have realistic simulated wind in trees, just look like it. You might already know just don't sound good when said that way
I personally think a mix of animations and procedural animations is what looks best
Workaround for reload animations: have every weapon be fed from a backpack belt feed and say it’s a “stylistic” choice
Ah, the ol' "energy weapons" strat lol
In the game I’m working on we have a mix of key frame and procedural generated animation it’s definitely worth doing on a time crunch. And honestly it looks better (because the animations react to things like stairs and bumpy areas in the maps)
The tips and tricks are the key as always. Looking forward towards playing the game.
That's procedural animation, it's a known thing :) I use it on the helicopter I'm currently building, especially on the mounted machine guns which are a mix of procedural (recoil, movement, bullet belt) and hand animated (reloading movements e.g swapping out the ammo box). It's absolutely a great thing to mix in not only for ease of development but also just good game feel (e.g weapon sway when turning)
I'd imagine a lot of games do this - procedural for basic recoil & such, then hand-crafted ones for reloading & whatnot.
In theory you could make a single key frame animation of a pose to interpolate between, which you could get the smaller details in, like the slide of the gun recoiling back.
My man just reinvented procedural animations on its own
Sinewaves make for a nice bobbing animation with essentially only one line of code.
Treyarch: "Quick! Write that down! Write that down!"
Coding animations saves time when you're an indie developer but I love Mixamo since it's pretty extendible once you get a grasp of the basics!
If you haven't already, I highly recommend checking out David Rosen's 2014 GDC conference on procedural animation. Some of the most time-saving techniques I have ever learned for animating are from that conference (which is only like 20 minutes)
Very cool approach. I wonder if you could use a combination of this and key frame animation.
you can!
You absolutely can. From the perspective of the engine/rendering code the hand-crafted key-frame animation is just as procedural as the stuff detailed in the video, it's just happens to be defined in more detail.
We need to have a word with whoever told you to make separate directional sway anims
Theres absolutely no way that anybody working in the industry actually hand made animations for gun sway
On a related note, as a fellow indie dev, I do this with sort of thing sound effects too. Instead of having 10 different shooting sound effects for example, I have a single one and just have random variables shift the pitch and volume slightly each time it's played. You could do this with footsteps, gun shots, dropping objects on the ground, pretty much any kind of sound effect you would play a lot and don't want to get grating and repetitive. I found it adds a lot of depth to the sound-scape for very little effort. And I know nothing about sound editing lol.
AYYYE I SAW MIRROR'S EDGE!
Thanks for the video!
Such a classic game :O
When you're doing animations in blender, it's not like the computer doesn't do the math for you, it's just that you're doing it visually instead of programatically. What you're doing is basically procedural animation, which I'm also a fan of.
Overgrowth keeps coming to mind.
Cant wait to see what direction you will take this game.
Ive been working on procedural recoil for about 1 year, so its a very tricky thing. First off it doesnt always look great, cause you dont have manual control over curves for rotation and translation, all you have is just interp functions( like lerp or sprint interp). Secondly, frame dependency. Sometimes you procedural animation can look weird or even crash the engine at 10 fps. So I would say that procedural approach for weapon's recoil is limited, very limited. Look at how DICE designed their recoil for bf5 - they are using semi procedural approach, by adding extra rotatuon/translation offset to the existing recoil animation. And it looks and feels pretty well. Combining existing aporoches is the best way to achieve great results I think.
Wahahaha the way you said "bullshit" made me lol
Best animations
In my personal game, I haven’t made animations yet for any guns, I’m gonna try to use only IKs for gun animations so I save lots of time by making a few extra lines of code
cant wait to see where this goes!
Ayo just what i needed
That's really beautiful, gotta add that to the bucket list! =D
The best part about this method is that you able to combine with regular animation's
That's good perspective. Thanks.
Man You Don’t Know What You’re Talking About
Animation Is The Funnest Process
I remeber when you had 800 subscribers you really worked hard
@2:26 that exhale says "i been doin that extra work for too long"
The biggest part of programming is to find ways to make the program do it for you
If its lazy but better, I'd say it's elegant ✨️
cant wait for him to find out about frustum culling...
“Deal with all this bs I don’t enjoy” 😂😂
I don't know how to feel about this, in one part this is amazing! This is a very convenient tool for one man projects. But I'm afraid AAA companies catch up and use it as an excuse to underpay their animators :(
They already do this, and they don't need an excuse to underpay animators, they just do it
David Rosen did a great presentation about procedural animation in his game Overgrowth. You can find the video here on UA-cam!
procedural animations can be really powerful. mostly animations depend on the visual point of view so you dont need to do EVERY property of x,y,z ex. like for things that are in front of the camera the x and y value are fully enough since you dont percieve z that much from objects that are so close
Having a red crosshair confuses me because I see enemy as the same colour and I think I'm aiming at one already
There is a nice GDC talk about this by the overgrowth developer. I recommend it!
Would be nice if the procedural animations where also what controls the spread of the gun, the bullet doesn't need to come out of the gun itself, the the gun model can have raycast that tells where your super eye lazer guns shoot at
I think that frame rate and animation are both important. Especially if you want to make them look smooth in ultra-high frame rates. Because sometimes if they aren't done in a certain way, it would look like a mess or a jarring viewing experience.
Thank you.
more than lazy, sounds like a clever way to do it
you can use an RNG to modify animation on the fly. We would call this a Multiplier.
You could also RNG the Peak of the recoil animation location.
just want others to know that animation can have the same customization on the fly as your procedural animation will have
i really like that you don't pad your videos with unnecessary crap just to hit the 10 minutes
What I tend to do in big projects like a game, I do the easier stuff and the hardest stuff last. Something like that. What I would do is make placeholder animations that dont look too good, but represent whats happening, then build off of those animations and make them better once you feel like you need to.
When the imposter is armed 😳
Nice 👍 keep it up
well there's a technique that pretty much does the same thing except you do need an animation, once you do. you pick a keyframe(s) and procedurally change it. this is sometime used in weapon recoil, running and any animations that may get looped
I'm sure I'll end up using a bunch of different animation techniques by the time the game is done. Not sure how I would do this in godot, but it sounds useful
So this is like how animation and transform is done in CSS3!
GARBAJ 120K LET'S GOOO
From a technical standpoint you are interestingly totally correct the next gen animations are not pre-baked animations but instead are procedurally made animations.
They are not using neural network AIs to create locomotion systems based on pre-baked animations so you can just throw some animations at it and then you get an epic game system go check out 2 minute papers he has some great videos on some next-gen locomotion that is procedurally generated.
Ah yes, laziness, something we definitely need more of. Especially when it comes to animation.
you can make a simple animation like the guy pulling the trigger, the hammer falling down, the slide coming back and you could sync it up with the randomized recoil for instance. giving you back some flexibility while also having the little details. however that would be a little different workflow i guess but if i had to do it like that, i'd do that instead
This reminds me of the shooting animations in Phantom Forces, which feel a lot like the weapon itself is a fixed object and the accuracy depends on it's recoil and how it handles. For example, the first shot of the weapon is always accurate (if you account for bullet drop) but it imbalances the weapon in a way making the next shot miss, if you don't wait for the weapon to stabilise that is. It's like the weapon is help by springs and the damping and strength of those springs is what makes every weapon handle differently.
Ok, I want to play Goldeneye again now. Dayum Goldeneye was so fucking good.
This was interesting to watch being a 2d hand drawn animator in training, I do prefer animating most of my animations without the use of code but I do see your point. I'll probably use this from now on for animating more simpler things that are honestly boring and I've redone way to many times, things like the gun recoil, character turns. Tho I do enjoy animating things like runs, jumps etc. Action stuff basically.
sound like a bunch of gibberish but i'm here for it
Procedural animations is good for prodecural reactions to the environment.
Hand animations or good for specific things like reloads or character movements.
You can combine the two, like hand animating the bolt cycling on a gun and procedurally adding the recoil as a rotation and translation with RNG.
Interesting technique. Could you share a code example for this?
Would be pretty cool if you made a video about your procedural recoil animations, I imagine you use a base pose + 2 IKs that make the hand fixed to the gun, then in code rotate the gun + translate by random amounts ?
always think what made us into this humans.......laziness
You can also get some great results from doing a hybrid approach; setting up poses in blender and blending between them with different curves in engine. The swinging animations in spider-man ps4 are completely just static poses with super smartly designed curves interpolating from one to another. I believe pretty much all the animation except the foot planting in Overgrowth is also done that way.
Bro you are doing great in this engine
thank you!
Thanks Please Bring More Such Tricks
You also open up the door for countless bugs…
I feel like i can a lot quicker make a more detailed and visually appealing shooting animation by animating it than doing a few quick lines of code. Though making nice looking procedural animations takes a lot pf time as well
The guys from Wolfire Games did a good presentation on procedural animation, could be worth checking out
Video Idea:
Another character controller, BUT this time with walking animations and generally animations for multiplayer.
(also how to make player walk on planets like in for example astroneer(I figured it myself, but maybe you can come up with better solution))
could you help me how to do this, I am struggling with this.
@@oldfallstorm3064 my previous comment was misleading and this is not the way you should do this
instead I used relative position to the center of the planet as vector(ofc with values scaled)
@@redacted8220 ok
@@oldfallstorm3064 This is very helpful ua-cam.com/video/7axJJYont6Y/v-deo.html
I feel you, I hate animating stuff, so I did the same thing you did here, with lerping, and animation curves for rotation scale and translation :)
I did the same when I was playing around with UE and making an fps.
I always thought this is how weapons were coded to begin with. Rather than having an animation for walking and a separate one for swaying and then interpolating between the two, I figured the go-to approach was just basic math governing both. I've always simply used math for my games to control every little detail in their translations and rotations (jogging, sprinting, turning, crouching, strafing, jumping, aiming, basic firing, etc.) and then used actual animations for things like reloading and melee attacks, or other one-off actions.
This is a good explanation of the benefits of programmatic animation, but I'll note that you missed a type of animation at 0:35 - _deformation._
Rotation, translation and scale are scene graph manipulations. Deformation is object manipulation. The difference is pretty stark; basically the difference between Southpark's animation and like... Spirited Away.
The gun moving in the direction you look is very similar in appearance to Goldeneye 007 on the N64. Maybe Rare used a similar technique 25 years ago?
It's a very common thing lol
@@c0smo709 Probably is now, but GE may have been the first? I don't know but I find it interesting that it hasn't changed much in all that time.
1:53
Garbaj: I don't want to do keyframe animation!
Also Garbaj: look, I can set 2 poses and the computer will interpolate between them! * *does keyframe animation, but with ✧・゚: *✧・゚:* *_c_* *_o_* *_d_* *_e_* *:・゚✧*:・゚✧* *
btw, I get the difference between the two approaches, but in the core they are the same. It's just a matter of detail and (subjectively) easier manipulation with gui vs fast iteration and flexibility. You could probably do just as intricate animations with code if you wanted to, but it would still require the same workflow as animating by hand: setting a bunch of key poses and adjusting interpolation between them.
Procedural generation is always attractive to programmers, although using it too much can start to look mechanical as statistical patterns emerge over large quantities (like No Man's Sky and We Happy Few)
Actually in some cases i like to mix both procedural and animation? way of animating for example like when ur firing the gun I will make a animation in which the player pulls the trigger and animate the pistol slide and then use a script for weapon recoil both combined make a really solid system
Small suggestion: make the bullets inherit the velocity of the player so they don't drag behind as soon as they leave the barrel of the gun. This is a small but realistic touch as well.
you could also use some spring math to make the recoil and other movements better looking and easy to manipulate as well.
Cool, but how did you do it?
Also try inverse kinematics for things like walking animations. Works really well and takes less work
Reminds me of perfect darks aiming
Yeah you basically discovered procedural animation and interpolation (which is actually cool). There's a cool GDC about this.
Also in your demo, your gun should slide to the opposite side when the player looks around, in animation this is called follow-through
cool
so a weapon sway.
I agree, procedural animation go brrrrrrrrrrrrrrrrrr
nice ;D
Usually the hybrid approach is the best, if you have to make 10 slightly different versions of a animation, there's def a way to do it procedular
Garbaj
What i like to do is cut out the weapon components in my 3d software (the moving parts like slides, hammers, magazines, bolts etc) and export them as seperate .obj meshes and then reassemble it in godot, using spatial nodes as makeshift bones containing the seperate meshes.
Then you can just maniuplate the child nodes transforms in the animation player to animate the weapon, and they maintain their orientation because they are child nodes of the main body of the firearm.
This could be a good fit for my game. I'm not too worried about the extra draw calls separating the models like that and it would add a lot of extra flexibility. Thanks for the idea :)
@@garbaj Another easy method for a muzzle flash is to make an AnimatedSprite3D, give it a 2d animation of a muzzle flash set to play continuously and then just stick it on the end of your gun and toggle it's visibility on/off through code whenever the gun is fired
The crosshair should move too. Otherwise it's weird to point the gun to the left or right and still hit the target ahead