-
Senior Front End Developper
I'm building a small animation with 3 object (FPoint, FSurface & FPrism) that I use to simulate 3D Object. Once I calculate the depth and the rotation the 3D point, it's quite easy to draw the figure in MX.
I found a bunch of site to help me with the 3D rotation, but I didn't found one to help me calculate which surface is farthest from the viewew eye, so I can draw it first.
The model I build works fine on the X rotation.
http://www.geocities.com/charlesfk/xRot.html
but of course, it's not working with free X & Y rotation
http://www.geocities.com/charlesfk/free.html
Anyone know of a web site where I can get info to calculate the Z-Buffer ?
[Edited by CharlesFK on 03-21-2002 at 11:05 AM]
-
Gross Pecululatarian
Can't you just use the objects z coord?
-
Senior Front End Developper
I manage to fix the problem by averaging the Z coordinate of each surface after it's been draw then I swapDepths the surface. It's quite complex since it been executed on each frame for all surface. There must be a easier way.
Here's a new sample. On this one, the free rotation works just fine. But it's slow, when there a lot of surface to draw. On this example there's only 4 surface, so it's ok.
http://www.geocities.com/charlesfk/3..._pyramide.html
If anyone interested in the code, just message me.
-
Gross Pecululatarian
Oh, sorry, I didn't realize you meant faces. Averages is what I use too
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|