Unity Game Development Tips Collection Create part of the smooth part rough material

Source: Internet
Author: User

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

    • q Specular Color : The color of the light reflected by the mirror can be adjusted.

    • q shininess : The intensity of the light reflected by the mirror can be adjusted.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.