RE: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Brian M. <bma...@ra...> - 2000-07-23 08:17:21
|
The N64 supports this op. It was used for the bullet holes in Perfect Dark (and Goldeneye.). It still doesn't give a glitch free result. It does 'clip' to the edges on polygons when the decal goes over the edge of the polygon its sat on, but its really just scissoring with Z to do that. One thing to remember is that the error in the z slope calculations on the small decal polygon is higher than that on a larger (in screen space) polygon. So you are always going to have some accuracy worries. Using one decal polygon the same size as the surface it's resting on may work very well. With individual decals someone will always get them all on one wall if you let them - which is a big hit with individual decals, small with one big decal. Unless you can use precisely the same polygon for generating Z values you will need to add Z-bias to minimize glitching. -Brian. > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...]On Behalf Of Tom > Forsyth > Sent: Friday, July 21, 2000 2:35 PM > To: gda...@li... > Subject: RE: [Algorithms] Bullets on walls > > > We know. Nothing on the planet supports something like > ALPMOST_EQUAL as far > as I know (and even if it did, that still has problems when things walk > beside the walls). > > You will have to either clip the decals to the wall > geometrically; draw the > wall poly with clamp texture mode & the right UVs; or composite the decals > onto a wall-shaped poly, as suggested. If drawing individual decals, which > seems a popular method, then you will need some sort of Z-bias > functionality, which is what glPolygonOffset and moving the clip planes > gives you. > > Tom Forsyth - Muckyfoot bloke. > Whizzing and pasting and pooting through the day. > > > -----Original Message----- > > From: Angel Popov [mailto:ju...@bi...] > > Sent: 21 July 2000 15:50 > > To: gda...@li... > > Subject: Re: [Algorithms] Bullets on walls > > > > > > No, neither glPolygonOffset or moving the near clipplane will > > have the same > > functionality as the non-existent glDepthFunc( GL_ALMOST_EQUAL ) > > because these two approaches will not fix the problem with > > the wallmark > > not getting clipped at wall corners. > > > > > > > For D3D (and probably OpenGL), a good alternative is to > > move the near & > > far > > > clip planes a bit further away for those tris. You only > > need to move the > > > near clip plane if using Z-buffering. If using W-buffering, > > you'll need to > > > move both. > > > > > > Tom Forsyth - Muckyfoot bloke. > > > Whizzing and pasting and pooting through the day. > > > > > > > -----Original Message----- > > > > From: Neal Tringham [mailto:ne...@ps...] > > > > Sent: 21 July 2000 10:56 > > > > To: gda...@li... > > > > Subject: Re: [Algorithms] Bullets on walls > > > > > > > > > > > > > > > > Giovanni Bajo <ba...@pr...> writes: > > > > > In DirectX, there is a ZBIAS stuff that let you set a > > priority order > > > > > (integer) when Z matches. It is a renderstate. But looking > > > > at the caps, it > > > > > is not supported in every boards I have tried. I heard > > it is an old > > > > thingie > > > > > of first Voodoo boards. > > > > > > > > Yes, the support for zbias seems to be rather inconsistent. > > > > > > > > > I had not found something similiar in OpenGL. > > > > > > > > You may want to look at the 1.1 glPolygonOffset function. > > > > > > > > > > > > Neal Tringham (Sick Puppies) > > > > > > > > ne...@ps... > > > > ne...@em... > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |