Path: chuka.playstation.co.uk!news From: Developer Support Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Hither clipping plane Date: Mon, 14 Jul 1997 09:11:36 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 55 Message-ID: <33C9DF38.2127@interactive.sony.com> References: <33C96F70.1C0E@charlie.cns.iit.edu> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Ed Federmeyer wrote: > > I've been working with objects in 3D space lately, and I'm having > a hard time controlling when objects are too close to the display > screen, and "dissapear". > > Basically, it looks like the "hither clipping plane" (the close > Z-axis clipping plane) is too far "into" the screen. > > I have objects that move around on the X-Z (horizontal) plane, with my > viewpoint looking down at a slight angle onto a playfield that extends > well beyond the borders of the screen. > > As the objects start heading in the -Z direction (they get closer to > the viewpoint), they should appear to go "under" the viewpoint smoothly > and dissapear only when they are completely out of the view. > > Instead, they completely pop-out before they even start "going under" > the viewpoint. > > I can get the effect I want by making my viewpoint look more straight > down on the playfield, but I really want a shallower, 3/4 style > point-of-view. > > Is there a function for setting hither-and-yon clipping behavior of > the 3D graphics routines? > > Messing with the projection distance helped a *little*, but the view > get *very* distorted very quickly. > > Any tips or suggestions are welcome! > Ed Federmeyer There are several ways to reduce the near-clipping. You can alter projection; you can move the viewpoint position and/or orientation; or, to keep them both the same as they were before, you can subdivide the polygon models of the objects in question. Automatic subdivision requires setting the right bits in the GsDOBJ2.attribute part of those objects; take care not to subdivide too many things, as there is a speed hit and heavy consumption of the Gs work space (the one set by GsSetWorkBase). Or you can divide the polygons yourself by accessing the TMD data directly. As far as I know, near-clipping is not optional; any polygon with a screen.vz of ProjectionDistance/2 or less is forcibly near-clipped. There is a bit to set to prevent this, but I don't think it's supported yet (ie setting it makes no odds). If you want to keep the same view as before and reduce near-clip, you should definitely try subdivision. Lewis