Freya, the rare true Rockstar. The integration of Art, Code, and Math each enabling a richer understanding and utilization of each other. Reminiscent of Gödel, Escher, Bach. You may find this presentation moving!
@Data Rake calling a young person the actual next Isaac Newton can easily come off as a bit disingenuous by going over the top, which can feel like there's ulterior motives involved, which invalidates the compliment, is all. That's not hating on the compliment 😎
I struggle with the mapping issue she mentioned on a regular basis. I have to remap things all the time. I didn't know there was an inverse lerp function, and this will save me countless hours in the future
If I understand things correctly it's just the _map_ function that's provided in the Arduino framework. I've found this function so useful that I started using it in non-Arduino projects as well.
Using lerp as a way to overlay texture is so simple and yet elegant! I never thought of that (even though I'm guessing it's already being used for that purpose everywhere anyway -- painter's algorithm being less efficient)
this was such an awesome description of lerp and inverse lerp! It really helped solidify my understanding of them, and I've already found several use cases in my game that I have easily been able to accomplish! listened twice - understood lerp. listened three times - understood inverse lerp. listened four times - understood remap.
In blender there is the "map range" function which is just a generalised version of lerp and iv lerp. It takes input range minimum and maximun, output range minimum maximum and the value as inputs and outputs the remapped value. For a normal lerp the input bounds are just 0 and 1. And it also does extrapolation aswell but this can be turned off if not desired.
Had no idea about remap. I was trying to build up some calculation from scratch to figure out how to lerp between 3 different gradients over time in a shader. I was losing my mind trying to see how I could keep one gradient up longer than the others. This helped me so much.
Looking at the points and vectors you have to make a bezier curve are the same kind of ideas that Tony Derose talks about used in the development of the Toy Story movies with the Catmull-Clark equations. He gave a TedTalk in 2013 using a SubDiv program making curves into full circles for 3D geometry used in Pixar just by splitting the midpoints.
Awesomly simple explanation of complexy looking math functions. Opens up so many possibilities and scope for creativity, also Thanks for uploading this video
Freya Holmer : Game Devs :: Felicia Day : Nerdcore They both do a fantastic job engaging with their communites, and emit such a positive vibe. Freya has so much educational content on her channel though, she's probably become Big(O) in the function that determines my interest in math.
Unrelated but adjacent, I'm interested in whether the 3D fractal program, Mandelbulb 3D can be sped up. Apparently the fractal generators on the back end need higher resolution than actual graphical resolution and therefor requires Large Floating Point numbers and apparently (I'm told) this means we can't use GPUs. One idea I have for that program is whether they could at least separate out the post processing and assign that to GPUs. But I wonder if there are other ways to speed up fractal generation, possibly get it on a GPU platform. IDK.
@Lucasinatur except the point of using 'goddess' is often precisely the fact that it's gendered. an element of the intended meaning is lost when you just say 'god' instead. to call a woman a goddess of something is not just to say she's good at it or knowledgeable about it, but also to emphasize her femininity.
@ark Because I know from German (my mother tongue with this problem) that it is really annoying. Some people use weird non-standardized language to "include" everyone. Like "Lehrer" means teacher and "Lehrerin" means female teacher. "Lehrer" can mean both but some people think that's bad. But the root of the problem is the word "Lehrerin" because if it didn't exist, you couldn't interpret "Lehrer" as male-only. English had this too and some forms survived like goddess. But don't emphasise them if not neccessary because it will just lead to a lot of headaches when talking about groups of people.
I took a picture of that as well, yes using my phone right from the laptop screen... And Remaper made my whole day.... I am so happy for it.... Thank you!!!
Mathematics is the tool of all Engineering Sciences and Technology, it is awesome that we have 'computers' today with the use of programming we can create graphics and animation in colors: visualization, and to computer games. Engineering design is the most indispensable tool for use of this. Thank You for educating us.
The problem with Bernstein Polynomials and Bezier constructions that no one explains clearly how they where formed or derived in great detail. These are engineering drawing mechanical techniques that where rediscovered by computer scientists. It's amazing that forgotten techniques are being rediscovered again like the quaternions studied by Hamilton.
I clicked on this video and didn't think I was actually going to be interested enough to watch the whole video. Its crazy how math can be used to emulate reality.
I feel the editor was very rude to Freya. Despite her effort to call attention to slides, which she prefaced as critical, the edit is largely footage of her expressing an amazing narrative. But not in the way she wanted to.
Haha, when she finally showed the lerp code I decided to test my understanding for what she was talking about and wrote my own code which is a step further from hers after simplifying stuff it goes like this: return a + t*(b - a); I wonder why didnt she notice that
I am not sure the message was that lerp is anyway difficult, it was more about how such simple function can be applied and combined across vectors, images etc to create really impressive effects. Its the application of maths that makes is the beautiful here.
like Johannes said in the replies - I prefer the (1-t)a+bt lerp for numerical stability! I also like the way it reads like a weighted sum (while the other is more like a vector scale and add), and talking about the perf/accuracy differences between the two felt out of scope of this talk :)
btw youtube keeps swallowing my comment, I'll try to post it again :( ---- also here's a step by step process of getting from basic lerp to something called a smoothstep (very ubiquitous in shaders) en.wikipedia.org/wiki/Smoothstep you start with a function A, that simply does t*t (basically t squared) then you make a t-inverse of that, called B, that does (1-t)*(1-t) however the result of this is upside down, so lets do 1-(1-t)*(1-t) now solve the square 1 - (1 - t)(1 - t) = 1 - (1 - 2t + t*t) = 2t - t*t we now know that A = t*t, and B = 2t - t*t these are the two ends of a smooth quadratic ramp, accelerating in and out now you can lerp between the two functions in time, knowing that A + t*(B - A) however these are functions, so A(t) + t*(B(t) - A(t)) flatten this out, by substituting t*t + t((2t - t*t) - t*t) = t*t + t(2t - 2t*t) = t*t + 2t*t - 2t*t*t = t*t(1 + 2 - 2t) = t*t(3 - 2t) hence (as seen on wikipedia) float smoothstep(float a, float b, float x) { // Scale, bias and saturate x to 0..1 range (saturate means clamp in shader languages) float t = Mathf.Clamp01((x - a) / (b - a)); // notice that this is basically inverselerp from my previous comment // Evaluate polynomial return t * t * (3f - 2f * t); } extrapolating from this basic process of merging polynomials let's you create any other smooth ramp
@Kriss Loo "we're performing less operations in the simpler method, aren't we?" don't pay too much attention to it. if you don't believe me, benchmark it, it's practically negligible in terms of performance. multiplication is VERY fast.
Where was this event.? Seems like it was in the States, though she seems to work in Sweden. ……….( I’ll just add in my plea, which i expect to be well received in this company, to allow PHOTOS.! ………….In so many places, including here, photos are a no-no. Let’s open this up.! ) …………….[ Freya.: did U notice how i create space with periods.? Like right here. A period between the last word and the Question mark. Writing seems too crowded to me. ( I’m a painter. ) ]
Thank you Freya! This is way easier... if the player goes faster, the camera opens to show more world... if it goes slower, it narrows to show more detail! playerVelocity = player.velocity.magnitude; float i = Mathf.InverseLerp(minVelocity, maxVelocity, playerVelocity); float o = Mathf.Lerp(minFieldOfView, maxFieldOfView, i); virtualCamera.m_Lens.FieldOfView = o;
I'm an old Electronics engineer, worked on TV sets (you know--REAL TVs with actual Cathode Ray Tubes as a viewing screen) in my younger years. I would LOVE for her to look at the old RCA color guns and explain them from input to light emission. I mean I understood it, probably better than most of my peers, I had no problems troubleshooting them... but I bet she could bring that antiquated circuit theory to life! (BTW--analog is always superior to digital in real life animation---brownie points for any body that can explain why below!)
3:00 You couldn't have been more correct in that last statement... I LOVE math...and I always heard: "I'll never need to use this!" Yet people are confused about interest rate calculations and have no idea how to figure out their retirements??? MATH IS VERY IMPORTANT... PAY ATTENTION TO THIS PERSON!!!!!
as a user of blender, your exclamation that you can blender between anything doesn't impress me. In blender you can keyframe anything, and it will automatically "lerp" between them, and you have different lerp settings. You can do it with shaders, color, position, size, rotation, anything really
@Erik M a LOT of game programmers learn through doing, either starting with visual scripting in gamemaker and moving up to stuff like unity, and they won't know the fundamentals
Everyone DOES use these all the time, but the logic underpinning the techniques is seldom actually discussed. That's the point of the video, not to introduce lesser known techniques, but to explain the details of some commonly known techniques.
I've discoverd you thanks to Joy Of Code (he does svelte things and recently he has done something with three.js) I owe him now because you are a great source of knowledge.
Freya, the rare true Rockstar. The integration of Art, Code, and Math each enabling a richer understanding and utilization of each other.
Reminiscent of Gödel, Escher, Bach. You may find this presentation moving!
@Data Rake calling a young person the actual next Isaac Newton can easily come off as a bit disingenuous by going over the top, which can feel like there's ulterior motives involved, which invalidates the compliment, is all. That's not hating on the compliment 😎
The people commenting here hating on your comment are ridiculous. Looks like they never left their moms basement.
some ppl got salty over your compliments lol
Fettes DoubleDislike für Matthew Winston ! 👎👎
Freya set the bar on a whole new level for what means to be a technical artist. Math and code Goddess.
I struggle with the mapping issue she mentioned on a regular basis. I have to remap things all the time. I didn't know there was an inverse lerp function, and this will save me countless hours in the future
If I understand things correctly it's just the _map_ function that's provided in the Arduino framework. I've found this function so useful that I started using it in non-Arduino projects as well.
Using lerp as a way to overlay texture is so simple and yet elegant! I never thought of that (even though I'm guessing it's already being used for that purpose everywhere anyway -- painter's algorithm being less efficient)
this was such an awesome description of lerp and inverse lerp! It really helped solidify my understanding of them, and I've already found several use cases in my game that I have easily been able to accomplish!
listened twice - understood lerp.
listened three times - understood inverse lerp.
listened four times - understood remap.
Lol turns out I'm not the only one who is rewatching haha
In blender there is the "map range" function which is just a generalised version of lerp and iv lerp. It takes input range minimum and maximun, output range minimum maximum and the value as inputs and outputs the remapped value. For a normal lerp the input bounds are just 0 and 1. And it also does extrapolation aswell but this can be turned off if not desired.
Had no idea about remap. I was trying to build up some calculation from scratch to figure out how to lerp between 3 different gradients over time in a shader. I was losing my mind trying to see how I could keep one gradient up longer than the others. This helped me so much.
Would love an in-depth breakdown of that water shader. Looks absolutely gorgeous.
You have a very good way of explaining complex stuff in an easy to understand manner. Thank you for this very enlightening talk!
Looking at the points and vectors you have to make a bezier curve are the same kind of ideas that Tony Derose talks about used in the development of the Toy Story movies with the Catmull-Clark equations. He gave a TedTalk in 2013 using a SubDiv program making curves into full circles for 3D geometry used in Pixar just by splitting the midpoints.
Fantastic talk, thank you Freya
Awesomly simple explanation of complexy looking math functions. Opens up so many possibilities and scope for creativity, also Thanks for uploading this video
Surprised to not have seen distance maps in this talks. Animation using distance maps and lerp is a really nice usecase as well I think :)
I truly admire this woman and her deep knowledge. Bravo Freya! Keep it up
Freya Holmer : Game Devs :: Felicia Day : Nerdcore
They both do a fantastic job engaging with their communites, and emit such a positive vibe.
Freya has so much educational content on her channel though, she's probably become Big(O) in the function that determines my interest in math.
Unrelated but adjacent, I'm interested in whether the 3D fractal program, Mandelbulb 3D can be sped up. Apparently the fractal generators on the back end need higher resolution than actual graphical resolution and therefor requires Large Floating Point numbers and apparently (I'm told) this means we can't use GPUs. One idea I have for that program is whether they could at least separate out the post processing and assign that to GPUs. But I wonder if there are other ways to speed up fractal generation, possibly get it on a GPU platform. IDK.
Thanks for a wonderful and simple explanation of LERP etc.!!!
Really shows how powerful formulas are. The pictures are good for examples. But the formulas are so elegant.
This was great explanation!
Thank you!
Freya Holmer, The Shader Goddess
@P L I know about these forms. They were used a lot but went out of use in the modern Era. Bringing them back in words like God or actor is just dumb.
@Lucasinatur except the point of using 'goddess' is often precisely the fact that it's gendered. an element of the intended meaning is lost when you just say 'god' instead. to call a woman a goddess of something is not just to say she's good at it or knowledgeable about it, but also to emphasize her femininity.
Sounds like a boss battle
@ark Because I know from German (my mother tongue with this problem) that it is really annoying. Some people use weird non-standardized language to "include" everyone. Like "Lehrer" means teacher and "Lehrerin" means female teacher. "Lehrer" can mean both but some people think that's bad. But the root of the problem is the word "Lehrerin" because if it didn't exist, you couldn't interpret "Lehrer" as male-only.
English had this too and some forms survived like goddess. But don't emphasise them if not neccessary because it will just lead to a lot of headaches when talking about groups of people.
Awesome talk - it was very eye opening for me with the great visual examples. thx !
I took a picture of that as well, yes using my phone right from the laptop screen... And Remaper made my whole day.... I am so happy for it.... Thank you!!!
Freya taught me a lot of the things I know today
Very good overview and clear illustrations
I really liked it, I'm impressed. Watched in one breath. I'ts very interesting and informative!
This was really fun to watch :) Thank you
Mathematics is the tool of all Engineering Sciences and Technology, it is awesome that we have 'computers' today with the use of programming we can create graphics and animation in colors: visualization, and to computer games. Engineering design is the most indispensable tool for use of this. Thank You for educating us.
I have no idea if its because of freya but Unity shadergraph now has a remap node that does exactly what she described around 26:00.
That was AWESOME! Thank you!
Wow amazing, I'm already thinking of ways I can use this in my programs
If I only learn 50% of this math, I will know 100% more. interesting, even if I dont really understand everything :)
The problem with Bernstein Polynomials and Bezier constructions that no one explains clearly how they where formed or derived in great detail.
These are engineering drawing mechanical techniques that where rediscovered by computer scientists. It's amazing that forgotten techniques are being rediscovered again like the quaternions studied by Hamilton.
This is amazing, i watched until the end 😭
Holy shit, I can feel my brain expanding. This shit is awesome.
Nice not too hard to make it plot angled polygons.
30:57 literally the reason I don't attend a single math related class in my university, I either learn the things myself or you know... let them slide
Great Talk Freya
Bezier curves are literally what Pixar uses in their animation and modelling and shading!
thank you, it was great
I clicked on this video and didn't think I was actually going to be interested enough to watch the whole video. Its crazy how math can be used to emulate reality.
Absolutely Awesomeeee!
Wow that's visualisation was so cool
This is awesome
Amazing!
Math is a reason why so many people never finish their degrees. Non stem math requirements are needlessly too rigorous. It's a statistic.
just skip the degree part and go work in a cafe or something
Beautiful
Thanks Freya.
I feel the editor was very rude to Freya. Despite her effort to call attention to slides, which she prefaced as critical, the edit is largely footage of her expressing an amazing narrative. But not in the way she wanted to.
Mm, don't really understand what u mean. The graphics look clear and I can follow along easily.
When copy&paste implementing: I think a Lerp with "(b-a) * t + a" would be faster (less operations).
@jasmin UwU only if you use lerp whenever possible, which the talk is promoting
Not that it matters much anyway. Most of your performance isn't being used on lerp
Haha, when she finally showed the lerp code I decided to test my understanding for what she was talking about and wrote my own code which is a step further from hers after simplifying stuff
it goes like this:
return a + t*(b - a);
I wonder why didnt she notice that
I am not sure the message was that lerp is anyway difficult, it was more about how such simple function can be applied and combined across vectors, images etc to create really impressive effects. Its the application of maths that makes is the beautiful here.
@Freya Holmér My bad :) I got more knowledge about it now, you rock
I'm a huge fan
like Johannes said in the replies - I prefer the (1-t)a+bt lerp for numerical stability! I also like the way it reads like a weighted sum (while the other is more like a vector scale and add), and talking about the perf/accuracy differences between the two felt out of scope of this talk :)
btw youtube keeps swallowing my comment, I'll try to post it again :(
----
also here's a step by step process of getting from basic lerp to something called a smoothstep (very ubiquitous in shaders)
en.wikipedia.org/wiki/Smoothstep
you start with a function A, that simply does t*t (basically t squared)
then you make a t-inverse of that, called B, that does (1-t)*(1-t)
however the result of this is upside down, so lets do 1-(1-t)*(1-t)
now solve the square 1 - (1 - t)(1 - t) = 1 - (1 - 2t + t*t) = 2t - t*t
we now know that A = t*t, and B = 2t - t*t
these are the two ends of a smooth quadratic ramp, accelerating in and out
now you can lerp between the two functions in time, knowing that A + t*(B - A)
however these are functions, so A(t) + t*(B(t) - A(t))
flatten this out, by substituting
t*t + t((2t - t*t) - t*t)
= t*t + t(2t - 2t*t)
= t*t + 2t*t - 2t*t*t
= t*t(1 + 2 - 2t)
= t*t(3 - 2t)
hence (as seen on wikipedia)
float smoothstep(float a, float b, float x) {
// Scale, bias and saturate x to 0..1 range (saturate means clamp in shader languages)
float t = Mathf.Clamp01((x - a) / (b - a)); // notice that this is basically inverselerp from my previous comment
// Evaluate polynomial
return t * t * (3f - 2f * t);
}
extrapolating from this basic process of merging polynomials let's you create any other smooth ramp
@Kriss Loo "we're performing less operations in the simpler method, aren't we?"
don't pay too much attention to it. if you don't believe me, benchmark it, it's practically negligible in terms of performance.
multiplication is VERY fast.
Where was this event.? Seems like it was in the States, though she seems to work in Sweden. ……….( I’ll just add in my plea, which i expect to be well received in this company, to allow PHOTOS.! ………….In so many places, including here, photos are a no-no. Let’s open this up.! ) …………….[ Freya.: did U notice how i create space with periods.? Like right here. A period between the last word and the Question mark. Writing seems too crowded to me. ( I’m a painter. ) ]
I woulda burned the whole house when you showed that sine cosine tang simulation graph
Dope.
Thank you Freya!
This is way easier... if the player goes faster, the camera opens to show more world... if it goes slower, it narrows to show more detail!
playerVelocity = player.velocity.magnitude;
float i = Mathf.InverseLerp(minVelocity, maxVelocity, playerVelocity);
float o = Mathf.Lerp(minFieldOfView, maxFieldOfView, i);
virtualCamera.m_Lens.FieldOfView = o;
and if you wanna make a hardcore game do the opposite, since adrenalin causes tunnel vision, that could be used in a horror game
I was thinking she may going to mention lerp. She did!
I'm an old Electronics engineer, worked on TV sets (you know--REAL TVs with actual Cathode Ray Tubes as a viewing screen) in my younger years. I would LOVE for her to look at the old RCA color guns and explain them from input to light emission. I mean I understood it, probably better than most of my peers, I had no problems troubleshooting them... but I bet she could bring that antiquated circuit theory to life! (BTW--analog is always superior to digital in real life animation---brownie points for any body that can explain why below!)
3:00 You couldn't have been more correct in that last statement... I LOVE math...and I always heard: "I'll never need to use this!" Yet people are confused about interest rate calculations and have no idea how to figure out their retirements??? MATH IS VERY IMPORTANT... PAY ATTENTION TO THIS PERSON!!!!!
Shouldn't inverse "Lerp" be "Prel"? ;-)
Thought i knew everything about lerps, was dead wrong
as a user of blender, your exclamation that you can blender between anything doesn't impress me. In blender you can keyframe anything, and it will automatically "lerp" between them, and you have different lerp settings. You can do it with shaders, color, position, size, rotation, anything really
she made Budget Cuts??? i almost broke my hand grabbing through the hole in the floor....
im in love!!!!
This is computer Graphics 101
Thanks from Brazil
She has a youtube channel if anyone wants
Hah I knew it was a bezier as soon as I saw it!
Lots of numbers... in programming? Those who state that are missing the whole point in programming... and math in general ...
[sits on the floor]
Man this girl is pretty cute and smart too! Best combo.
@Infinitesimal Philip the correct term is degenerate
@Double Bullet If you're gonna care about stuff like that at least be correct
@Double Bullet at least be wrong correctly
@Double Bullet yep
@Infinitesimal Philip soo guy? 👍🏻
3:42 Yeah... I understood it; but didn't know what it was either....
Insane
Ihkhihi
Figure something out
Hy
1:03 ayo, who did these captions, she ain't named Franco Murray
right
1:59
my fav part OwO
8:23
is it Lerp ? OwO
8:55
YES XD I KNEW IT XD
me ,dont understand at whole all ,
that's just some math basics. Expected more from the title.
right right right, right?
NERD!
Why she is so.cute omg
@Luce Quesbe i agree
she uses shader on her skin
simple math???? where?
Whut? i use these all the time. And every else seem to do that too. I dont understand...
@Erik M a LOT of game programmers learn through doing, either starting with visual scripting in gamemaker and moving up to stuff like unity, and they won't know the fundamentals
@Grey Fisher Unless the subject is how a quaternion is implemented i think most programmers also know whay say a lerp does internally.
Everyone DOES use these all the time, but the logic underpinning the techniques is seldom actually discussed. That's the point of the video, not to introduce lesser known techniques, but to explain the details of some commonly known techniques.
Marry me
No she married me
This is called regression, not progression
Why did his parents call him Freya? It sounds like a girl's name.
nice slideshow Joachim.
of course it is not a real one 🤮
Is that a man?
Is that a dude?
yup
trans
@Luce Quesbe none taken
@ukranaut no offense but u r weird
Sweet and locally smart guy, went to far, for no reason.
sound like man,
@General Augusto Pepechet lol
guess why
disgusting to watch
@lorem ispum "Patrick Bateman" calls someone an incel ahahahaahahaahahah 😄
@lorem ispum you mean the guy in the video right?
the hole video i was thinking: "her voice and looks are like of a man".
I was not wrong, he is a man.
I've discoverd you thanks to Joy Of Code (he does svelte things and recently he has done something with three.js) I owe him now because you are a great source of knowledge.