Unity3d Development (ix): Unity3d Streamer Effect

Source: Internet
Author: User

Tribute to the original http://blog.csdn.net/onerain88/article/details/19939181

Previously noticed that the properties of the texture in the material have tiling and offset, but did not delve into its purpose, today just know can use offset to do UV animation, to complete a variety of interesting animation, such as streamer effect!

The flow effect is usually a high-gloss light across the object, simulating the effect of high-light moving objects, before the use of shader per frame to pass an offset value, modified high-light texture sampling UV, so as to achieve its effect. In this way, it is necessary to implement shader, the simple same speed movement is very easy to achieve, if you want to move with the degree of change, you need to implement the speed curve of the resolution (and passed to shader) to achieve this.

Did not expect to be used for displacement action, skeletal action of the animation unexpectedly also have this function!

Animation can be used for object rendering (Unity version 4.3 and 4.2 are slightly different)

In the shader section, there are two textures, the basemap and the highlight, and it is important to note that if you want to move the UVS, you must declare their ST properties so that the UV offsets can be computed by the built-in method Transform_tex (), shader as follows

Only a very simple algorithm is used to calculate the final color values, the high-gloss overlay basemap Color increases the high-light alpha-fold, which can be calculated according to demand!

In the animation keyframe, according to the art demand design curve,

Run effect

Note that this method cannot be applied to Ngui because the Ngui is different from the normal object in its organization vertex mode!

Accessories download

Unity3d Development (ix): Unity3d Streamer Effect

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.