A collection of Unity game development tips Create transparent materials

Source: Internet
Author: User

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

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.