Image programming in actionscript3 games)

Source: Internet
Author: User
2.3.1 use square to observe the difference between the inclined face style and the diagonal face Filter


Create a 500*500 blank file in Photoshop and Flash respectively, and draw a blue (# 0000ff), 100*100 square block in the center of the canvas, (If you do not know how to complete the above operations, you can read the relevant introductory materials on your own) and then take another step in flash, press F8 to convert to a component, and select "video editing" as the type ".


In order to minimize the interference of the research on this subject, the projection we created strives to be the simplest and cleanest. To this end, I set the Blur in the projection filter in flash to 0 and highlight the color (#00cc00). The distance is also 30 pixels (Figure 2.49 ).

 

Figure 2.49 flash Test Cases


In Photoshop, we also made such a projection (Figure 2.50 ).

Figure 2.50 Photoshop Test Cases


The following shows how to add relief effects to these two images. Flash uses a diagonal filter, and Photoshop uses a slope and Relief (Figure 2.51, figure 2.52 ).

Figure 2.51 Add a diagonal filter to the Flash Block

 

Figure 2.52 add slope and relief styles to Photoshop Blocks


It can be seen that the biggest difference between the two is that flash has made the projection out of the slope, but the relief of photoshop does not affect the effect of the projection style.


Through such an experiment, I believe everyone can understand the reason why the oblique filter on the text is out of the border.


The Method to Solve the Problem of Flash Beam Filter is simple: as long as you drag the beam filter to the projection, the beam will no longer apply to the projection (Figure 2.53 ).

Figure 2.53 adjust the filter Sequence


Let's go back and make the same correction for our text (Figure 2.54 ).

Figure 2.54 text effect after the filter order is adjusted


The edge problem is solved, but the edge of the oblique angle is not smooth, especially when there are many points at the turning point, it is even more uneven.


We tried to set other simulated parameters to be consistent with Photoshop. For example, the angle should be changed to 60 degrees based on the projection method, and then the color is changed. In Photoshop, 75% Alpha is given to both the highlights and shadows as the default value, so we can change the flash. In addition, we should simply adjust the quality to "high.


The modified effect is shown in 2.55.

 

 

Figure 2.55 effect after adjusting opacity and other parameters


There is no obvious improvement. The highlight and shadow of the relief are still too heavy. So, where is the gap?

 


 

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.