Parallax Shaders & Depth Maps

In the previous part of this series, Inside Facebook 3D Photos, we have explained how modern mobile phones are able to infer depth from pictures. Such a piece of information is stored in a depth map, which is used for a variety of effects. From blurring the background to three-dimensional reconstruction, this type of technology will become more and more present in our daily lives.

This is a two-part series. You can read all the posts here:

A link to the complete Unity package is available at the end of the tutorial.

Continue reading

Inside Facebook 3D Photos: Parallax Shaders

In the past few months, Facebook has been plagued filled with 3D photos. If you have not had the chance to see one, 3D photos are images inside a post which gently change perspective as you scroll the page, or as you move your mouse over them.

A few months prior to their introduction, Facebook had been testing a similar feature with 3D models. While it is easy to understand how Facebook can render 3D models and rotates them according to the mouse position, the same might not be as intuitive for 3D photos.

The techniques that Facebook is using to create the illusion of three-dimensionality on two-dimensional pictures is sometimes known as height map displacement, and it relies on an optical phenomenon called parallax.

This is a two-part series. You can read all the posts here:

A link to the complete Unity package is available at the end of the tutorial.

Continue reading

Shader Showcase Saturday #11: Return of the Obra Dinn

Most indie developers might know Lucas Pope as the developers of the critically acclaimed Papers, Please. Thanks to its simple, yet thoughtful mechanics, Papers, Please helped to shape an entirely new genre of video games. And it even inspired a short film with the same name.

Despite its success, one of the most recurring criticisms the game has faced is related to the apparent simplicity of its execution. With Return of the Obra Dinn, Lucas Pope clears any doubt with a game that, by itself, is nothing less than an achievement in technical excellence.

Continue reading

Shader Showcase Saturday #10: Fortnite Procedural Animations

It is no mystery that Fortnite has now become one of the most successful computer games of all time. While many see it as a case study for excellence in marketing and game design, the game itself features some very interesting shader effects.

From a Technical Artist perspective, the most striking effect featured in Fortnite is the self-building effect. When an object is being constructed, its individual pieces appear one by one out of thin air, and fly into position. The same effect is somehow played, in reverse, when an object is damaged, by showing those very pieces flying away and disappearing (above).

Continue reading

Shader Showcase Saturday #8: Subsurface Scattering

If you ever placed a strong light source behind your hand, you might have noticed how light is able to filter through the skin. Even more interesting is the fact that light “travels” inside the skin, and can sometimes make the entire hand glow. This optical phenomenon is called subsurface scattering (or SSS) and is caused by individual photons penetrating the skin, bouncing (scattering) inside it, and finally exiting from a different point. For this reason, subsurface scattering is also called subsurface light transport.

Most semi-transparent materials exhibit a certain degree of SSS, which gives them a “smoother” look. Milk, for instance, owe its uniform colouration to the presence of fat molecules which diffuse and scatter visible light very well. Even solid materials can be subjected to SSS. Marble is a typical example, and this is the reason why most subsurface scattering demos feature marble statues. Skin, milk, marble and wax are the materials which most commonly owe their look to SSS, although this is an optical phenomenon that is present in virtually all non-metallic materials.

Continue reading