Giving Personality to Procedural Animations using Math - monstrousmath.com

# Giving Personality to Procedural Animations using Math

t3ssel8r
Views: 1822637
Like: 105380
It’s been a while since the last video hasn’t it? I’ve made quite a bit of progress since the last update, and since one of the things I worked on was some procedurally animated characters, I decided to make a video about the subject. In particular, this video highlights the entire process from initial motivation, to the technical design, technical analysis, and game design considerations.

Codeer’s video on procedural animation:
Semi-implicit Newton’s Method:
Verlet Integration:
Pole-Zero Matching:

Math animations made using the community-maintained version of manim:

Timestamps:
0:00 intro
1:43 second order systems
7:03 implementation
8:55 testing
9:50 stability
13:30 conclusion

Music:
lofi geek – give me
lofi geek – souls
lofi geek – real
lofi geek – two lifes
lofi geek – lights

#SoME2

1. TheArtofPeace says:

I'm glad you shared this video. It's always refreshing to see real feedback and more content about these mechanics.

2. Ed'Gan says:

i have a question… ¿ This math codes can be used in Unity and Godot engine?

3. WolfeyGamedev says:

Very Cool…

Now hand over the code… or else.

4. Michauek says:

-> be a control engineering student
-> tired from exams
-> decided to chill and watch youtube
-> random video contains state-space equations
-> pain

5. draller souldust says:

how I wish this thought was teach in high school and just pretend that our global position is also the same in Math position of X/Y and Z axist hahaha though I don't understand math at all because I have a stupid memory , I forgot every operation and solution lol even in fraction and simple term and operation of multiplying is already gone in my tiny brain

6. Valentino Agazzi Mandozzi says:

name of the game that appears in the beginning of the video?

7. Pablo Bustamante Idro says:

@guinxu con esto matas a alva

8. Britton says:

did not understand a single thing other than maybe fps lag causes stretchiness. but sick video the math you did here is impressive.

9. Miha Leben says:

Ah yes, rain world ai.

10. taylorfisdboss5200 says:

After attempting pre-cal my first semester of college I swapped from a chemistry major to an English major. Math only made sense in the science classes, and I had some rough education on the basic principals of geometry that made mathematics of that ilk really difficult to understand.

I love this though. I had looked at procedurally generating animations for the game I’m working on (I ended up using a bunch of simple tween instead) and this makes me even more interested in that possibility for future drafts.

I may see about brushing up on some more advanced math soon. I’m constantly putting my most advanced algebra skills (and my memory of high school math 😅) to the test when I code. It might be nice to have the tools that would allow me to progress further.

11. Potter Aiden says:

Cooooool procedural animation！Could do you give some code example? =v=

12. Эгос Фейк says:

the ugliness and depreciation of pixel art.

13. Pixels4Games says:

This is so epic. You did unbelievingly awesome job. Much better than I do. I can't wait for more of your videos. Keep up the great work.
– Dan

14. Manuel Maier says:

This is an exceptionally beautiful and very helpful educational video.

15. Theis Egeberg says:

Thank you from the bottom of my heart for this guide. It came at the exact right time for me. Amazing that you sat down to make such a good explanation of something so difficult to understand.

This is a very helpful video in explaining the Euler method in general as well as the basics of control systems.

17. Pedro Daniel Bomtempo Medeiros says:

Amazing!

18. nixtoshi says:

Where can we play your game?

19. Shinsuke Moriya says:

i've been studying to one day understand this video well

20. Richard Rogers says:

Uhhh damn this is awesome. Did you create your own C++ math library for this?

21. Alex Miller says:

Using the eigenvalues of the A matrix of the dynamical representation of the system was genius. Brilliant

22. Maria Cristina Magtibay says:

Im here because of a particular comment on a Video about math maybe I can find something here to make what the comment said come to life Im going to call it e×iπ and it will be a mathematical game similar far but similar to a game called graphwar and you will play as a stickman using creativr equations to fight off the enemy and at the end befriend the enemy and exit the game the main plot or way that makes the players keep playing is the many combinations of equations and mathematical formulas involved.

23. Mark Lucking says:

