Flash Player 10 experiment #1: Cloth Texture Mapping


Cloth Demo

This demo is a combination of the new drawing API features like drawTriangles combined with an object made from APE (ActionScript Physics Engine). The texture that is mapped across the shape in this demo can be an image, video, pixel bender or simple color.

In the color demo you can see that the cloth has two sides. This is done with the concept of backface culling. When drawing triangles, you can specify if positive or negative triangles should be bypassed in rendering. This means that for a 3D app, you don’t need to double render, but for this far simpler example you can draw the negative triangles with a different texture by doinga second fill process where you don’t draw the positive triangles.

more to come!

Cloth demo detail images

BTW, if you are using APE and want to export to for Flash Player 10, you will need to go through and rename the Vector Class to something else since it will conflict with the new Vector data type.

~ by mjcprasad2000 on April 30, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: