3D Printer Shader Effect – Part 2

This is the second part of the tutorial that will recreate the 3D printer effect seen in games such as Astroneer and Planetary Annihilation.

a1

This is a two part tutorials:

A link to download the Unity package (code, shader and 3D models) is provided at the end of the tutorial.

Continue reading

3D Printer Shader Effect – Part 1

This tutorial will recreate the 3D printer effect seen in games such as Astroneer and Planetary Annihilation. It’s an interesting effect that shows an object in the process of being created. Despite looking simple, there are many challenges that are far from being trivial.

a1

This is a two part tutorials:

A link to download the Unity package (code, shader and 3D models) is provided at the end of the tutorial.

Continue reading

Physically Based Rendering and lighting models in Unity3D

Part 1, Part 2, Part 3, Part 4, Part 5, [download the Unity3D package]

Why is it colder at the poles and hotter on the equator? This question, which seems completely unrelated to shaders, is actually fundamental to understand how lighting models work. As explained in the previous part of this tutorial, surface shaders use a mathematical model to predict how light will reflect on triangles. Generally speaking, Unity supports two types of shading techniques, one for matte and one for specular materials. The former ones are perfect for opaque surfaces, while the latter ones simulate objects which reflections. The Maths behind these lighting models can get quite complicated, but understanding how they work is essential if you want to create your own, custom lighting effect. Up to Unity4.x, the default diffuse lighting model was based on the Lambertian reflectance. Continue reading