Category: Maths

  • Inverse Kinematics in 2D – Part 1

    Inverse Kinematics in 2D – Part 1

    If you have been following this blog for a while, you might have noticed some recurring themes. Inverse Kinematics is definitely one them, and I have dedicated an entire series on how to apply it to robotic arms and tentacles. If you have not read them, do not fear: this new series will be self-contained,…

  • Atmospheric Scattering Shader

    Atmospheric Scattering Shader

    This tutorial finally concludes our journey to simulate Rayleigh Scattering for a planet’s atmosphere. The next (and final) part will show how to change the shader to also include an additional type of scattering, known as Mie Scattering. You can find all the post in this series here: You can download the Unity package for…

  • A Journey Through the Atmosphere

    A Journey Through the Atmosphere

    This post describes how to model the density of the atmosphere at different altitude. This is a critical step, since the atmospheric density is one of the parameters necessary to correctly calculate the Rayleigh scattering. You can find all the post in this series here: You can download the Unity package for this tutorial at…

  • The Mathematics of Rayleigh Scattering

    The Mathematics of Rayleigh Scattering

    This post introduces the Mathematics of Rayleigh Scattering, which is the optical phenomenon that causes the sky to appear blue. The equations derived in this tutorial will be translated into shader code in the next tutorial. You can find all the post in this series here: You can download the Unity package for this tutorial…

  • CD-ROM Shader: Diffraction Grating – Part 2

    CD-ROM Shader: Diffraction Grating – Part 2

    This post completes the series on how to create a shader for CD-ROMs. You can find the complete series here: A link to download the Unity project used in this series is also provided at the end of the page.

  • The Theory Behind Atmospheric Scattering

    The Theory Behind Atmospheric Scattering

    This is the second part of the tutorial on volumetric atmospheric scattering. In this post we will start deriving the equations that govern this complex, yet beautiful optical phenomenon. You can find all the post in this series here: You can download the Unity package for this tutorial at the bottom of the page.

  • Intersecting The Atmosphere

    Intersecting The Atmosphere

    You can find all the post in this series here: You can download the Unity package for this tutorial at the bottom of the page.

  • Fast Subsurface Scattering in Unity (Part 1)

    Fast Subsurface Scattering in Unity (Part 1)

    Most (if not all) optical phenomena that materials exhibit can be replicated by simulating how the individual rays of light propagate and interact. This approach is referred in the scientific literature as ray tracing, and it is often too computationally expensive for any real-time application. Most modern engines rely on massive simplifications that, despite being…

  • The Mathematics of Diffraction Grating

    The Mathematics of Diffraction Grating

    This post introduces the mathematics behind the optical phenomenon known as diffraction grating, which is responsible for iridescent reflections in many materials. You can find the complete series here: A link to download the Unity project used in this series is also provided at the end of the page.

  • An Introduction to Gradient Descent

    An Introduction to Gradient Descent

    This post concludes the theoretical introduction to Inverse Kinematics, providing a programmatical solution based on gradient descent. This article does not aim to be a comprehensive guide on the topic, but a gentle introduction. The next post, Inverse Kinematics for Robotic Arms, will show an actual C# implementation of this algorithm in with Unity. The other post in this…