# Collection of Useful Curve Shaping Functions

**URL:** <https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704>\
**Category:** Resources & Knowledge\
**Tags:** math, shaders\
**Created:** [December 16, 2017, 6:24am UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704 "2017-12-16T06:24:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeepSpaceBanana](https://realtimevfx.com/user_avatar/realtimevfx.com/deepspacebanana/32/10548_2.png) [@DeepSpaceBanana](https://realtimevfx.com/u/DeepSpaceBanana)\
**Post date:** [December 16, 2017, 6:24am UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/1 "2017-12-16T06:24:58Z")

</div>

Found this image online, figured it could prove to be useful to you folks out here. It’s a collection of shaping functions. I’m not sure who the original creator is… Wasn’t sure where to post it either, I figured ‘Resources’ was my best bet.

EDIT: The Credit for the image goes to [https://twitter.com/kyndinfo](https://twitter.com/kyndinfo)

 ![kynd](https://realtimevfx.com/uploads/default/original/2X/1/1ff761b19b6df461fc5befeab1e8f979ba17a040.png)

---

<div class="post-metadata">

**Author:** ![Pumpking](https://realtimevfx.com/user_avatar/realtimevfx.com/pumpking/32/3171_2.png) [@Pumpking](https://realtimevfx.com/u/Pumpking)\
**Post date:** [December 17, 2017, 12:52pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/2 "2017-12-17T12:52:53Z")

</div>

Here’s some more easing functions with a little bit of interactivity

> **[Easing Functions Cheat Sheet](https://easings.net/)**
>
> Easing functions specify the speed of animation to make the movement more natural. Real objects don’t just move at a constant speed, and do not start and stop in an instant. This page helps you choose the right...

---

<div class="post-metadata">

**Author:** ![DeepSpaceBanana](https://realtimevfx.com/user_avatar/realtimevfx.com/deepspacebanana/32/10548_2.png) [@DeepSpaceBanana](https://realtimevfx.com/u/DeepSpaceBanana)\
**Post date:** [December 17, 2017, 4:51pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/3 "2017-12-17T16:51:11Z")

</div>

Ah nice! Thanks for sharing.

---

<div class="post-metadata">

**Author:** ![quelsolaar](https://realtimevfx.com/letter_avatar_proxy/v4/letter/q/f6c823/32.png) [@quelsolaar](https://realtimevfx.com/u/quelsolaar)\
**Post date:** [December 19, 2017, 1:53pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/4 "2017-12-19T13:53:27Z")

</div>

My favorite has always been y = 1 / (1 + x \* x)

it gives you a nice bump. Its especially useful because if x is a distance you can avoid a square root since its squared. An example of its use would be to model how much a particle is influenced by a local force.

---

<div class="post-metadata">

**Author:** ![michalpiatek](https://realtimevfx.com/user_avatar/realtimevfx.com/michalpiatek/32/1966_2.png) [@michalpiatek](https://realtimevfx.com/u/michalpiatek)\
**Post date:** [December 19, 2017, 3:08pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/5 "2017-12-19T15:08:23Z")

</div>

I pretty much use these two all the time: x\*x or sqrt(x). This is the same thing but bends the curve in 2 different directions. Basically, whenever I am working with shaders I have this opened and I just work on the curve until I get something that works: [Function Grapher and Calculator](https://www.mathsisfun.com/data/function-grapher.php)

---

<div class="post-metadata">

**Author:** ![BrianKohrman](https://realtimevfx.com/letter_avatar_proxy/v4/letter/b/d07c76/32.png) [@BrianKohrman](https://realtimevfx.com/u/BrianKohrman)\
**Post date:** [December 19, 2017, 7:32pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/6 "2017-12-19T19:32:30Z")

</div>

Thank you for posting this!

---

<div class="post-metadata">

**Author:** ![William\_Mauritzen](https://realtimevfx.com/user_avatar/realtimevfx.com/william_mauritzen/32/1816_2.png) [@William\_Mauritzen](https://realtimevfx.com/u/William_Mauritzen)\
**Post date:** [December 20, 2017, 4:59pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/7 "2017-12-20T16:59:27Z")

</div>

[http://www.kynd.info/log/](http://www.kynd.info/log/)

---

<div class="post-metadata">

**Author:** ![bgolus](https://realtimevfx.com/user_avatar/realtimevfx.com/bgolus/32/2780_2.png) [@bgolus](https://realtimevfx.com/u/bgolus)\
**Post date:** [December 21, 2017, 5:40am UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/8 "2017-12-21T05:40:08Z")

</div>

The first image is nice since it actually lists the math used. It’s a lot of trig functions though, which aren’t great for shaders. I love the easings site too, but it’s just showing built in animations with out the associated math function. Plus some of them are trig based again. Quadratics or other polynomial parametrics are generally better options than anything with trig (and while trig functions are often approximated with polynomials on GPUs anyway, they can be fairly complex equations on their own).

Luckily the easings site are in an open source JQuery plugin.  
[http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js](http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js)

---

<div class="post-metadata">

**Author:** ![Hyrun](https://realtimevfx.com/user_avatar/realtimevfx.com/hyrun/32/1666_2.png) [@Hyrun](https://realtimevfx.com/u/Hyrun)\
**Post date:** [January 12, 2018, 3:57pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/9 "2018-01-12T15:57:37Z")

</div>

Real VFX have curves

---

<div class="post-metadata">

**Author:** ![gmartzloff](https://realtimevfx.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gmartzloff](https://realtimevfx.com/u/gmartzloff)\
**Post date:** [January 16, 2018, 3:19pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/10 "2018-01-16T15:19:05Z")

</div>

Thanks for sharing! I personaly like to use this tool: [Desmos | Let's learn together.](https://www.desmos.com/math)

---

<div class="post-metadata">

**Author:** ![pmiller](https://realtimevfx.com/letter_avatar_proxy/v4/letter/p/a698b9/32.png) [@pmiller](https://realtimevfx.com/u/pmiller)\
**Post date:** [January 30, 2018, 6:47pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/11 "2018-01-30T18:47:25Z")

</div>

I"m new here, so if the questions are easily searchable let me know. In what context do you use these curves? Is there a node in the UE4 material editor that uses this? or am I way off base here. haha

---

<div class="post-metadata">

**Author:** ![JangaFX](https://realtimevfx.com/user_avatar/realtimevfx.com/jangafx/32/15043_2.png) [@JangaFX](https://realtimevfx.com/u/JangaFX)\
**Post date:** [January 30, 2018, 7:04pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/12 "2018-01-30T19:04:57Z")

</div>

In cascade, ue4’s particle editor you can use curves to control color over life, size by life, and other various modules.

---

<div class="post-metadata">

**Author:** ![DeepSpaceBanana](https://realtimevfx.com/user_avatar/realtimevfx.com/deepspacebanana/32/10548_2.png) [@DeepSpaceBanana](https://realtimevfx.com/u/DeepSpaceBanana)\
**Post date:** [January 30, 2018, 10:13pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/13 "2018-01-30T22:13:23Z")

</div>

These curves can be used in a number of ways depending on what your doing, one of the things we commonly do in **shaders** is use gradients or normalized scalar values (-1 to 1) to control things. These curves give us a way to control the easing on these gradients. For example you could use a simple sine wave to create and ocean wave, you could apply that sine wave gradient to one of these formulas to control the tapering on the waves and influence it’s shape.

You could also use it to control the flow and speed of shader animations. There’s quite a lot of uses depending on what your doing.

---

<div class="post-metadata">

**Author:** ![pmiller](https://realtimevfx.com/letter_avatar_proxy/v4/letter/p/a698b9/32.png) [@pmiller](https://realtimevfx.com/u/pmiller)\
**Post date:** [February 18, 2018, 3:52am UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/14 "2018-02-18T03:52:12Z")

</div>

Sorry i didnt check back sooner guys. I appreciate the answers! It finally makes sense to me.

---

<div class="post-metadata">

**Author:** ![gyepes](https://realtimevfx.com/user_avatar/realtimevfx.com/gyepes/32/3719_2.png) [@gyepes](https://realtimevfx.com/u/gyepes)\
**Post date:** [February 20, 2018, 7:59pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/15 "2018-02-20T19:59:16Z")

</div>

This is so incredibly useful, thanks for putting this together and sharing!

---

<div class="post-metadata">

**Author:** ![Bruno](https://realtimevfx.com/user_avatar/realtimevfx.com/bruno/32/306_2.png) [@Bruno](https://realtimevfx.com/u/Bruno)\
**Post date:** [March 28, 2018, 4:49pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/16 "2018-03-28T16:49:57Z")

</div>

This is a really good talk with some great examples:

[![](https://img.youtube.com/vi/mr5xkf6zSzk/maxresdefault.jpg "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations") ](https://www.youtube.com/watch?v=mr5xkf6zSzk)

---

<div class="post-metadata">

**Author:** ![cannabis.cod3r](https://realtimevfx.com/user_avatar/realtimevfx.com/cannabis.cod3r/32/5443_2.png) [@cannabis.cod3r](https://realtimevfx.com/u/cannabis.cod3r)\
**Post date:** [March 29, 2018, 6:43pm UTC](https://realtimevfx.com/t/collection-of-useful-curve-shaping-functions/3704/17 "2018-03-29T18:43:51Z")

</div>

Curves are incredibly versatile and I absolutely love them. In UE4 I started down the road of defining a fixed set of curves like this. However, I decided to let the user assign an arbitrary curve in-editor (UCurveFloat). This allows me to bypass defining a function in favor of letting users _draw the curve_ they want.
