3D Vector Physics (practical situation)

  • Context: Undergrad 
  • Thread starter Thread starter Alphabit
  • Start date Start date
  • Tags Tags
    3d Physics Vector
Click For Summary
SUMMARY

The discussion focuses on the challenges of implementing a z-sorting algorithm for a vector-based 3D engine developed in ActionScript 3.0. The user has created an API that organizes 3D planes into Building Blocks but struggles with accurately sorting these planes in 3D space due to limitations in processing power and the averaging method used for z-index calculations. The conversation highlights the need for a more flexible and efficient z-sorting solution, potentially involving vector physics or alternative mathematical approaches, while noting that Flash does not support hardware acceleration or OpenGL.

PREREQUISITES
  • Understanding of 3D geometry and vector mathematics
  • Familiarity with ActionScript 3.0 programming
  • Knowledge of z-sorting algorithms in computer graphics
  • Basic concepts of 3D rendering techniques
NEXT STEPS
  • Research advanced z-sorting algorithms such as depth peeling or binary space partitioning
  • Explore vector physics principles relevant to 3D object manipulation
  • Investigate alternative rendering techniques that can be implemented in ActionScript 3.0
  • Learn about software-based z-buffering methods for 3D rendering
USEFUL FOR

This discussion is beneficial for game developers, graphics programmers, and anyone involved in 3D rendering and engine development, particularly those using ActionScript 3.0.

Alphabit
Messages
6
Reaction score
0
Hi everyone, this is my first post on this forum.

Anyway, I was hoping that you might be able to solve a problem I've encountered while programming a vector-based 3D engine in Flash. Here's an example of what I made with it:
http://jongro.phpnet.us/space.html" - It might look like it's working fine, but there is a limitation...

Basically, the API I made takes arrays of 3D planes which are grouped into Building Blocks (a series of planes grouped together to form a 3D basic shape)... Then each of these building blocks is assembled into a final 3D object which you should be able to see in the link above.

Now, you don't really need to worry about the structure, but it might help you find a solution. In any case, each plane has exactly 4 3D points (x, y, z) and, using these 3D points, I need to find a way to arrange the planes in 3D space from front to back. *EDIT* to make a triangular shape, I just set two of the points to the same coordinates... And yes, I know this causes problems with my current z-sorting algorithm*/EDIT*

The way I've done it is took the average z-value of every point in each plane which gave me the "z-index center point" of each plane at any time and I used this number to sort the planes from greatest to least... And display them on the screen accordingly.

Now The problem with this is that It allows very little flexibility in the design of my 3D objects. Take this for http://jongro.phpnet.us/3ddddd.gif" (they won't make a great deal of sense as they are, but you'll get the drift).
From looking at the diagram we can tell that the semi-transparent square-plane will be in front of the other one... But the problem is that, in some cases, the average z-index will not accurately tell which plane is in front.

Another problem is that, due to the limited processing power of the programming language I am using (ActionScript 3.0), I cannot have it do a per-pixel z-sorting... Instead I have to find a way to make the z-sorting work using Vector physics or other mathematical concepts.

Also, it might be processor intensive if I were to do comparative-checking, but if you've got a good way of doing it, please share.
That being said, I would rather have a system where every plane generates a value which will automatically place it in the correct position if sorted numerically against other planes.

Is there a way to do this, please share your ideas on this, thanks.

P.S. Please avoid using mathematical terms or if you do, tell me what they represent because I'm not much of a mathematician or physicist.:smile:
 
Last edited by a moderator:
Physics news on Phys.org
... It seems more complicated than I thought.
Does anyone have any pointers on this? Is it even possible?

Thanks
 
Your video card normally uses a z-buffer. Considering how far you've come already, I presume you can find out all the details yourself (basically, just keep track of the z value for each individual pixel, in order to decide whether to paint over it). Can flash use openGL?
 
cesiumfrog said:
Can flash use openGL?

No, Flash does not support hardware acceleration; I guess Macromedia/Adobe thought it was best to keep the Flash Player as small, compact and portable as possible.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K