Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3456324
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:43:21+00:00 2026-05-18T09:43:21+00:00

I am writing a 3D engine for AS3.0… And I ran into an annoying

  • 0

I am writing a 3D engine for AS3.0… And I ran into an annoying problem. AS3.0 currently supports only affine Bitmap transformations (the 3D is far too hard to manage, that is why I am writing the engine) – which means that I can not achieve true perspective on big vertices.

I could do a loop and render each pixel of the Bitmap based on its Z position… But that is something 1000 times more than most computers can do, because perspective is non-linear…

So – the solution would be – to split up the vertex automatically (so the programmer / modeler does not have to do it) into smaller triangles.

Unfortunately this is… choppy…? The affine transforms won’t be precise enough, or would be, but they won’t fit on the other triangles… An image to demonstrate:

(dead image)

As you can see on the red parts, they are very choppy, most noticeable in the front middle column.

So – what am I doing wrong? How is this done in Sandy, away3D, Alternativa to name a few with some perspective?

EDIT 1: The code I am using for transforming to triangles looks like this:

public static function transformTriangle(bd:BitmapData, pts:Vector.<Point>, gfx:Graphics):void {
    var matrix:Matrix = new Matrix();
    matrix.tx = pts[0].x;
    matrix.ty = pts[0].y;
    matrix.a = (pts[1].x - pts[0].x) / bd.width;
    matrix.b = (pts[1].y - pts[0].y) / bd.height;
    matrix.c = (pts[2].x - pts[0].x) / bd.width;
    matrix.d = (pts[2].y - pts[0].y) / bd.height;
    gfx.beginBitmapFill(bd, matrix, false, true);
    gfx.moveTo(pts[0].x, pts[0].y);
    gfx.lineTo(pts[0].x, pts[0].y);
    gfx.lineTo(pts[1].x, pts[1].y);
    gfx.lineTo(pts[2].x, pts[2].y);
    gfx.lineTo(pts[0].x, pts[0].y);
    gfx.endFill();
}

EDIT 2: Here is a small demo of the transformer:

CLICK HERE (dead link)

(arrows to control the blue points, 1-3 to change selected handle – try both numpad and top numeric keys)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:43:21+00:00Added an answer on May 18, 2026 at 9:43 am

    I think if you try using drawTriangles instead it will fix your problem. Here are some posts related to drawTriangles and z-sorting link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.