An In-Depth look at Lerp, Smoothstep, and Shaping Functions

Поділитися
Вставка
  • Опубліковано 26 вер 2022
  • Exploring some common math that game developers use, let's look at linear interpolation and apply it to everything.
    🛒 Recommended books (on Amazon): www.amazon.com/hz/wishlist/ls...
    ❤️ Support me on Patreon: / simondevyt
    🌍 My Gamedev Courses: simondev.teachable.com/
    Disclaimer: Commission is earned from qualifying purchases on Amazon links.
    Follow me on:
    Twitter: / iced_coffee_dev
    Instagram: / beer_and_code
    In this video, I cover lerp, also known as mix in GLSL, a common mathematical function used in game dev. It's extremely versatile, and we'll go through basic uses, as well as some problems and how to overcome them.
    Some easing functions to try out:
    easings.net/
    iquilezles.org/articles/funct...
  • Наука та технологія

КОМЕНТАРІ • 219

  • @simondev758
    @simondev758  Рік тому +138

    Typo at the end! Should be b^(n+m) = b^n * b^m
    Btw, support me for more videos:
    GLSL Course: simondev.teachable.com/p/glsl-shaders-from-scratch
    Patreon: www.patreon.com/simondevyt

  • @tommysedin
    @tommysedin Рік тому +410

    Holy crap!
    A long time ago, I was writing a multiplayer top-down shooter and I ran into a weird issue where the camera would start jittering like crazy, some kind of de-sync between the client and server. I never figured it out and just lost hope in the project, abandoning it.
    Fast forward *15 years* and at the end of a video about interpolation, there's a quick side-note about a common mistake when interpolating positions. And, if memory serves, that is *exactly* what I did with the camera.
    ...Holy crap..!

    • @5hirtandtieler
      @5hirtandtieler Рік тому +46

      Time to pay a visit to your closet/storage unit and dust off the old hard drives....

    • @orisphera
      @orisphera Рік тому +1

      What is the mistake?

    • @commenturthegreat2915
      @commenturthegreat2915 Рік тому +28

      You're saying it jittered, so it's probably not the mistake mentioned here. (If you even consider it a mistake - it's so close to being perfect that you might as well use that solution).
      But if I were to guess, it's possible that you accidentally let t be larger than 1 - making the camera overshoot its target. If frame rates were low enough, you'd get jitters as the camera moves back and forth.

    • @oopy354
      @oopy354 Рік тому +1

      Hey man, if your game is fun, I think you should just resume working on it. Don't bother with visual updates. The market needs more passion projects and fun games.

    • @DreadKyller
      @DreadKyller 9 місяців тому +1

      @@commenturthegreat2915 They said the stutter is caused by a desync between server and client. If the server is running interpolation at a fixed timestep and the client is doing it based on framerate, then yes actually this would be precisely the type of thing that would cause desyncs in position.

  • @RineMarthen
    @RineMarthen Рік тому +477

    i like the part where he said "It's lerping time!" and lerped all over the place

    • @simondev758
      @simondev758  Рік тому +123

      Man, I really lost an opportunity to actually do that

    • @ChrisD__
      @ChrisD__ Рік тому +30

      @@simondev758 The fact that you didn't do it makes the joke funnier.

    • @user-pr6ed3ri2k
      @user-pr6ed3ri2k Рік тому

      ​@@simondev75842thliker

    • @Kanibulus
      @Kanibulus Рік тому +5

      Go Go Lerping Rangers!!

  • @vincei4252
    @vincei4252 Рік тому +190

    Thanks, Simon. I'm lerping as a programmer but smoothing and shaping my path.

  • @doxed64
    @doxed64 4 місяці тому +5

    This is exactly what I needed for my game. Camera Log Zoom and Frame Rate independent tracking for aiming. Thank you so much, Simon! Subscribed.

  • @Henrix1998
    @Henrix1998 Рік тому +14

    This video needs to be waaayyy longer. I want more!

    • @Kenionatus
      @Kenionatus Рік тому +1

      I'd say the length is very good. I feel like I now know what to google when I need to implement it and know the most common pitfalls. I'd just forget most of it if more info were crammed in the video.
      I'm sure there are more in depth videos on interpolation functions tho.

  • @OlegV5
    @OlegV5 Рік тому +20

    Your smooth voice and professional animation and videos design gives your videos such nice aesthetics! Also love the knowledge you share with us

  • @magic-window
    @magic-window Рік тому +17

    That's an effective lesson, explaining all these concepts, functions, and implementations in such short time.

  • @mfucek_
    @mfucek_ Рік тому +3

    A bunch of awesome concepts in just enough detail, great video!

  • @ardavanansari
    @ardavanansari Рік тому +1

    This is gold. Thank you for all the effort you put into this beautiful video

  • @Kaeresh
    @Kaeresh 8 місяців тому

    Hey Simon, I finally got around to implementing Lerps and I am very happy I kept your vid around. Helped a ton!

  • @paulpladziewicz
    @paulpladziewicz Рік тому +1

    Good to see you making videos again! I always learn something.

  • @Polygarden
    @Polygarden Рік тому +1

    Absolutely astonishing video! I was aware of the lerp itself, but these tiny things, like the interpolation of colors to get nice gradients, which are very quickly overlooked while programming. I'm amazed by the solutions. Thank you very much!

  • @unfa00
    @unfa00 Рік тому +1

    I love these videos, covering basic concepts and tool sided in game development. I always learn new things and get a deeper understand of what I'm doing, and what I could do better. Thank you so much!

  • @DarkSwordsman
    @DarkSwordsman Рік тому +2

    Wow, I don't think I've seen such a useful video before, and it only was released a week or two ago. Major props, thanks for sharing

  • @keyb
    @keyb Рік тому +6

    Thank you Simon! I'm studying CS and this is amazingly useful.

  • @Phillip_Anatra
    @Phillip_Anatra Рік тому +1

    Yes! I've been looking for something like this! Thanks so much for making this video, now I know how to derive lerp functions

  • @GhostPandaFestival
    @GhostPandaFestival Рік тому +12

    Nice linear/log zoom example! I was just staring at a linear fade in and thinking it didn't look good. I'll have to give log a try

  • @spliter88
    @spliter88 Рік тому +1

    That bit at the end is especially brilliant! Thanks for the video!

  • @ziggyharding5207
    @ziggyharding5207 Рік тому +3

    I didn't know I needed this video until now, thanks!

  • @Banaaani
    @Banaaani Рік тому +6

    Interesting stuff. My favorite functions in Unity game development always has been lerp and slerp because they are easy to use and extremely useful in many situations. Also I love their names

  • @jorgegimenezperez9398
    @jorgegimenezperez9398 Рік тому +2

    Loved this so much Simon! Thanks for the video 🙆🏻‍♂️

  • @oo735
    @oo735 Рік тому +5

    There is a mistake at 8:07 IG b^(m+n ) = b^m * b^n not b^(m+n) = b^m + b^n.

  • @Eddygeek18
    @Eddygeek18 Рік тому +6

    I've experienced 2 of the issues mentioned with deltaTime lerping and the camera zoom lerping problem. I found ways around both at the time but this video was very insightful and i've made some notes for these in the future as i'm sure i'll run into them again. I knew how lerp worked but i was always curious about smoothstep, it was funny cuz i've experimented with lerping between lerps so was a suprise that i was on the right track just didn't think of the sqrt. Great video Thanks!

  • @leeoiou7295
    @leeoiou7295 Рік тому +2

    I will appreciate more math videos like this. thanks

  • @gmjammin4367
    @gmjammin4367 Рік тому +2

    I wish this video existed when I was getting to know all about these functions myself! Great video!

  • @Skeffles
    @Skeffles Рік тому +1

    Great video. Really interesting to see how functions can combine to make smooth step.

  • @zm7160
    @zm7160 Рік тому +3

    Absolutely blown away by the insights offered by these videos.
    There is a lot of how to do XYZ game dev videos on UA-cam. But the depth and breadth covered on this channel🤌
    You are a rare and beautiful beast. Thank you.

  • @ironcommando2
    @ironcommando2 Місяць тому

    I gotta thank you a lot especially for that last one. My camera was lerping weirdly on different frame rates and that solved my problem!

  • @thomasstern6172
    @thomasstern6172 Рік тому +2

    Super cool video. Love to see more of those math videos :)

  • @buzbuz33-99
    @buzbuz33-99 Рік тому +2

    Amazing stuff. I've done all these kinds of things without LERP (e.g., moving objects, color transitions, camera tracking). So it will be interesting to see how I use these commands to improve my programs.

  • @leshiq4214
    @leshiq4214 Рік тому +2

    Thanks. That was really interesting and inspiring!

  • @erksp7961
    @erksp7961 10 днів тому +1

    Thank you! This helps me _understand_ the functions. Cheers!

  • @thehambone1454
    @thehambone1454 Рік тому +1

    Great timing, just implemented this in my little engine!

  • @Peterscraps
    @Peterscraps Рік тому +1

    Every time I go to write I a comment you're ahead of me explaining what I know from intuition, but way better than I could. Then adding to that something I don't know.
    brb gonna bing your videos.

    • @simondev758
      @simondev758  Рік тому

      Hah, happy you're getting value from them!

  • @emteiks
    @emteiks Рік тому +2

    very nice, i like it a lot. short and on topic.

  • @tomasskrivan3291
    @tomasskrivan3291 Рік тому +8

    I didn't check the math exactly but the last example when you are following the target, you are effectively solving a differential equation. The initial fix by multiplying by timestep should be forward Euler method. Using the exponential is an exact solution to the differential equation, hence the frame rate independence. However, it is exact solution only if the target is stationary(maybe also in the case of linear movement). Therefore it is still not frame rate independent but the error is much much lower.

  • @bartniem9
    @bartniem9 Рік тому +7

    it's like all the fun parts of cs course without the boring parts

  • @rix0r222
    @rix0r222 Рік тому +1

    that frame-time independent lerp will be useful, thanks!

  • @eliaspippenger5387
    @eliaspippenger5387 Рік тому +3

    Hey, so some people (like me) might be calculating their lerp rate as t = K * (targetFrameRate / frameRate) instead of t = muchLargerConstant * frameTime {i.e. t = .35 * (60 / 240) instead of t = 21 * (1 / 240); this is if the result is supposed to be equally large, t = .0875 in both cases} bc they wanted to be able to write constants (K values) that were equal to the actual used lerp rate at a target frame rate, meaning a lerp rate between 0 and 1. If you use a K value from 0-1 in the second equation, your t value will be very low and cause slow lerping, thus you have to use a K value that is (targetFrameRate) times as large as the first equation (21 = .35 * 60) to get the same result. Basically, if you are ok with small lerp rates, then the second equation works fine with K being a 0-1 value, and the use of the equation presented in the video gives similar results. Using my method, however, means that your constants will not work the same way in the new frame rate independent lerp function. And if you, like me, instead of refiguring many different lerp constants, want to use the same constants to get the same result except truly frame independent, then you can use this method. After some fiddling with math, I found that you can add an extra constant out front of the (new) equation so that it becomes:
    t = A(1.0 - pow(K, frameTime)),
    where: A = K / (1.0 - pow(K, (1 / targetFrameRate)))
    It probably goes without saying, but this has the same effect if you were previously using something like: t = targetFrameRate * K * frameTime, as that is the same as my original equation.
    There is probably a shorter version of calculating A, but I didn't bother trying to condense it.
    A stands for Adjust, as it adjusts the result of the new function to be identical to the result of K * (targetFrameRate / frameRate) at a given targetFrameRate and all subsequent rates for different real frame rates to be much closer to the original function as well, allowing you to use the same K value used while utilizing t = K * (targetFrameRate / frameRate) (Note: There is nothing wrong with the equations in the video, they just give small lerp values that you might be required to adjust later since you can't use a K value greater than 1 in the new equation). The constant A only needs to be calculated once upon creation of the object that uses A (assuming K is indeed a constant). In summary, this provides a way for t values from the new equation to be close to the old equation using the same k values. I hope this helps anyone looking to implement this function in an already largely completed version of their project! And here is a Desmos graph I set up to help understand why this might be useful:
    www.desmos.com/calculator/sylkom3bze
    Try getting rid of A on the purple line and f on the blue line. That illustrates the exact way the original equations were portrayed in the video.

    • @simondev758
      @simondev758  Рік тому

      Awesome, yeah that was one problem with the new equation, is that it doesn't map easily to the old values without some work. And I didn't do the work heh

  • @RDD87z
    @RDD87z 4 місяці тому +1

    super helpful! thank you so much.

  • @MrChernicharo
    @MrChernicharo Рік тому +1

    Wow! That was beautiful 🤩
    I need to learn math today

  • @CapsAdmin
    @CapsAdmin Рік тому +2

    I've been doing smooth lerping as shown at the end wrong all this time! I did the exact same as the same as the second example, slapping on delta time. I was never satisfied with how it looked with low framerates as it gets jittery, so I tended to add some additional checks to make it not freak out.

  • @MIKELENZTIPS
    @MIKELENZTIPS Рік тому +1

    Fantastic video - thank you

  • @realMenta
    @realMenta Рік тому +1

    Great video, thank you!

  • @tuomaskoivistoinen6476
    @tuomaskoivistoinen6476 Рік тому +3

    Crazy good videos thank you!

  • @danielvindhjarta2851
    @danielvindhjarta2851 Рік тому +1

    This video earned you a subscription. Very nice work.

  • @omnigeddon
    @omnigeddon Рік тому +1

    thanks for these videos.. these are pretty dope :D

  • @ferinzz
    @ferinzz 3 місяці тому

    I could see how I could have a whole library of different variations to lerp with some better names for what you want to do. Like the smoothstep. Thank you for this, it sounds awesome.

  • @EgorChebotarev
    @EgorChebotarev Рік тому +1

    One of the best explanations

  • @addictedyounoob3164
    @addictedyounoob3164 Рік тому +1

    You da best, Simon!

  • @SupaKoopaTroopa64
    @SupaKoopaTroopa64 Рік тому

    I didn't know about the slerp function until now, and it is SUPER helpful!
    I'm a 3d artist, and I often face the problem of having to interpolate between two normal maps. When searching how to do this, there are tones of unhelpful answers. some say to just interpolate between the raw pixel values (which never looks right). Others say to use an overlay blend operation, which does an ok approximation. I have never once heard someone mention slerp! One great property is that you can rotate one normal map by the other by using t=2, or t=-1 to rotate it in the opposite direction.

    • @simondev758
      @simondev758  Рік тому +1

      If you're trying to blend normal map, check this site out: blog.selfshadow.com/publications/blending-in-detail/

    • @SupaKoopaTroopa64
      @SupaKoopaTroopa64 Рік тому

      @@simondev758 I've actually read that blog before. It was very useful, but the slerp function adds some more flexibility. For example, I often need to mix 3 normal maps when working with clothes (seams/pockets, fabric wrinkles, and procedural noise). I can divide their angles by 3 using slerp(normal_map, surface_normal, 1/3), and then add them together with two instances of slerp t=2.

  • @duelsoldier3048
    @duelsoldier3048 Рік тому +1

    Very good video, keep it up

  • @while.coyote
    @while.coyote Рік тому +1

    I love this, thanks

  • @MegaCevapcic
    @MegaCevapcic Рік тому +7

    Sorry... shouldn't it be b^m * b^n = b^(m+n). Is it different if the numbers are strictly between 1 and 0?

    • @Rundik
      @Rundik Рік тому +3

      I wanted to write the same thing. I think this is a typo

    • @simondev758
      @simondev758  Рік тому +2

      Dammit

    • @simondev758
      @simondev758  Рік тому +5

      Even worse, this was correct in my draft, haha

    • @MegaCevapcic
      @MegaCevapcic Рік тому +1

      @@simondev758 it's the consequence of doing too much math haha
      I just made a matrix multiplication function in JS last week where I added instead of multiplied the elements, so it'll be the first thing I look for a while 😂

  • @felleg4737
    @felleg4737 Рік тому +1

    very very cool! thank you!

  • @Tobiky
    @Tobiky Рік тому +1

    This is really cool

  • @Dynamic-Productions
    @Dynamic-Productions Рік тому +3

    Love how you always seem to be able to simplify things to make it easy to understand

  • @NathanHedglin
    @NathanHedglin Рік тому +2

    Great video

  • @hanshangyan1512
    @hanshangyan1512 Рік тому +1

    Teacher Simon. Thank you for the great tutorial. God bless you. Can I request a video on "How will I learn to code if I could start over"

  • @FlareGunDebate
    @FlareGunDebate Рік тому +1

    very nice. thank you.

  • @praayos
    @praayos Рік тому +1

    Thanks especially for the last part. I am the person who always used deltaT. I will do better now. ;)

  • @magnusm4
    @magnusm4 Рік тому +1

    What I like about lerp is how it can be cheated to be smooth, like you showed. But also in shaders how it can be used for shapes and patterns.
    Where T is a value of 0 to 1, meaning black to white with grey in between.
    So by feeding it a black and white pattern "aka any colored image but only one of the 3 colors" then you can use lerp to paint effects onto a surface.
    Say you have a texture with spots you want lit up.
    You just use the non lit part into the A, the lit part into the B. And the black and white part into T.
    So now it lights up the white parts of the texture while smoothing out in the greys.

  • @HomeofLawboy
    @HomeofLawboy Рік тому +3

    I'm currently working on a game that has some events that sometimes causes a spike in the frame time, if I happened to be moving the camera in a specific way during those events the camera starts to freak out shaking all over the place. I ironed out some time consuming events to minimize the problemas but never understood why the camera of all things was suffering from the fps drops... until now

  • @noahwhewall5651
    @noahwhewall5651 Рік тому +1

    lost me at the end lol but very good video on some game maths fundementals. Nice refresher after not having dabbled in stuff like shaders in a while

  • @pist5343
    @pist5343 Рік тому +1

    Awesome!!

  • @spaaaaace8952
    @spaaaaace8952 11 днів тому

    I wish I had this channel when I was younger.

  • @SVGc1993
    @SVGc1993 Рік тому +1

    Oh my god, learning the right way to lerp positions independently of framerate IS a must and I never thought of it... Totally required for online games where position matters.

  • @Chukxztv
    @Chukxztv Рік тому +1

    Love IT, thank u

  • @williamdrum9899
    @williamdrum9899 9 місяців тому

    2:18 From what I understand this can be achieved using integer math as well. I've heard you can do something similar on 8 bit platforms using the following:
    char speed = 0;
    unsigned char accel = 0;
    void gametick(){
    accel++;
    if (accel)
    {
    if (speed > 0 && speed < 0x7f)
    {
    speed++;
    }
    }
    Essentially accel acts as a timer that increments speed whenever accel overflows. If you wanted to achieve an effect like x^3 or sqrt(x) you could AND accel with a bitmask that grows or shrinks based on the value of speed.

  • @5hirtandtieler
    @5hirtandtieler Рік тому +5

    1:13 Using this in conjunction with ‘B*t + A*(1-t)’ was an idea I never heard before and will be SO MUCH more useful than having to go into desmos to hand craft functions whenever I need interpolation, so thank you for all this!
    I know this was probably the simplest concept for others, but I work in a sim tool that doesn’t offer interpolation functions and I only really need them when making nice animations. But this is so much cleaner than reimplementing complex functions...

  • @bernhagen93
    @bernhagen93 6 місяців тому

    this video is great thanks

  • @rafaelbrustolin4687
    @rafaelbrustolin4687 2 місяці тому +1

    useful stuff i found here

  • @DonutSurprise
    @DonutSurprise Рік тому +1

    Watched this a second time, realized already had given a thumbs up.

  • @cameleon5724
    @cameleon5724 Рік тому +1

    One content, two languages. What I have now written may have a perfect mirror in another language.!!!!!!!!!!! Hack in the brainlll

  • @4.0.4
    @4.0.4 Рік тому +1

    I had no idea about the naive position lerp being framerate-dependent. The more you know!

  • @CosyStudios
    @CosyStudios Рік тому +1

    Serious tidbits my man

  • @kyberite
    @kyberite Рік тому +1

    Thank you for this!

  • @Desopolis
    @Desopolis Рік тому +1

    Post this on your twitter!
    UA-cam’s algo highly values the first few hours!

    • @ferinzz
      @ferinzz 3 місяці тому

      Huh, algo seems fine for me.

  • @ChrisD__
    @ChrisD__ Рік тому +1

    That last pitfall has filled me with terror.

  • @you_re
    @you_re Рік тому +1

    instant subscribe!

  • @G8tr1522
    @G8tr1522 Рік тому +1

    I only subbed bc of that cheeky little gag you did.

    • @G8tr1522
      @G8tr1522 Рік тому +1

      but forreal, this is very useful if I eventually finish my ideas for music production plugins.

    • @simondev758
      @simondev758  Рік тому

      😀

  • @diegoduarte187
    @diegoduarte187 Рік тому +2

    amazing video,
    you should leave a little more time at the end of the video, so the recommended videos appear there. Currently the explanation of method #3 get interrupted for being at the end of the video

  • @soyboy3274
    @soyboy3274 Рік тому +1

    Very nice

  • @m96k3y7
    @m96k3y7 7 місяців тому +1

    Sadly... I slept at math, so thank you! 😂

  • @boywithacoin
    @boywithacoin Рік тому +1

    I like your examples of UI animation. This animation you've done are not simulative, right?
    The animations you've shown doesn't take velocity or other physical properties in consideration, right? Is it possible for you to do a video on spring-based system and normal curves?
    Great video!

  • @eky
    @eky Рік тому +1

    How do you generate the voice on these videos? It sound super real 👍

  • @TinyDeskEngineer
    @TinyDeskEngineer Рік тому +1

    I always wondered how texture filtering worked, yet never considered lerp.

  • @leeoiou7295
    @leeoiou7295 Рік тому +1

    lerping is the most underrated field in math

  • @schobihh2703
    @schobihh2703 Рік тому +2

    I wonder if the log function for zoom in zoom out should not be a sqrt function for natural view, because then your velocity with which you distance in or out is constant, as the area you cover increases with the sqr of the distance.

  • @simtrip6452
    @simtrip6452 5 місяців тому +1

    I'm not sure if what happened at 7:47 was a genuine audio screwup or you faked out censoring the word "infuriating" but I love it

    • @simondev758
      @simondev758  5 місяців тому

      Oh weird, yeah that's totally something going wacky with the audio heh

  • @Skyite
    @Skyite 6 днів тому

    Look at this remind me abt bezier curves is just lines lerping together

  • @anonymoussloth6687
    @anonymoussloth6687 Рік тому

    I really have to ask. Where do you learn this stuff and what resources do you use? I am not just referring to the concepts since i was familiar with most of them. I mean their practical applications and real examples

    • @valovanonym
      @valovanonym Рік тому

      Mostly practice and experimenting by doing small projects and larger ones

    • @anonymoussloth6687
      @anonymoussloth6687 Рік тому

      @@valovanonym i understand practice is key, but I am asking where did he learn this because you can only practice something after you learn it

  • @SteinGauslaaStrindhaug
    @SteinGauslaaStrindhaug Рік тому +1

    As a web frontend programmer for an online store, I rarely get to very fancy animations... I rarely end up using anything except a linear interpolation and very rarely ease in out.
    But if I did use anything more fancy it would be annoying as heck to use. Because in a tool such as a webshop any animation must finish in under a second, usually between 200 ms and 400 ms not to feel frustratingly sluggish. Only when doing large distance animations such as dialogs animating onto or off the screen I get to use up to 1.2 seconds long animations; but usually half of it is basically transparent anyway.

    • @pineapplerindm
      @pineapplerindm Рік тому

      i never specify the ease function to use CSS's built-in ease -
      transition: 0.2s;
      animation: animation-name 0.2s;

  • @isbestlizard
    @isbestlizard Рік тому +1

    omg definitely use quaternions to interpolate between two random rotations ;D

  • @odinmagick
    @odinmagick Рік тому +1

    Is there a course that teaches you the various ways to apply this? I’ve been having very limited success in experimenting by myself and I think I need, like, a legit teacher to help me step by step

    • @simondev758
      @simondev758  Рік тому +1

      Yeah, I have a shader course that uses lerp (mix in glsl) extensively.

  • @bdenix1997
    @bdenix1997 Рік тому +2

    on the 3rd method, frame independent lerp thing,
    its ilke K = 1 - pow ( K , frameTime)
    we're using the variable K when declaring it is odd.
    shouldn't it be pow(constant , frameTime) ?

    • @simondev758
      @simondev758  Рік тому +1

      Oops, yeah, it's more like
      K = some_constant
      K = 1 - pow(K, frametime)
      etc..

  • @givrally7634
    @givrally7634 Рік тому

    After plotting a few of the smoothstep family of functions, it seems like it gets steeper and steeper in the middle. Does it converge towards the discontinuous step function, or towards a "smoothest" step function ?
    My intuition would be the former, since the nth derivative of S_n is made to be zero at x=0 and x=1 on purpose, the taylor series should be 0 + O(x^n) and 1 + O(x^n) respectively, and thus should converge to 0 and 1, with a discontinuity in the middle. Maybe the function isn't analytical, but all smoothstep functions are polynomials and therefore analytical, so I don't think that's possible...

  • @GuagoFruit
    @GuagoFruit Рік тому

    I have a bit of a problem: what function f is required for C=slerp(A,B, f(t)), such that the dot product of C,B increases linearly for t in [0,1]? The angle between A,B is always less than 90 degrees if that makes a difference.

  • @givrally7634
    @givrally7634 Рік тому +1

    2:43 "A parabola..."
    *shows a bell curve*