Image programming in actionscript3 games)

Source: Internet
Author: User
3.2.2 high-strength oblique angle simulation so-called "carving clear"


Many ActionScript books or online tutorials like to use high-intensity parameters as an example to illustrate the implementation of carving clarity when introducing corner filters (Figure 3.38 ).

 

Figure 3.38 clear carving with a high-intensity oblique Filter


In fact, this practice cannot withstand scrutiny. First, there is no division between the two glossy surfaces and the two dark surfaces. Second, the image in the instance is a rectangle. If you replace it with the text of a complex outline, this so-called clarity seems abrupt (Figure 3.39 ).

 

Figure 3.39 clear letter carved with Flash Simulation o


The effect of Photoshop on these two details is far better than that of Flash (Figure 3.40, figure 3.41 ).
 

Figure 3.40 use PS to draw clearly carved squares

 

 

Figure 3.41 carved clear letters in Photoshop


In addition, for non-45 degrees angle, the demarcation points in Flash may even be distorted (Figure 3.42 ).

 

Figure 3.42 60-degree angle of Flash


If the height of the clearly carved slope is small, or the shape is not complex, the high-strength oblique angle is generally competent. However, if the height is large and such details must be improved, it will be more difficult, but here I can first give a relatively simple solution.


For a square, an angle filter can only generate a line at most two inflection points, either left and right (Figure 3.43), or right and left (Figure 3.44 ).

 

 

Figure 3.43 135 degrees, demarcation points on the left and bottom right
 

Figure 3.44 45 degrees, demarcation points on the right and bottom left


In the same filter, two angles cannot coexist, but we can assign two filters to the Display object (as mentioned in the last two sections, in the same Display object, you can set multiple filters of the same type.

 

We apply the two oblique filters to the square, and set the highlight and shadow transparency of the upper filter (that is, the one added later) to 50%, as shown in Figure 3.45.

 

Tip: You can use the copy filter method to quickly generate two identical filters, and then change the angle and alpha of one of them.



Figure 3.45 use two oblique filters to simulate higher accuracy of carving


Although we still cannot accurately control the color of each face, this action at least gives us a clear path, and the delicate carving is clearly accurate to the simulation in flash. For complex graphics, we can copy more layers, and then use the mixed mode and other knowledge to achieve precise control of Embossed colors. I will discuss these content one by one in subsequent chapters.

 


 

Image programming in actionscript3 games)

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.