Watching this video reminded me why i didn't take computer. graphics at university, mind morphing magic… beautifully illustrated by this robot! I love the robot… please tell us what the game is called?

24. Jimmy Yang says:

What did you use for the pixelized render? The graphic is interesting!

25. ender iume says:

It was an amazing video

26. ritsukasa says:

ok whatever but I think inertia is optional in not photorealistic games

27. Baruch says:

Wow the game looks stunning

28. KyleClarke484 says:

Now why didn't they explain in school that these equations, matrices, solving for x, etc. really DID have a use. They were always like "it's more useful than you think" instead of "look at this video". Might've got more people to actually pay attention. What a wonderful video. 10/10 helpful. Thank you 🙂

29. abhinav challa says:

30. Ebeneezer says:

I never thought I'd see control system theory in games.

31. Wasa120 says:

I've thought about this kind of thing, what if I didn't have to animate every frame far down the line if i make a game. This is basically it in words and fully explained.

32. mondobloque says:

Just implemented this in Unreal, increible tutorial, the motion of the robot character its just something else. Thank you for sharing. I was missing this node from VVVV.

33. V says:

Oh my I saw my basic control theory professor's face here

@t3ssel8r Would you be willing to share your final code as well as the Unity editor you show in the video?

35. Richard Flood says:

this melted my brain, my math game is too weak for this video

36. Life on Planet 15 says:

I don't have an engineering or a CompSci degree so Dumb dumb question but I'm getting errors on cosh and Vector what am I missing??

37. Deotexh says:

My brain is not good rn

38. Duh says:

I learned this as an electrical engineer, can't believe I still have to be tormented by it as a game dev

39. Jehriko says:

this is just so cool

40. S P says:

Giving a semblance of personality that is good enough for the people who would confuse the two.

41. Ralfa Ralf says:

Thank you so much. This worked like a charm <3

42. darkvenommusic says:

43. Nour says:

Who are you people? how do you learn these skills to the level that you even explain it that easy to others? I probably need to study another 4 years just to be that good !

44. mercotui says:

aah man, I should have paid attention in college, this stuff is kinda cool

45. gimli gloin says:

giving curve interpolation between A and B

46. 12ken says:

Why no 2nd order equation for the X term?

47. Nathan Dalton says:

My control systems module was finally worth it! Now I can understand the maths in a random yt video!

48. nanoed nanoro says:

The time domain and Space State are one of the many tools you could use for the same purpose. Another way, could be to desing a digital filter (maybe low pass filter) than may match the expected output.
The critical T is the maximum sampling time required for the algorith to function properly. The best you can do when the sampling frequency (1/T) is reduced is not to change second order system but to create a feedback controller that may always stabilize the output. This is a separate system and it could be easier than changing the system from its coeficient. What I meant is do not change the system, but use a automatic feedback control system to fix the problem for you. A typical, well known is the PID controller that is fairly easy to desing. Maybe it could help you to get the solution you want with less memory or computation impact.

49. juutube123 says:

This sounds exactly like the functions used for determining the strength of response from a heating system to the change in temperature in large automation air conditioning systems in large buildings, to make sure that we get to the target temperature quickly, but without causing a vibration-like fluctuation in the temperature that lasts a long time. One term is derivative (strength of response is the derivative of what we are trying to control) and the other is integrative (strength of response is the integration of the difference between the desired value and current value over time) and by using multipliers for each we get pretty much exactly the kind of behavior that you are getting here (there might've been a third, constant term too). That algorithm results in the amount of heating that has to be applied, so in case of movement, it would produce forces.

The reason I'm saying this, is because the algorithms for producing the forces are much less complicated than what you are having to calculate and since it produces forces, it can be used directly with the physics engine in unity. Since that application is pretty old too, the field has come up with formulas that can be used to calculate the multipliers based on how the system behaves, so all the end user wouldn't even have to figure those out, just pick out a type of behavior from a list and the system could calculate the multipliers for them (unless they wanted to control them).

Unfortunately I only know those things in my own language and can't find a direct reference to what I'm talking about. Anyway, if you wish to make a version of this that is usable by the physics engine and a bit simpler, that is where the solution can be found 🙂