10 mins GameDev tips - Quaternions

  Рет қаралды 103,167

sociamix

sociamix

3 жыл бұрын

In this 10 mins GameDev tips we are going to explore Quaternions in an intuitive way. Don't expect deep math derivations. However after watching this video you should have a good mental picture on how they could help you dealing with rotations and orientations in your game projects. I will start by describing euler angles and their issues following by a visual example of how quaternions works (using blender). Then we are going to see different applications of them in C# using unity.
Quaternions on wikipedia: www.wikiwand.com/en/Quaternion
Complex numbers on wikipedia: www.wikiwand.com/en/Complex_n...
3BlueOneBrown Visualizing quaternions: • Visualizing quaternion...
Quaternions for computer graphics - J.Vince: www.amazon.com/Quaternions-Co...
Ken Joy lecture: • Quaternions
Unity Quaternions doc: docs.unity3d.com/ScriptRefere...
Godot Quaternions doc: docs.godotengine.org/en/stabl...

Пікірлер: 154
@felipecarlin8540
@felipecarlin8540 3 жыл бұрын
This is by far, the best explanation of quaternions on youtube. I can't believe youtube didn't recommend it to me!
@sociamix
@sociamix 3 жыл бұрын
Thanks :)
@zeyadjy7229
@zeyadjy7229 3 жыл бұрын
me too
@larrystone654
@larrystone654 2 жыл бұрын
+1!
@Chubzdoomer
@Chubzdoomer 2 жыл бұрын
Came down here to say the exact same thing. No other video has broken them down as "gently" and intuitively as this one!
@Ryan22_7
@Ryan22_7 Жыл бұрын
.... and I am here to agree with everyone that this is the best explination on KZfaq.
@orckine
@orckine 3 жыл бұрын
THE BEST EXPLANATION, I WAS TRYING TO UNDERSTAND THIS FOR SO LONG, AND NOW I ALREADY FEEL LIKE A MASTER, THANK YOU
@CosmicComputer
@CosmicComputer 3 жыл бұрын
Hands down the best overview of quaternions I’ve ever seen, thank you so much.
@rockasstley7917
@rockasstley7917 3 жыл бұрын
I am glad that I found this video! This is really pure gold for us beginners.
@mikelock6931
@mikelock6931 2 жыл бұрын
Like everyone else has said... this is the best explanation of Quaternions around. The guy is a fantastic tutor. Well done!
@JakeSidSmith
@JakeSidSmith 3 жыл бұрын
I have read so many articles, and watched so many videos about quaternions, and nothing has helped me quite like this video. No crazy math equations or single letter/Latin variable names, just simple visual examples. Amazing stuff! There was something about the images/example at 5:00 that just suddenly made me get it. Thank you.
@corryunedited8154
@corryunedited8154 Жыл бұрын
Yeah, I think that is the closest I've come to understanding this concept.
@klauskinnunen7404
@klauskinnunen7404 2 жыл бұрын
Finally I feel like I undestand how rotations work, thank you so much, best and clearest video I have ever seen about quaternions
@souravdey1227
@souravdey1227 3 жыл бұрын
The best explanation of quaternions till date. Crisp and clear.
@jabadahut50
@jabadahut50 11 ай бұрын
Did not understand Quaternions at all until I found this video, and now I totally get it. Why no one figured out how to explain them as weights of other rotations till now is beyond me. This makes so much more sense than all the other math of how it's supposed to work.
@dftpunk
@dftpunk 6 ай бұрын
Can't believe I was struggling with quaternions and rotations for 2 weeks a month ago and have just got this video as proposed. Anyway, watch from the beginning till the end. Nice work. Thanks!
@GoddamnSuperhero
@GoddamnSuperhero 9 ай бұрын
Other people have said it, but yes this is the most intuitive explanation of quaternions I've ever seen. Very impressed. I've used quaternions without fully understanding what any one value truly meant, knowing roughly the scaling of spheres example from 3 blue 1 brown. Appreciate the insight.
@duskjk1258
@duskjk1258 2 жыл бұрын
Thanks! been working on circular motion for about a month and now I finally found the solution.
@man9mj
@man9mj 5 ай бұрын
after understanding the math of quaternions, this video cement the concept in a nice visual way. Excellent work!
@ivan_3578
@ivan_3578 2 ай бұрын
Big thanks! You are the only one who said key thing about the difference between orientation and rotation!
@AC-mw3tz
@AC-mw3tz Жыл бұрын
Finally, and thanks to your explanations, I UNDERSTAND the quaternions. Thanks, man.
@bluemodize7718
@bluemodize7718 11 ай бұрын
I really like how you explained somthing really complicated simply
@DevranUenal
@DevranUenal Жыл бұрын
After so many years, I finally understand it (The Teapot part helped!). Thanks!
@noumankhan167
@noumankhan167 3 жыл бұрын
Amazing Explanation man , you cleared some of my doubts that I had for months
@purplegoop1247
@purplegoop1247 2 жыл бұрын
the teapot explaination was really good, that alone made quaternions intuitive to understand
@HateSonneillon
@HateSonneillon 2 жыл бұрын
Definitely the best explanation I have seen by far.
@jz9991z
@jz9991z 6 ай бұрын
A extremely well explained video. Honestly this helped a lot
@thewriter3727
@thewriter3727 2 жыл бұрын
I found what I was looking for at 9:14's example I like this, in the Unity answers and forum stuff, it's hard to tell where to put the code. With this example, it works basically anywhere, which is what I was wanting. I'm glad you made this video, it's really helpful. I'm going to edit this comment to see if it worked later. Have a good day! Edit: It worked! All I had to do was remove the asterisk, change the if condition to the event I wanted, and change the rotation to what I was wanting. Thank you so much for helping!
@firestorm_2048
@firestorm_2048 Жыл бұрын
Incredible video! Probably the simplest explanation on youtube
@varunaiyar6214
@varunaiyar6214 2 жыл бұрын
Best explanation of Quaternions on KZfaq, glad I found it soon :)
@p3dee
@p3dee 7 ай бұрын
It's simple to understand. Thanks for a great explanation.
@bertani6134
@bertani6134 3 жыл бұрын
This is too important man! Thanks for sharing!!!
@MerkMD
@MerkMD 5 ай бұрын
I watched so many video try to understand Quaternion, this vid is the only one so far that make me understand.
@womeesoxkwi2689
@womeesoxkwi2689 3 жыл бұрын
Wow very cool video! Quaternions makes sense now
@pokoro97
@pokoro97 Жыл бұрын
Knowing that you can multiply quaternions with vectors saved me. Thanks!
@chenni8759
@chenni8759 3 жыл бұрын
Amazing! Very well explained, thank you so much!
@Kaiymu
@Kaiymu 7 ай бұрын
Purée merci. Ça fais des années que j'ai du mal à saisir les quaternions ! C'était très clair !
@nicks4727
@nicks4727 Жыл бұрын
Great explanation!
@moheyaldeenalmardiny82
@moheyaldeenalmardiny82 3 жыл бұрын
That's something I really needed thanks a lot man
@user-qr5wo2gb3h
@user-qr5wo2gb3h Жыл бұрын
good explanation, now I know what to expect from quaternions
@AndresJesse
@AndresJesse 3 жыл бұрын
Excellent! Clear as crystal! thanks!
@DubZenStep
@DubZenStep Жыл бұрын
Best explanation out there. Thank you man!
@chrisharden7033
@chrisharden7033 2 жыл бұрын
Excellent explanation!
@sevazakharenko8176
@sevazakharenko8176 11 ай бұрын
Great explanation!!
@erinlucassen
@erinlucassen 16 күн бұрын
Best video on quaternions ever!
@sundarakrishnann8242
@sundarakrishnann8242 3 жыл бұрын
Amazing video! Thank you so much!
@crogersdev
@crogersdev 3 жыл бұрын
Great explanation! Thank you so much. If you're in France, next time I go there I owe you a chilled Orangina.
@RemiStorms
@RemiStorms 3 жыл бұрын
Excelent video on Quaternions !!!
@jacobkamen9265
@jacobkamen9265 Жыл бұрын
Great video! Thank you
@JoostKiens
@JoostKiens 3 жыл бұрын
Really good explanation! 🙏
@ssojyeti2
@ssojyeti2 2 жыл бұрын
great video. now, time to put this knowledge to work!
@jimbotht1091
@jimbotht1091 3 жыл бұрын
Mais c'est que c'est très intéressant tout ça, merci, j'en redemande
@dylantb619
@dylantb619 Жыл бұрын
This is extremely helpful!
@lucasloisance9566
@lucasloisance9566 3 жыл бұрын
Merci beaucoup, tu as illuminé mon esprit :)
@davidmurphy563
@davidmurphy563 2 жыл бұрын
Great video. "Euler" is pronounced "oiler" btw.
@josephmorales652
@josephmorales652 2 жыл бұрын
Incredible video!
@mariegrasmeier9499
@mariegrasmeier9499 7 ай бұрын
Thank you so much. Still not getting my head around it completely but have the feeling to understand much more than ever before now. Want to understand this since I tried to simulate a crane in unity and totally messed it up using Eulers 🙈
@mz00956
@mz00956 3 жыл бұрын
Thank you so much. I never understood them until now.😅
@AlexandreCoulonOldChannel
@AlexandreCoulonOldChannel 2 жыл бұрын
Merci infiniment, je pensait pas que j'allais si bien comprendre, comme quoi quand on à le bon prof c'est beaucoup plus facile^^
@nofacee94
@nofacee94 4 ай бұрын
Finally, a clear explanation.
@31618doremi
@31618doremi Жыл бұрын
best explanation ever!
@binhql
@binhql 2 жыл бұрын
Exellent video!
@thedebapriyakar
@thedebapriyakar Жыл бұрын
I cried after watching this. Thank you.
@ctobi707
@ctobi707 3 жыл бұрын
THANK YOU THANK YOU THANK YOU great video i finally understand this witchcraft
@enjoybro4515
@enjoybro4515 2 жыл бұрын
thanks so much it help me a lot
@nattherman7321
@nattherman7321 2 жыл бұрын
ima have to save this one, thanks
@jaimetheone9150
@jaimetheone9150 22 күн бұрын
The last one, the quaternion multiplication seems to be the answer to a camera rotating around an object or a point!
@biny_749
@biny_749 3 жыл бұрын
merci beaucoup sociamix 👌👌
@Jono1982
@Jono1982 3 жыл бұрын
extremely useful please make more tutorials
@pleison111
@pleison111 Жыл бұрын
This is pur gold!!!
@graphic-nations
@graphic-nations 3 жыл бұрын
thank you its amazing
@luckyyo7287
@luckyyo7287 3 жыл бұрын
good course!thanks
@CaCriGuz
@CaCriGuz 2 жыл бұрын
Thanks mate!
@pegmen3609
@pegmen3609 2 жыл бұрын
amazing..other quaternion explanations are nonsense until you watch this video....its shows how they must have been derived from a real world application..not the other way around
@hafizuddinmohdlowhim8426
@hafizuddinmohdlowhim8426 2 жыл бұрын
You are a genius!
@zeyadjy7229
@zeyadjy7229 3 жыл бұрын
I really lost the passion for game dev because I don't understand how quaternions work and how to use them, thanks a lot I hope u do more examples on quaternions use cases in unity
@akshay3538
@akshay3538 3 жыл бұрын
this is very well explained, Thank you
@sociamix
@sociamix 3 жыл бұрын
Thx :)
@graphic-nations
@graphic-nations 3 жыл бұрын
amazing thank you
@f3rn4n2x3str3ll4
@f3rn4n2x3str3ll4 3 жыл бұрын
BEST! Thanks!
@qbytez5006
@qbytez5006 3 жыл бұрын
Thank you!
@tejasbele1456
@tejasbele1456 3 жыл бұрын
Thank you so much
@FuranA7x
@FuranA7x Ай бұрын
Thanks!
@charlieblank3393
@charlieblank3393 10 ай бұрын
I searched for basically this EXACT video for ages and NOW it pops up in my recommended and I don't even need a degree in physics? Crazy.
@denisgoodman4492
@denisgoodman4492 2 жыл бұрын
Very Good explanation, But in last slide will be good to add that qB*qA*VectorA qA*qB*VectorA AND qB*qA*VectorA that means - the VectorA rotate on qA and after rotate on qB PS> !!! The relation between length Video and Volume of information is the Best (... and very good links *3BlueOneBrown* )
@agastyavalisetty8620
@agastyavalisetty8620 2 жыл бұрын
a good video always comes after i complete a project on that topic, your video would have saved me at least 10 daysand also all the frustration, that how da frik was unity so smooth and not arduino (arduino was stoopid, I still don't know the solution, it works tho)
@user-kg9hw6jv2g
@user-kg9hw6jv2g 3 жыл бұрын
thank you) best French English ever)
2 жыл бұрын
It’s hard for me to understand deeply this concept ( mainly speak French) but this is the most clear video on quaternions over KZfaq. For a school project, we want to simulate the rotation of the moon around the Earth by using Python, quaternions and maybe Blender but idk if it’s gonna work. Do you think it could be achievable?
@gamedever
@gamedever 11 ай бұрын
You definitely can use Unity. Yes I replied one year late. Sorry about that.
@josepgc1183
@josepgc1183 2 жыл бұрын
I owe you my life
@DevMarco-
@DevMarco- Жыл бұрын
Coming from Euler rotation like many others I guess the hardest part to get in my head is that xyz are not representing an axis. If quaternions would use abcd instead it might be easier to grasp from the start.
@emanueol
@emanueol Жыл бұрын
great video. Im wondering how to code flight simulator where player can Pitch (rotation on X), can Roll (rotation on Z) and can also Yawn (rotation on Y) .. imagining XY as screen axis and Z axis perpendicular to screen). Imagine if player simultaneous press key to Pitchdown (10 deg) and also press key to roll (30 deg), my understanding is to have simple a orientation quaternion (initially player looking into z with no roll and no yawn so initial Orientation = Quaternion Euler( 0,0,0); now my struggle is how to represent the 2 movements since order maters right ? thanks so much
@theman7050
@theman7050 8 ай бұрын
Thank you very m7ch for making sense and not making just another rocket science video about euler and quart. I wonder why other tubers lack this basic IQ that If you are "teaching" something technical on youtube, you have to begin from the ground up and treat your audience like 5 year olds and I am sure a majority of viewers are changing profession and dont have scientific background. Goshh
@danielhancock4992
@danielhancock4992 3 жыл бұрын
Nice
@alicewithalex
@alicewithalex 3 жыл бұрын
Thank you) Make more content, you have great videos , but long delay between videos :) Good luck
@ahmedaghadi8281
@ahmedaghadi8281 3 жыл бұрын
4:03 so what if we always rotate with respect to x,y,z axis and not rotate with respect to object itself.
@ridespirals
@ridespirals 2 жыл бұрын
great video, thanks a lot. and maybe you know this already, but Euler is pronounced "oiler"/"oy-ler" not "yooler"
@legendfpv
@legendfpv Жыл бұрын
It's an accent.
@alexanderwinn9407
@alexanderwinn9407 Жыл бұрын
@@legendfpv It's a common mispronunciation, among people of all accents. "Euler" looks like it should be "yoo-ler," similar to "Ferris Bueller." But it's actually "oiler," like "someone who oils."
@user-hc2mh5lt5p
@user-hc2mh5lt5p 7 ай бұрын
I wonder that, When match two random coordinate system, it is needed to maximum two normal rotation with two axis vector. but some quaternion (especially multiplication of two rotation quaternion made from each axis/angle) can do match them. I think and wonder combined quaternion has ability that apply two rotation to vector in parallel. it is like spinning top in axis is rotated in axis.
@aru1814
@aru1814 Жыл бұрын
I have two irrelevant questions: 1. What is the name of the bgm song? 2. Where I can find the open source of arrow prefab? Btw, thank you very much for the easy explanation!
@xthene
@xthene Жыл бұрын
the euler rotation system is based on a parenting structure , e.g. X > y > z ....this is the part i don't understand: why a child - parent structure is necessary in euler system? why can't the 3 axes be able to rotate independently in euler system? what's the catch?
@alexanderheim9690
@alexanderheim9690 Жыл бұрын
3Blue1Browns interactive videos state that quaternion rotation is double covered. Which would mean that your statement at 5:40 is wrong.
@angeldude101
@angeldude101 Жыл бұрын
You are correct. There are two ways to reach any given orientation: clockwise or counterclockwise. Ultimately there's not really a difference when just doing the full rotation, but the difference matters a lot when interpolating, since the choice of target quaternion determines whether you take the short route or the long route. It's also important in quantum mechanics since as strange as spin-1/2 particles are claimed to be, quaternions themselves are also effectively spin-1/2 themselves.
@lukay6230
@lukay6230 3 жыл бұрын
other tutorials were overwhelming me with 4th dimension, but based on this, I think its simply vector XYZ and W is resting vector "importance"? I may not undertsand it well, but I understand it more after this video
@angeldude101
@angeldude101 Жыл бұрын
Pretty much. The w component is a weighted scalar 1, which just says how much to _not_ rotate. 4 dimensional visualization is absolutely not required. Once you accept that quaternions are fundamentally 3D objects despite having 4 components, then you can begin to understand how they relate to complex numbers as well as other hypercomplex systems (like the dual-quaternions, which have 8 components, but still ultimately represent 3D rotations in addition to translations). In the complex number a + bi, a is just how much to not rotate, and b is how much to rotate around the origin. It's not really a vector at all much like how a quaternion isn't really a 4D vector.
@sheikhg1900w
@sheikhg1900w 2 жыл бұрын
In short. Thank You very much.
@alexmattyou
@alexmattyou 3 жыл бұрын
Thankyou for the video, I know that you're Blender and Panda3d user by your models
@adamabbott2014
@adamabbott2014 Жыл бұрын
Hi, i'm confusing about transform.postion = quaternion.euler(0,90,0)*diretion. how is it working
@NoobsKaFan
@NoobsKaFan 2 жыл бұрын
How to set rotation to desired x y z values by code
@cxob2134
@cxob2134 Жыл бұрын
Very good video. I though i was being smart to get around gimbals lock by defining 2 Quaternions that rotate around x and y axis and multiply them together. But if i remember matrix math i would know that multiplication order matters and i am back in gimbal lock depending on multiplication order.
@jphvnet
@jphvnet 2 жыл бұрын
I need it 12 years ago :(
Visualizing quaternions (4d numbers) with stereographic projection
31:51
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 16 МЛН
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17
Government Panel: Using GenAI to unlock Government open data
1:01:33
Worshipful Company of Information Technologists
Рет қаралды 31
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
How to think about Quaternions without your brain exploding
10:25
The Beauty of Bézier Curves
24:26
Freya Holmér
Рет қаралды 1,9 МЛН
How to Use Quaternions
14:20
Positive Altitude
Рет қаралды 7 М.
Fantastic Quaternions - Numberphile
12:25
Numberphile
Рет қаралды 1 МЛН
Euler (gimbal lock) Explained
8:07
GuerrillaCG
Рет қаралды 1,4 МЛН
A Discussion of Models and Quaternions in Unreal Engine 5.3
21:38
ImaginaryComponent
Рет қаралды 116
Quaternions as 4x4 Matrices - Connections to Linear Algebra
14:50
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 16 МЛН