www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/09/03:46:57

From: qball1723 AT aol DOT com (QBall1723)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 3D Stuff in Allegro
Date: 9 Jan 1998 08:30:03 GMT
Lines: 49
Message-ID: <19980109083001.DAA01933@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
References: <67vlel$lk0 AT nexus DOT nexus DOT edu DOT au>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>Hey, if anybody could help me with this it would be much appreciated!
>
>I'm using persp_project( fixed, fixed, fixed, fixed* fixed* ) from the
>Allegro library to project 3D points onto the screen. This works fine, until
>I try to project points which are behind the camera. Say if I use the
>following code:
>
>

Allegro doesn't have OBJECT CULLING built-in... you have to add that
yourself.... you have to take objects out that are outside of the viewing
frustrum....

the viewing frustrum is a 3D construct... picture it as a cube with the side
closest to you being smaller  (it's probably more like a trapazoid... but I
can't remember what the object would best be called) 

It's like looking out a window in such away that a big building outfront fills
the whole window....

The building is the far Z.... (is that hither or yon plane???)
the window is the near Z...

... the top of the building to the top of the window is the top of the viewing
frustrum.... the  bottom of the building to the bottom of the window is the
bottom of the viewing frustrum... left and right... you know...

What I'd suggest is computing the objects radius.... and using that to
eliminate WHOLE OBJECTS from the rendering....

That with a Z clip should solve you problem....

***

Take a cube... move it so that it's in front of you... upward and to the left
of center - no move the Z so that it's far behind you...

...after the weird effect... you'll see the object to the bottom and the right
of center....

What happens at the weird point is that the rendering engine is trying to make
"sense" - and of course - polys... out of that mess...

Good luck to you!


Jim the loiterer (wannabe PC game/graphics developer)
http://members.aol.com/qball1723/index.htm
[please don't hate me because I pay too much for poor internet service!!]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019