@@Inquisite1031a bunch of people including me have not yet completed high school when learning game dev. also a practical understanding of the theory you cannot get from simply solving textual problems
@@Inquisite1031 You should realise that most of the middle/high-schools in the world are total crap. And have horrible teachers and/or education curriculum. ESPECIALLY for math.
@@ScienceDiscoverer I mean sure, but u still have to pass ur exams, and the vector algebra and trig u need to learn for that is pretty much what the video covered, maybe slightly less, in my country as far as compulsory education is concerned I expect every1 to know basic trigonometry and basic vector algebra, well that was like 15 years ago, maybe it has changed, xdd
I'll admit that I was pretty scared about my math skills when I started my own game about month ago. My math teachers in every educational level have been shit to worse. But then at my work suggested this tutorial here and oh boy. You girl are pure gold! I now understand everything so clearly thanks to your super educational tutorials. Thank you so much!
I'm getting back to my high school's math teachers and tell them that Pi is a piece of garbage, and now I have a really good argument and explantion of why it is.
Thank you for this content!! I have been struggling on some math for several weeks now, never touched trig in my life and you were able to help me with the math I needed for my functions!! Amazing!!!
Radians: PI/2 = 90deg & PI = 180deg etc., is often thE MOST intuitive way of working with things in math/physics that involve circles/rotations/angles IMHO. PI's always manage to come back & bite regardless. Funny you mention plain old turns, I have used them myself but, don't recall ever seeing it used in any libs or anything I ever encountered. & BTW, I really appreciate your knowledge of unity/graphics/shaders/coding in general etc.. Such tuts about modern/relative topics & just brush ups are a gem for an old c cat who just dabbles a bit to keep up on things. 👍
When i just want to relax and learn and get motivated i watch your lectures, so useful and I'm not a game dev, I'm a 3D artist but everything you teach can be applied so thank so much. I will be glad if from time to time you will show 3d implementions cuz something its harder to think about and sometimes it can not be implemented the same way.
(52:00) My preferred explanation for radians is: It's the length of the circumference of the angle (on unit circle). Which happens to be 6.28.. or 2π or Tau for full revolution.
"It's the length of the circumference of the angle (on unit circle)." u meant: "The length of the *arc* substended by an angle on the unit circle" ? The word circunference is not a part of something, its a whole. Arc is a part (substended by a central angle of a circle) of the circunference.
Thought I'd use this video as reference as I'm learning geometry nodes in Blender 3. Ended up watching the whole thing non stop, it was very informative and your delivery is excellent.
Finally made it to this one. Between studying the heck out of Blender, deep diving into this course taking a lot of notes, and learning the the building blocks of Unity and Unreal, I am completely swamped!
@2:01:55 I just wanted to mention that the range of arcsin (asin) is -1/4 turn to +1/4 turn, -90 to +90 degrees, -tau/4 to +tau/4 ( -pi/2 to +pi/2). That is in fact how atan2 can recognize the quadrant. If the vector is in the lower right corner, acos is positive and asin is negative. Similarly for the other quadrants, the signs of asin and acos are different so the correct quadrant can be determined. If asin had a range of 0 to 1/2 turn, then that would not be possible as the sign would always be positive, and thus not give the required additional clue for the quadrant.
Nice tutorial ! Can you talk about how we can use the trig functions to make primitive shapes like triangle, regular polygon and circle.. I’m sure others will like to know how cool trigonometry can accomplish this
The reason so many things do not make sense to you is the world you confine yourself in. Well established or not, your world is what is flipped and twisted, you should appreciate that and deal with it instead of complaining. One would think you'd be a bit more openminded... But let's not argue, just take a look at this: The order is sine, cosine because the sine function is the base for the "co-sine" function. Of course this doesn't match your x, y order, but consider a world where 0° is 'up' and rotation taking place in a clockwise manner. In this world you'd find that sin(α) gives you the x-component and cos(α) the y-component. And guess what - atan2 takes x as the first argument in that world. Also, that's where I've lived for most of my life. Boy, was I confused when I first got into openGL, where everything was rotated on the side and then flipped on its face. I mean you should just adapt and appreciate that things are not the same for everyone, everywhere. Just because something doesn't fit well into your scheme of things doesn't mean it's wrong, right?
Yes, it is a quirk. The math ist not stupid but perfectly fine, that's what I'm saying. It just doesn't fit so we'll in that world where axes are swapped. This is where the quirk lies, not in the order of function arguments. So what I meant is that she didn't seem to know, nor care that there's reason for those things. And by deal with it, I meant actually dealing with it; making it no longer be a problem, in whatever manner comfortable to her. Maybe my first comment seemed a bit harsher than it was meant to, so here's an apology for that. Just don't call a thing stupid, when you don't know why it is the way it is. It might not be stupid after all.
Thank you Freya this is what i was looking for its "Determinant" I want to fire a rocket but I need to know how exactly I know if the rocket is facing enemy ship ......Thank you Best Game Dev Teacher for math.....I have to Finish the series the value of this Knowledge is Gigantic
I'm wondering if perhaps part of the reason Pi is more ubiquitous than Tau is because those inverse trig functions only really work unambiguously within the first two quadrants (eg: Where the angle is < Pi radians). I'm not saying that it's a good reason of course.
I'd say it's simply a matter of habit. A long, long time ago it was much easier to measure the diameter of a circle than its radius. The concept of π is rooted in thousands of years of tradition and thus, by extension, is rooted in thousands of years of mathematical discoveries.
For the first problem:I made an overcomplicated solution where i got the "local space" basis vectors at the rayhit and did a bunch of dot products. Feling very dumb after seeing the easy solution.
Error. Tangent is cos to sin ratio if you doing algebra, and raycasting of angle vector to (Y-inf to +inf) line going though (X=1.0f). Illustrated in this video kinda tangent must have a hole between -1 and 1, but it continuous in that range.
"atan" and "atan2" is the same, with "atan" u need to give one input which is the slope (y / x) and with "atan2" u don't need to divide yourself and just give y and x as an input (the "2" just stands for 2 inputs). I also thougth for a long time that "atan2" is something special^^
You are incorrect, atan2 does more than just atan(y/x). It runs a check to determine if cos(α) is negative and adds pi to the result if it is. If you used simply atan(y/x) you'd have to assume that your coordinates DEFINITELY reside in quadrants I or IV. If they didn't, you'd end up with results you don't expect.
@@King-mj2bn Doesn't it just check whether x is positive and negative? That's the only thing needed to check if it's in quadrants 2 or 3 instead of 1 or 4.. (1 being positive X and Y). float atan2( float y, float x ) => atan( y / x ) + 0 > x ? PI : 0;
what about the bonus challenge?:) Spent an entire night on "make an object move along the bounced path at a fixed speed when you press play" but can't get it to work properly... wonder if we can get some insight on that
It seems your turret forward vector code is incorrect, just letting you know, i mean it works on flat surfaces but not slopes, by cross producting it with a sloped normal, it no longer points in the look direction of the camera (or whatever origin ray was used)
I'm not a game dev by far. I've been trying to figure out how to code a simple plane ai for a game called From the Depths lol. Been trying to figure out how to get a plane to roll left or right depending on target bearing.
Recently watched and enjoyed the talk. At the 10:40 mark a reference to a document on How Meshes Work and how they are structured. Curious to know if that link is still available?
4:20 If I was to do a quick cheap technique, I would just grab the vector, put the source at where it needs to hit the surface and multiple vector.y by - 😂
I am a Mathematician and Philosopher; (I hate Mathematicians and Philosophers) All they do is {arg}ue about everything ! Alexander Grothendieck is insane because of everything you say and do, has so be a debate about semantics, context, and preconditions. {1}
Hey Freya, I really like this series, extremely helpful and my mind has definitely been blown a couple of times, especially with the relationship between tau and the unit circle. This will help me a lot in the future, so many thanks from me :) The only criticism I have is that Thor's meowing can be distracting and annoying at some times. If you're doing more of these types of videos, I'd take that into account. Otherwise perfect video, keep them coming! :)
Does the determinant thing work in 3D? I remember there is an equation for that in 3D. I actually have needed this in 3D to keep a physics object on a track using physics. If it's to the right of the path push it to the left to keep it on and so on.
Public education is criminal. This was infinitely easier to understand than going through the nonsense of math. Everything made sense until we started bluring the area between the contextual idea of length and distance. You'll get lost if you forget these are all VECTORS with a DIRECTION. In terms of algebra we don't really care. And I feel like the tangent segment started to slip into that area where vectors are not talked about. The animation does not make sense algebraically. Because you are asking why the tangent Shrinking is...well if you look at the tangent being a LINE it doesn't make sense but when you remember the tangent IS a vector...that is dependent on other vectors it makes sense. I was going to hop back in engine after 2 but I think I'm just going to keep watching for a bit more.
NEVER apologise for having a sense of humor even when it might offend someone. You do not have the right to not be offended... -- The Bill of NO Rights -- :)
Extra Timestamps:
25:57 - Volume
28:26 - Alt method: Volume/Area using coordinate axis
59:14 - Arc Length practical example
1:26:32 - Trigonometry example: Camera FOV
1:29:53 - atan, algebra
1:33:41 - Other inverse trig functions (acos, asin)
1:35:41 - cotangent
1:36:56 - More visual examples (sin, cos, tan)
1:41:35 - atan2 initial explanation
1:53:46 - Why not acos and asin? (Vector to Angle)
2:03:12 - Sign of an angle
2:10:44 - Look trigger example
2:19:17 - Visualizing the look threshold (Look Trigger example)
2:49:32 - More FOV use-case examples
3:02:07 - Determinant details
3:04:18 - Signed Area Explanation
This is gold. Literally gold for game developers.
this is just high school borderline middle school maths, are game developers people who didn't even attend high school ? I'm confused
@@Inquisite1031a bunch of people including me have not yet completed high school when learning game dev. also a practical understanding of the theory you cannot get from simply solving textual problems
@@Inquisite1031 You should realise that most of the middle/high-schools in the world are total crap. And have horrible teachers and/or education curriculum. ESPECIALLY for math.
@@ScienceDiscoverer I mean sure, but u still have to pass ur exams, and the vector algebra and trig u need to learn for that is pretty much what the video covered, maybe slightly less, in my country as far as compulsory education is concerned I expect every1 to know basic trigonometry and basic vector algebra, well that was like 15 years ago, maybe it has changed, xdd
@@Inquisite1031 It's been 10 years, I needed a refresher.
I'll admit that I was pretty scared about my math skills when I started my own game about month ago. My math teachers in every educational level have been shit to worse. But then at my work suggested this tutorial here and oh boy. You girl are pure gold! I now understand everything so clearly thanks to your super educational tutorials. Thank you so much!
I'm getting back to my high school's math teachers and tell them that Pi is a piece of garbage, and now I have a really good argument and explantion of why it is.
Thank you for this content!! I have been struggling on some math for several weeks now, never touched trig in my life and you were able to help me with the math I needed for my functions!! Amazing!!!
Radians: PI/2 = 90deg & PI = 180deg etc., is often thE MOST intuitive way of working with things in math/physics that involve circles/rotations/angles IMHO. PI's always manage to come back & bite regardless. Funny you mention plain old turns, I have used them myself but, don't recall ever seeing it used in any libs or anything I ever encountered. & BTW, I really appreciate your knowledge of unity/graphics/shaders/coding in general etc.. Such tuts about modern/relative topics & just brush ups are a gem for an old c cat who just dabbles a bit to keep up on things. 👍
Hello fellow C feline!
"anyway, I went off on a tangent ... "
very punny, and delivered with a straight face :)
rträ4 wra
When i just want to relax and learn and get motivated i watch your lectures, so useful and I'm not a game dev, I'm a 3D artist but everything you teach can be applied so thank so much. I will be glad if from time to time you will show 3d implementions cuz something its harder to think about and sometimes it can not be implemented the same way.
(52:00) My preferred explanation for radians is:
It's the length of the circumference of the angle (on unit circle).
Which happens to be 6.28.. or 2π or Tau for full revolution.
"It's the length of the circumference of the angle (on unit circle)."
u meant:
"The length of the *arc* substended by an angle on the unit circle" ?
The word circunference is not a part of something, its a whole.
Arc is a part (substended by a central angle of a circle) of the circunference.
@@gutzimmumdo4910 You're right! That's what I meant. Thanks!
Thought I'd use this video as reference as I'm learning geometry nodes in Blender 3. Ended up watching the whole thing non stop, it was very informative and your delivery is excellent.
Damn, you're the future of math learning/teaching, this is incredible work
Finally made it to this one. Between studying the heck out of Blender, deep diving into this course taking a lot of notes, and learning the the building blocks of Unity and Unreal, I am completely swamped!
I would never have figured that reflection assignment out on my own, but after the explanation it makes sense....guess I have a lot of practice to do!
yeah that was crazy assignment i still dont understand it after the explanation at all
@2:01:55 I just wanted to mention that the range of arcsin (asin) is -1/4 turn to +1/4 turn, -90 to +90 degrees, -tau/4 to +tau/4 ( -pi/2 to +pi/2). That is in fact how atan2 can recognize the quadrant. If the vector is in the lower right corner, acos is positive and asin is negative. Similarly for the other quadrants, the signs of asin and acos are different so the correct quadrant can be determined. If asin had a range of 0 to 1/2 turn, then that would not be possible as the sign would always be positive, and thus not give the required additional clue for the quadrant.
I see Freya's video, i put thumbs up before i press "play"
The colors that you choose are really appealing to the eye :)
I followed every step as you showed in the video and i'm very surprised by how this hack works! Thank You!
1:34 bruh sneezed on the cat
Nice tutorial ! Can you talk about how we can use the trig functions to make primitive shapes like triangle, regular polygon and circle.. I’m sure others will like to know how cool trigonometry can accomplish this
that's part of the assignments at the end of this! I talk about how to do it at the beginning of the next video :)
Thanks so much I now have better understanding about angle or just game Dev maths
amazing that such content is for free :O
The reason so many things do not make sense to you is the world you confine yourself in. Well established or not, your world is what is flipped and twisted, you should appreciate that and deal with it instead of complaining. One would think you'd be a bit more openminded... But let's not argue, just take a look at this:
The order is sine, cosine because the sine function is the base for the "co-sine" function. Of course this doesn't match your x, y order, but consider a world where 0° is 'up' and rotation taking place in a clockwise manner. In this world you'd find that sin(α) gives you the x-component and cos(α) the y-component. And guess what - atan2 takes x as the first argument in that world. Also, that's where I've lived for most of my life. Boy, was I confused when I first got into openGL, where everything was rotated on the side and then flipped on its face.
I mean you should just adapt and appreciate that things are not the same for everyone, everywhere. Just because something doesn't fit well into your scheme of things doesn't mean it's wrong, right?
Yes, it is a quirk. The math ist not stupid but perfectly fine, that's what I'm saying.
It just doesn't fit so we'll in that world where axes are swapped. This is where the quirk lies, not in the order of function arguments.
So what I meant is that she didn't seem to know, nor care that there's reason for those things. And by deal with it, I meant actually dealing with it; making it no longer be a problem, in whatever manner comfortable to her. Maybe my first comment seemed a bit harsher than it was meant to, so here's an apology for that.
Just don't call a thing stupid, when you don't know why it is the way it is. It might not be stupid after all.
Perfect!!! What is going on with that math book you were talking about?
Thank you Freya this is what i was looking for its "Determinant" I want to fire a rocket but I need to know how exactly I know if the rocket is facing enemy ship ......Thank you Best Game Dev Teacher for math.....I have to Finish the series the value of this Knowledge is Gigantic
I'm wondering if perhaps part of the reason Pi is more ubiquitous than Tau is because those inverse trig functions only really work unambiguously within the first two quadrants (eg: Where the angle is < Pi radians). I'm not saying that it's a good reason of course.
I'd say it's simply a matter of habit. A long, long time ago it was much easier to measure the diameter of a circle than its radius. The concept of π is rooted in thousands of years of tradition and thus, by extension, is rooted in thousands of years of mathematical discoveries.
Thank you Freya you are the best teacher
we support you
이것을 긴 시간동안 가르치는 당신은 대단합니다 ^^
For the first problem:I made an overcomplicated solution where i got the "local space" basis vectors at the rayhit and did a bunch of dot products. Feling very dumb after seeing the easy solution.
Thank you so much for the course!
Just found your channel, and it's SO helpful!
You're brilliant!
Thank you for your help 😊
Error. Tangent is cos to sin ratio if you doing algebra, and raycasting of angle vector to (Y-inf to +inf) line going though (X=1.0f). Illustrated in this video kinda tangent must have a hole between -1 and 1, but it continuous in that range.
"atan" and "atan2" is the same, with "atan" u need to give one input which is the slope (y / x) and with "atan2" u don't need to divide yourself and just give y and x as an input (the "2" just stands for 2 inputs). I also thougth for a long time that "atan2" is something special^^
You are incorrect, atan2 does more than just atan(y/x). It runs a check to determine if cos(α) is negative and adds pi to the result if it is. If you used simply atan(y/x) you'd have to assume that your coordinates DEFINITELY reside in quadrants I or IV. If they didn't, you'd end up with results you don't expect.
@@King-mj2bn Doesn't it just check whether x is positive and negative? That's the only thing needed to check if it's in quadrants 2 or 3 instead of 1 or 4.. (1 being positive X and Y).
float atan2( float y, float x ) => atan( y / x ) + 0 > x ? PI : 0;
Good names for kids. "Come here Sin!" Go tell your brothers Cos and Tan they're grounded for confusing the masses."
1:12:55 TAU = Math.PI*2f if not use anywhere else thats where it should be
what about the bonus challenge?:) Spent an entire night on "make an object move along the bounced path at a fixed speed when you press play" but can't get it to work properly... wonder if we can get some insight on that
18:20
The dot product between AB (b-a) and AC (c-a) wouldn't give you the height of the triangle?
Good day in your Trig class would tan be the equivalent of the Z value, basically how to extend to Vector3
The Furry God of Thunderous Meows requires sustenance.
It seems your turret forward vector code is incorrect, just letting you know, i mean it works on flat surfaces but not slopes, by cross producting it with a sloped normal, it no longer points in the look direction of the camera (or whatever origin ray was used)
Really good
Dis is so good.
Did you or could you make a video about quaternion math and how to use it in games ?
We need a poster with: "Nothing is consistent, everything is garbage" - Freya Holmér
"triangles - are they for you?" Geometers HATE this one simple TRICK!
freya you are the best. Thanks alot
I'm not a game dev by far. I've been trying to figure out how to code a simple plane ai for a game called From the Depths lol. Been trying to figure out how to get a plane to roll left or right depending on target bearing.
Drawing straight line in photoshop: hold shift and just click any two positions on your canvas.
'My friend's name is Pi' 'Fuck that person' lollllll
Hi o/ Where i can download sketches from the video? It will be helpful for my conspects of vector algebra. Thanks)
I was looking fir something like this
Nifty !
Recently watched and enjoyed the talk. At the 10:40 mark a reference to a document on How Meshes Work and how they are structured. Curious to know if that link is still available?
YOU'RE FUCKING AWESOME and a huge inspiration to me!!
4:20 If I was to do a quick cheap technique, I would just grab the vector, put the source at where it needs to hit the surface and multiple vector.y by -
😂
57:29 tau is coming from pi not other way lol.
1:12:20 How to make a square out of this at this point?
I like Trig Too
Late to the party, but maybe PI won because πr² for circle area is easier than ½TAU·r² ?
I am a Mathematician and Philosopher; (I hate Mathematicians and Philosophers) All they do is {arg}ue about everything ! Alexander Grothendieck is insane because of everything you say and do, has so be a debate about semantics, context, and preconditions. {1}
Hey Freya, I really like this series, extremely helpful and my mind has definitely been blown a couple of times, especially with the relationship between tau and the unit circle. This will help me a lot in the future, so many thanks from me :)
The only criticism I have is that Thor's meowing can be distracting and annoying at some times. If you're doing more of these types of videos, I'd take that into account.
Otherwise perfect video, keep them coming! :)
What program is being used to illustrate?
Trying to follow up by concentrating, but the cat's meowing i abstractive...Anyway, your explanations is great no matter what!
BIG fan of calling inconsistencies & aggravating things "garbage" myself, pronounced gabbage. 🤣
Does the determinant thing work in 3D? I remember there is an equation for that in 3D. I actually have needed this in 3D to keep a physics object on a track using physics. If it's to the right of the path push it to the left to keep it on and so on.
the determinant generalized to 3D is the wedge product, which is also similar in spirit to the cross product
Is there a video missing between part 2 and part 3?can any one help?
My school days have come to haunt me.
❤
My reflection in a window: how many dimensions and con
variables are there ?
I want to yeet that cat out the window
Asgmt. 4 i didn't undertand how subract between ray and 2 * dotProduct(ray,n) * n give a mirror ray dir
2:23:48
how to show that arc line on game mode?
Can't you just go y=dot(n, ray), and jump to yreflection=(-y), rather than multiplying by 2?
Congrats on the apartment girls!
1:53:38 Could you send me your math library?
github.com/FreyaHolmer/Mathfs
They say there aren't any dumb questions, but surely there are questions that frustrate me and make me wonder if you were dropped as a baby.
54:36 Or pI2 right Xd put second line for tau it become tau2 as pi but then full circle is pi2. not logic right lol
1:20:03 are you sure? is that normalized vector A allready hold x and y what you about to calculate lol
1:18:23 makes sence radius is 1 LOL lets use dot so we can choose radius lol. i not want game with allways 2Meter circles xD
amassava
57:36 no its pi2 so you cant take 0.25*2 LOL pi is in midle
1:13:23 still too same calculations
I'm just going to leave a time mark where I stopped at 1:01:00
Public education is criminal. This was infinitely easier to understand than going through the nonsense of math.
Everything made sense until we started bluring the area between the contextual idea of length and distance.
You'll get lost if you forget these are all VECTORS with a DIRECTION. In terms of algebra we don't really care.
And I feel like the tangent segment started to slip into that area where vectors are not talked about.
The animation does not make sense algebraically. Because you are asking why the tangent Shrinking is...well if you look at the tangent being a LINE it doesn't make sense but when you remember the tangent IS a vector...that is dependent on other vectors it makes sense.
I was going to hop back in engine after 2 but I think I'm just going to keep watching for a bit more.
I like pies
Hi Freya. . . I nerd other oportunity. . Can You send me your Discord link?.
π is not good enough, long live τ !
she is gorgeous
Oh man, this woman codes so fast!
I think she move a little bit slower so that we can learn from her.
no, i like pi xd
First
NEVER apologise for having a sense of humor even when it might offend someone.
You do not have the right to not be offended...
-- The Bill of NO Rights --
:)
Why is this dude putting on that wierd voice.
Nuh uh that's clearly a woman. But it's aight lil bro, I know for a fact you don't have much contact with women so you frequently mistake em.
@@pipacombate393 Women are people with XX chromosomes. That biological man in the video is not a woman.