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 at the bottom of the page.

Continue reading

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.

Continue reading

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.

Continue reading

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.

Continue reading

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 unable to reproduce photorealism, can produce a believable approximation. This tutorial introduces a fast, cheap and convincing solution that can be used to simulate translucent materials which exhibit subsurface scattering.

This is a two part series:

At the end of this post, you will find a link to download the Unity project.

Continue reading

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.

Continue reading

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 series can be found here:DistanceFromTarget

At the end of this post you can find a link to download all the assets and scenes necessary to replicate this tutorial.

Continue reading

Implementing Forward Kinematics

This tutorial continues our quest to solve the problem of forward kinematics. After exploring a mathematical solution in The Mathematics of Forward Kinematics, we will see how to translate it into C# for Unity. The next tutorial, An Introduction to Gradient Descent, will finally show the theoretical foundations to solve inverse kinematics.

The other post in this series can be found here:

At the end of this post you can find a link to download all the assets and scenes necessary to replicate this tutorial.

Continue reading

The Mathematics of Forward Kinematics

This tutorial starts our journey into the world of inverse kinematics. There are countless ways to approach this problem, but they all starts with forward kinematics.

Inverse kinematics takes a point in space, and tells you how to move your arm to reach it. Forward kinematics solves the opposite, dual problem. Knowing how you are moving your arm, it tells which point in space it reaches.

The other post in this series can be found here:

At the end of this post you can find a link to download all the assets and scenes necessary to replicate this tutorial.

Continue reading

Positioning and Trilateration

This post shows how it is possible to find the position of an object in space, using a technique called trilateration. The traditional approach to this problem relies on three measurements only. This tutorial addresses how to it is possible to take into account more measurements to improve the precision of the final result. This algorithm is robust and can work even with inaccurate measurements.

If you are unfamiliar with the concepts of latitude and longitude, I suggest you read the first post in this series: Understanding Geographical Coordinates.

Continue reading