Unity Game Development Tips Collection Create part of the smooth part rough materialCreate a partially smooth part of the rough material
in life, the surface of a class object has both a smooth part and a rough part, such as the Lijiang Stone, 3-17 The surface of the slate, as shown, was originally rough, but on the slate there were more people, and a part of the slate became smooth. Sometimes, in order to appear more realistic, the game needs to simulate such a material.
Figure 3-17 Lijiang Stone pavement with smooth and rough surface
To make a partially smooth part of a rough material, two resources are needed: a material with a mirror shader and a texture that simulates the reality of the situation.
in UnityCreate and configure a material
project View, create a material and name it rustymetalmaterial inspector view modify shader specular 3-18
Figure 3-18 set the material's Shader Properties
in this type of shader
make textures that combine smooth and coarse effects
The texture used in this section simulates the rusty metal surface, partly because of the rust and roughness of some of the smooth parts, 3-19 is shown. This section intends to make some simple modifications to the texture: Add transparency information, and write text on the texture to bring out the different effects at a smooth and rough position.
Figure 3-19 texture of metallic surface effect with raw embroidery
Use PhotoShop Open the texture, and then click the following action:
( 1 alpha 1 alpha 1 alpha 1 3-20
Figure 3-20 Set Alpha 1 the brightness and contrast of the channel image
( 2 switch to the layer view, and then add the yellow text to the image, and the text content is arbitrary. Then set the text layer as the overlay effect, the opacity is 80%,3-21 , compared with the text set before and after the difference in effect. In this case, the text appears to be written on the surface of the metal, not on the rust.
Figure 3-21 Set the text layer as an overlay effect, with an opacity of 80%
( 3 after merging the text layer and the image layer, the file is stored and then imported into Unity used in the.
Part of the smooth part of the rough materialEffect Show
importing textures from the previous section into unity project in the view rustymeterial inspector base (RGB) Gloss (A) inspector 3-22
Figure 3-22 Material effect Display
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!
Unity Game Development Tips Collection Create part of the smooth part rough material