RE: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Jay S. <Ja...@va...> - 2000-07-20 21:12:45
|
This was the first thing I tried for the bullet holes in Half-Life. It's really, really slow. Once you have 3 or 4 bullet holes on a wall and a player walks up to the wall you are redrawing the entire screen 5 or 6 times (or more if you have complex materials). This just doesn't scale if you expect to have several decals on a single surface. It's much better to clip the decal polygons and draw them with polygon offset. Jay > -----Original Message----- > From: Jaimi McEntire [mailto:ja...@al...] > Sent: Thursday, July 20, 2000 1:01 PM > To: gda...@li... > Subject: RE: [Algorithms] Bullets on walls > > > In d3d, this is the way I do it: > > Create decals with a one pixel transparent border. > Then, set the texture address mode to "Clamp". > Calculate new UV coordinates for your decal based on the wall, instead > of the Decal - then redraw the entire wall with your decal texture and > new UV coordinates. > This way you do not have to clip at all. I would assume you could > do the same in OpenGL. > > Jaimi > > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...]On Behalf Of > Tiziano Lena > Sent: Thursday, July 20, 2000 2:19 PM > To: gda...@li... > Subject: [Algorithms] Bullets on walls > > > Hi! > I added wallmarks in my 3d engine but when I fire on the > border of a wall I > would like to clip the wallmark to the wall. > > I have some ideas but I think they are a bit slow... (manual clipping, > texgen, stencil?) > > How do you do this? > > Thanks for any help! > > > > _______________________________________________ > 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 > |