Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Tim O'Neil Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Clipping using fog param Date: Sun, 19 Oct 1997 02:29:36 -0400 Organization: SCEA News Server Lines: 47 Message-ID: <3449A8CF.5CD2@chat.carleton.ca> References: <34456A52.461D08FB@ibm.net> NNTP-Posting-Host: obatanga.chat.carleton.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win95; I) James Russell wrote: > > Hi, > > I've just started doign 3D stuff so forgive me if this is stoopid > question: > > I want to have a 3D object cut through a 2D background. You see the > background, and then the 3D object slowly rises though the background > and becomes visible. The obvious problem with this is that because the > PSX is a polygon drawer, not a renderer, when the object cuts the > background plane it's polygons will "pop" out (suddenly appear) as their > average Z value becomes nearer than the Z of the background plane. > > What I *want* is for the polygon to cut through the background as a > proper renderer (eg Lightwave) would do it. Mathematically, this would > involve calculating the intersection of the background plane and each > polygon, and basically involve recreating the object on the fly. This is > HEINOUS and don't want to have to do it. > > However, please correct me if I'm wrong, but isn't there some built in > fogging? Would it be possible to configure the fog to "cut out" at a > particular Z value, instead of gradually fading out? This would give me > the desired effect. > > This won't work if all the fogging does is look at the average Z of the > polygon and adjust the transparency for it. If this is the case, the > whole polygon will fade out and the I'm back where I started. > > Are there any documents describing fogging details? Once again the docs > prove sparse... > > Ta > > J The fogging effect (..FogParam..) won't give you the result you want. It works on a polygonal basis. The only way to acheive the effect you want (I beleive) is to either do the clipping yourself, which is pretty painful in regards to performance, or to just turn the subdivision up on the polygons which are cutting through. The polygons will still pop in, but if you turn it up a couple of notches, the popping should be pretty small (although this approach isn't that great either). Heh, sorry I couldn't actually help out more, but I've been trying to work through a good (clean/fast) algorithm to get nice depth fogging without using the PS effect.