A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Z-Buffering

  1. #1
    Life Member
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    87

    Z-Buffering

    hello, i'm trying to make a 3d engine but i want to implement z-buffering on the faces - i use 3 point poly faces.

    does anyone know the algorithm for it or something like that??

  2. #2
    Junior Member
    Join Date
    Nov 2003
    Posts
    11
    I don't know any algorithms, but i guess a z-buffert would consist mainly on two things:

    1. a device to determine wether a surface is facing towards the beholder. surfaces facing away are not displayed.

    2. a device for determing the distances between the eyepoint and the surface. surfaces closer to the eye is drawn on top of surfaces farther away.

    for point 1 you will only have to know the normal for the surface.

    point two will be trickier, since some polygons ar partly hidden, and can go into each other.. I think that calculating on the center of the polygon is not enough in most cases... what i guess you need to do is find the intersections, then calculate them using massive trigonometry... or something.

    many Z buffers, for example the one in open gl, have problems with intersections. edges get zig-zagged along the intersections from some angles, and I seriously have no idea of why and what to do about it. It makes me believe however that the intersections are the hard part.

    cheers mate.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center