15 thoughts on “Missing AS3 examples”

  1. Wow! 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.

  2. Hi 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.

    ++

  3. Why 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.

  4. hum 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?

    ++

  5. Oh 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)

  6. I 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.

  7. Okay, 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 ;)

  8. I’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?

  9. Hi
    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
    ++

  10. “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 :)

  11. I’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.

Comments are closed.