A collection of Unity game development tips Create transparent materialsUnitycreate a transparent material
There is no lack of transparent or translucent things in life. For example, a very clean glass, which looks transparent, is a plastic card that looks translucent,as shown in3-23 . In Unity , you can create a material that simulates the transparency effect, which is the main explanation in this section.
Figure 3-23 semi-transparent cards
UnityCreate and configure a material
project View, create a material and name it transmaterial inspector view modify shader transparent/diffuse 3-24
Figure 3-24 set the material's Shader Properties
Unitycreate a texture with transparent effect
Select an interesting picture, this section will be PhotoShop This image is simply about adding transparency to the image. The example selects the picture as shown in 3-25.
Figure 3-25 Sample Picture
( 1 in the channel window, create a new channel, using the default name Alpha 1 .
( 2 ) Select rgb channel, then use photoshop alpha 1 Channel, The outline of the background is still visible under this channel. Use the Paint bucket tool to fill the background outline with black, 3-26
Figure 3-26 add transparent information to an image
( 3 ) to store this file and import Unity For the next use.
Creates a transparent material.Effect Show
select project in the view transmaterial inspector view modify base (RGB) Trans (A) transmaterial material onto this cube object, you can see the effect in the scene, 3-27
Figure 3-27 transparent material effect comparison
This article is selected from: Unity Game Development Tips Collection University bully internal information, reproduced please indicate the source, respect the technology respect the IT person!
A collection of Unity game development tips Create transparent materials