Тёмный

Skeletal Animation - From Theory and Math to Code 

FloatyMonkey
Подписаться 37 тыс.
Просмотров 28 тыс.
50% 1

Опубликовано:

 

26 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@FloatyMonkey
@FloatyMonkey 4 года назад
Wow, thanks for the more than 340 subscribers everyone, this really means a lot to me! I wanted to publish this video earlier but I was working on something really exciting, watch until the end to figure out what ;) I'm taking my time to add timestamps to all my educational videos now that RU-vid conveniently shows them in the video timeline.
@richardcesar5546
@richardcesar5546 4 месяца назад
This... This is gold. 4 years old and it is still the best I have found.
@blarghblargh
@blarghblargh 3 года назад
Love that you included the suggestion to use a flattened hierarchical memory layout. Very important perf step that people might skip to make the tree concept more simple, or try to make the "bones" some OO thing.
@bluesillybeard
@bluesillybeard 5 месяцев назад
Holy Moly Guacamole! This is the best resource on skeletal animation that could ever possibly exist. I went from barely knowing anything about skeletal animation to being able to implement it in my own engine!
@Lampfaho
@Lampfaho 3 года назад
Very well done sir. By far the best tutorial on this subject. Thank you
@bartlx
@bartlx 2 года назад
Like 309 came from me ;) Well deserved! Exactly the clear and, all considered short, explanation I was looking for at around 5h AM. Thank you!
@leodaza2151
@leodaza2151 2 года назад
Thank you so much for this video, it helped me solve the matrix multiplication issue for the bones in the graphics engine I'm building
@thejolv
@thejolv 3 года назад
Thank you so much for this video ! You have a very clear way to explain concepts, the visuals are very nice and your voice tone is perfect to keep our mind focus :) Please keep it up !
@martingrof1685
@martingrof1685 9 месяцев назад
Thank you, wonderful explaination!
@santi5655
@santi5655 2 года назад
finally got this working, your video was super helpful thanks
@berthold64
@berthold64 4 года назад
WOW. THANKS! I'm desperately searching for new animation tutorial
@alexkfridges
@alexkfridges 3 года назад
Insanely good video. Keep making these!
@joshuamora411
@joshuamora411 3 года назад
18:22 "With all this knowledge you are now ready to implement skeletal animation into your own game engine" (After I understood 2% of the Implementation block) I need to learn more of them basics (any tips)
@joshuamora411
@joshuamora411 3 года назад
I have 0 idea with coding, looked up how to make Skeletal system for a game. Saw complex ass thumbnail and then: From Theory and Math to Code.. I feel home
@ricopin
@ricopin 2 года назад
Thank you that was exactly the video I needed!
@undefBehav
@undefBehav 3 месяца назад
Great explanation. One thing I don't understand, however, is why do you have to export/import/calculate rest pose bones and `inMatrices` separately, and in local (relative) space at that? Doesn't Blender already provide bone transforms in model (absolute) space per frame that you can directly use to transform vertices? That way, a single matrix multiplication per vertex would do the trick to correctly transform the model, without having to rely on parents appearing before their children in the bones list, or those model-to-local and local-to-model transforms, or anything else.
@FloatyMonkey
@FloatyMonkey 3 месяца назад
Excellent question. That would be possible if you were to play back the animation at the exact same framerate and without any further alterations. When storing the matrices in global space, it is however no longer possible to smoothly blend between animations since this requires local space for the rotations to be correct. In the context of games, blending is used for all sorts of things: to alter the animation playback rate, transition between different animations, perform procedural adjustments, etc. all which benefit from local space. Another reason is that local space often has less fluctuation in its range of values or keeps certain keyframes constant e.g. translation, aiding in compressing the animation data. Hope that answers your question.
@undefBehav
@undefBehav 3 месяца назад
​@@FloatyMonkey Thanks, that definitely helped clarify things! So basically what you're saying is storing transforms in local space makes sense, because we need them to correctly interpolate between keyframes or different animations. I think I was confused because somewhere along the line I remember you saying you wouldn't go into interpolation for the time being. Anyway, it all makes sense now, thank you!
@willfdz
@willfdz 4 года назад
really thank you, i like graphic programing / blender to be honest im not a genius or a decent programer, i was struggling with armature / bones assimp implementation, i research a lot in google but cant get it, but after watching your video i think im start to understading i subscribe
@FuelledByCaffeine
@FuelledByCaffeine 4 года назад
Interesting video, thanks for taking the time to explain it all :)
@FloatyMonkey
@FloatyMonkey 4 года назад
Thanks, and no problem, I love explaining these things.
@crispyowl7178
@crispyowl7178 4 года назад
This is phenomenal!
@xAwesomeLetsPlaysx
@xAwesomeLetsPlaysx 4 года назад
Thank you.
@noahblaine1901
@noahblaine1901 Год назад
I think by leaving out the setup in code of the buffer objects makes this video very incomplete
@aboutvenice
@aboutvenice Год назад
Hi, thanks for the great tutorial. When you mentioned the matrix of animation, we need to use Final = AnimM hand * InvM hand. Does this mean we must change our bind pose back to the original pose(the one we haven't bound yet) and then apply the animation? Thank you.
@lanchanoinguyen2914
@lanchanoinguyen2914 7 месяцев назад
you can use formula: (Vertice-bone)*matrix+bone Or just use the inverse bind matrices.Inverse bind matrix contain the bones themselves so you only need to multiply with them to get back the the origin,the inverse matrix will form an identity matrix when combine with its original matrix that eliminates the unwanted rotations and only translations.But i'm not an expert about this,i use the inversion of bone vectors instead for my system.
@voodoomotion5855
@voodoomotion5855 3 года назад
Great tutorial, exciting to see 3d content entering your own engine. Is it easy to program the bone angles rather than have it all pre-animated?
@FloatyMonkey
@FloatyMonkey 3 года назад
Thank you. Everything is pre animated and then exported from Blender to my engine using a custom Python script. As to why we have to go through all the math to transform from bone to model space, this is just so we can blend between or transition from/to multiple animations. If everything was in world space to start with, the system wouldn't be as flexible and the results might even suffer. Hope that answers your question ;)
@voodoomotion5855
@voodoomotion5855 3 года назад
Thanks for such a quick reply. Yes I know what you mean, it's amazing how well animation blending works. I often animate 3d characters and blending is a god send. What I meant was if you had a bone hierarchy and wanted to directly control the bone rotations with a slider value, is that possible? I think it involves converting quaternion rotations into a matrix and multiplying by it. Was hoping that would be easy to do with your engine? Most openGL tutorials only seem to import the animation. Appreciate any advice you can offer. Thanks again 😊
@FloatyMonkey
@FloatyMonkey 3 года назад
I import the full bone hierarchy so editing rotations with a slider would be possible although it's currently not exposed in the UI. I actually don't use matrices but have a special 'Transform' class, which stores translation, rotation and scale separately. This uses less memory than matrices. Just like matrices you can multiply Transforms although the latter is faster on the cpu. Rotations are represented as quaternions and not as euler angles by the way. So a slider would have to convert from euler angles (more artist friendly) to quaternions (more math friendly). Before uploading to a shader, I convert my Transforms to 4x3 matrices, since gpu's handle these faster. As I said in the video, I will make more videos (about animation) in the future, stay tuned.
@voodoomotion5855
@voodoomotion5855 3 года назад
Thanks for replying, yes that makes perfect sense. Rotations seem simple until you realise the problems and start learning about quarternions! 😂 I built a small simple 3d engine from scratch a while ago but struggled with the parent and local rotations. The math wasn't very efficient, so I hoped to switch over to OpenGL. Another learning curve 😂 I work in animation and have created a few 2d tools that help my workflow but now need 3d calculations. Be great if you can create a tutorial on manipulating a hierarchy with OpenGL. Thanks again, keep up the great work!
@xr.spedtech
@xr.spedtech 2 года назад
Is there a code specification for blender skeleton specs ? I wanted to write code that can directly absorb a .blend/.blend1 file To access the skeleton metadata...
@Retpmus
@Retpmus 3 года назад
Any chance of you sharing your Blender exporter for skeletal animation?
@moises32123
@moises32123 3 года назад
Hey FloatyMonkey, really nice work there. I was wondering if there's any written bibliography you used to create this content, I'm doing a written job and I wanna add some books for this part, thanks in advance !
@FloatyMonkey
@FloatyMonkey 3 года назад
Thanks. Unfortunately I didn't really use any books. It's mostly made from experience.
@CL-pg6iu
@CL-pg6iu Год назад
How can i export the "InMatrices" from blender?
@robertjr.kibble8053
@robertjr.kibble8053 2 года назад
.... I'm sorry but how do you spell _____ concurrency? I need to know. Also your videso are AWESOME
@juliandurchholz
@juliandurchholz 3 года назад
Good video! May I add that what you're referring to as "cache coherency" is actually called spatial locality. Cache coherency describes the consistency of memory across different caches.
@FloatyMonkey
@FloatyMonkey 3 года назад
Thanks! Guess I've learned something today, thanks for letting me know.
@pacifiky
@pacifiky 3 месяца назад
100th like lol but awesome video!
@dr.ozitron2095
@dr.ozitron2095 3 года назад
2:35 his root is quite large :)
@xr.spedtech
@xr.spedtech 2 года назад
Well ... We have a lot in common you and I... Like the fact that we both look like tall toothpick-like males ...
Далее
Practical Skeletal Animation // OpenGL Tutorial #40
13:24
Физика пасты Карбонара 🧪🔬
00:57
Giving Personality to Procedural Animations using Math
15:30
3 Hours vs. 3 Years of Blender
17:44
Просмотров 5 млн
I coded one project EVERY WEEK for a YEAR
13:13
Просмотров 678 тыс.
Coding Challenge 166: ASCII Text Images
22:42
Просмотров 1,1 млн
A simple procedural animation technique
8:31
Просмотров 442 тыс.
Pixel Art Animation. Reinvented - Astortion Devlog
4:41
Realtime 2D Gravity Simulation
12:31
Просмотров 415 тыс.
Физика пасты Карбонара 🧪🔬
00:57