Missing AS3 examples
February 16th, 2006
I'm converting my AS3 examples from time to time to the current BETA built. I will update this posting, whenever an example is updated to the current flash8.5player.
Perspective Texture Mapping Thanks to Denis Chait for the 3dMax scene
: Nice adaption with a video, projected onto the wall (speaker: Blixa Bargeld)
BitmapCloud 9180 particles | source
Stay tuned.
Filed under: actionscript
15 Responses to “Missing AS3 examples”
-
Guojian Says:
February 16th, 2006 at 4:07 pmWow! I never expected to see something like this in flash for another version or two. Nice.
I also didnt expect to see you post on your blog so soon… not that I’m complaining, i always enjoy looking at what you come up with next.
-
kiroukou Says:
February 16th, 2006 at 4:15 pmHi andre and thanks !
You perspective texture mapping missed me. But can you change the sens of rotation around the vertical axis? It’s inverted at the moment, and make the navigation quite hard.
++
-
André Michelle Says:
February 16th, 2006 at 4:47 pmWhy do think its inverted ? Don’t know, how its implemented in 3D games, but I would expect to rotate “towards” the direction, the mouse is pointed to. I just tried it, but it was completly weird to control.
-
kiroukou Says:
February 16th, 2006 at 4:56 pmhum you swf has changed right? Because the first one I saw wasn’t exactly the same. Or maybe it was the camera which was pitch about 180 degrees.
Now it’s perfect! Impressive stuff.
You are using Z-buffer right? so with a scan-line algorithm. What is the precision you are using for the linear texturing?++
-
André Michelle Says:
February 16th, 2006 at 7:05 pmI’m not using linear mapping :) The perspective correction offsets are also interpolated over the scanlines.
-
kiroukou Says:
February 16th, 2006 at 7:19 pmOh okay!
And I have an other question if you don’t mind. Are you using a clipping on the 4 edges in the 2D screen(coordinates), or onto the 6 planes of the view frustrum in the 3D coordinates ? And after the clipping do you keep a polygon instead of a triangle, or do you cut the polygon into several triangles, before display it?thanks ! (btw I think it was just a camera problem before, sorry)
-
André Michelle Says:
February 16th, 2006 at 7:30 pmI tried a simple 2D Clipping, but the texture coordinates seem not be linear after projection. So, I’ve implement a frustum clipping today, neglecting the far zPlane. After clipping, polygons can have more than 3 vertices. Before rendering, I just cut them into 3 vertices pieces.
-
kiroukou Says:
February 16th, 2006 at 7:43 pmOkay, that’s what I was thinking about.
Really good job !
I really hope to add those features into Sandy too. But later, first things first ;) -
old9 Says:
February 18th, 2006 at 10:53 amI’m sorry but I got an error dialog
“VerifyError: Error #1042: Not an ABC file. major_version=46 minor_version=16″ titled “Macromedia FlashPlayer 8.5″ when I clicked on those demo links. Any suggestion here? -
bubbleball Says:
February 19th, 2006 at 6:11 pmwow it so cool and inspire me so much. I love it and I hope thai I can do this in someday.
-
mh Says:
February 20th, 2006 at 11:44 pmold9 – You need to download the new Flex builder Beta (not the alpha)
Its worth it, this is incredible! -
kiroukou Says:
February 21st, 2006 at 1:33 pmHi
Andre, I have some extra technical questions, hope I’m not becoming boring….How did you get the frustrum planes?
Did extract them from the view matrix, so you compute them every rendering time ?Maybe you have some good ressources and links on this subject. In that case would you agree to share them ? :) I’m very interessted.
>> After clipping, polygons can have more than 3 vertices. Before rendering, I just cut them into 3 vertices pieces.
I knew that. But it should also change your texture coordinate right? So you just do an interpolation to get new ones?thanks
++ -
André Michelle Says:
February 21st, 2006 at 4:08 pm“How did you get the frustrum planes?”
I compute them after the camera is defined (eyeAngle). Transforming vertices through the camera and object matrix means, that you translate them “in front of” the camera position, angular displacement. So the frustum itself never changed.
“Maybe you have some good ressources and links on this subject. In that case would you agree to share them ? :)”
I’m not sure, if my equations are proofed, but they works pixelexact. I’ve read a lot of tutorials about it, so it is the result of all tutorials I found together. Sad, I didn’t bookmark anyone.
“But it should also change your texture coordinate right? So you just do an interpolation to get new ones?”
You can use the same ratio/slope to cut the uv mappings as the vertices. And of course, you have to do this :)
-
PercyPea Says:
March 3rd, 2006 at 2:06 pmBrilliant work André! When are you going to make Quake then? :)
-
Iago Says:
March 23rd, 2006 at 5:33 pmI’m very interested in how do you render pixels to screen in Perspective Texture Mapping sample… also… zBuffer is an array made by you???
Wow… I’m waiting to see the sources as soon as posible.
