Follow these steps:
- Create a new Unity 3D project.
- Create a new 3D Sphere by going to Create | 3D Object | Sphere.
- Select the Sphere GameObject in the Hierarchy window and confirm that it has a Collider component. It will since it's a Unity 3D primitive.
Note
If you are using a custom 3D object in this recipe, you'll have to add a Collider. To do this, in the Inspector window, go to Add Component | Physics | Mesh Collider.
If you are using a custom 3D object in this recipe, you'll have to add a Collider. To do this, in the Inspector window, go to Add Component | Physics | Mesh Collider.
- Create a new material named m_fade.
- With the m_fade asset file selected in the Project window, change its Rendering Mode to Fade in the Inspector window:

Figure 5.20 – Setting Rendering Mode of a material to Fade
The Fade rendering mode is specifically designed for situations such as this recipe.
Other rendering modes, such as Transparent, will turn the Albedo color transparent, but not the specular highlights...
Other rendering modes, such as Transparent, will turn the Albedo color transparent, but not the specular highlights...