Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Gerrit Goossen Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: What's up with fog? Date: Sat, 22 Aug 1998 04:28:21 -0400 Organization: SCEA News Server Lines: 42 Message-ID: <35DE811D.21F5@funnytown.com> NNTP-Posting-Host: 38.165.241.13 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-MACOS8 (Macintosh; I; PPC) Hey again, Confusion reins Gerrit! >> I think the problem is, that the fog is not done on a per fragment basis >> but on a per polygon basis on the Playtstion. >> This generates this funny effect. You can improve the visual impression, >> if you use smaller polygons. > >My experiments with fog suggest that is done on a per normal basis with the >rest of the lighting. So, for large polygons it might be worth using Gouraud >shading using the same normal for each vertex. I spent quite a bit of time tinkering with various MAT settings in the RSD models, but couldn't seem to get beyond the "fog the whole polygon with a single normal" problem. (Although I did find an undocumented GsDOBJ attribute to selectively disable fogging. :) >The impact on performance >this way is less than using more/smaller polys as it's less work for the GTE, >and the results are perfect. You can only really do this with dynamic TMD >creation though. Why would this only work with dynamic TMD creation? Does RSDLink "optimize" models to be flat shaded if all the verticies have the same normal? Since my initial posting, I decided to temporarily ignore the fogging problem and I actually started moving in a different direction... I've written a utility to pre-calculate vertex normals, lighting, etc. on my world RSD model, which produces a set of tris that are "gradient-filled" instead of being lit at runtime. While this gets a slight speed advantage, the *real* advantage is that my large world model no longer has to maintain a huge collection of vertex normals for lighting/shading. Of course now my problem is re-implementing fog -- which in LibGs appears to be intimately tied to lighting and vertex normals. If anyone sees any "easy" way out of the corner I painted myself into, I'd appreciate the help! Otherwise I guess I'll have to start tinkering with those TMD primitives I've been hearing so much about... - Gerrit