After flash8 is announced, the beta members are allowed to post their examples.
Unfortunatly I don’t have a lot of examples to publish, since they don’t work as expected yet. Anyway flash8 is a real milestone of flash itself, but in relation to performance, I’m furthermore disappointed. That includes the built-in native BitmapData methods and filters. But as in earlier versions, we might find workarounds to increase actionscript speed and rendering performance.
visit the 8ball lab
To avoid the use of overloaded MovieClips I’ve built a Tilemapper with copyPixels. In this example, the screen is rendered every frame and after all it is fast. Just a short demo to brief myself in the copyPixels method. Tilesize 8px.
A short application of the water study below. Needs a fast computer.
By the use of the ConvolutionFilter and the paletteMap method, its very easy to make some fire and/or flames. The bad site is the performance. Only 2 native functions are necessary for this effect and I forced the player only to apply the effect in the near enviroment. If you spread the flame over the screen, you can see, how the FPS decreases immediately.
A demo to sample, if the DisplacementMapFilter can store perspective projection to apply textures fast on a static 3D camera view.
This one is nice, if you own a fast computer. About 80fps, the water effect is very realistic by using wave-map-sampling. I used the BitmapData class to reconstruct the algorithm in the article above. Even BitmapData can only store Integers as colorvalues, the effect works well, but it slows down your computer too much. So sad.
The mode7 example demonstrates a very clean mode7 engine with different Camera heights, field-of-view and a faked roll displacement. By now it’s possible to place sprites on the plane. I’m trying to extend it to a tilemapper which provides endless planes in theory. Furthermore, I had a version with motion blur while flying over the plane. Needs some fixing though. Note that every slice is only one pixel high, so you have here the best resolution.
update: define a clip distance and apply fog
– texture mapping
An example to show linear texturemapping from uv-coordinates to a distorted polygon. This allows you to import 3d models (with of course only a few polygon) and render them with their textures. For a lot of models, that cannot come to close to the camera, the projection is well enough to provide a real 3d feeling.
The zBuffer is normally a 2d Array with floats, used by 3d engines to proof visibility of rendered pixels. The z-coordiantes can be interpolated linear, so I started to draw the (z) gradients from the polygons. There are several uses of the zBuffer. In combination with the blendMode “lighten”, it should be possible to extract a mask for intersecting polygons.
More to come.