Thread: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Tiziano L. <tl...@fl...> - 2000-07-20 19:20:46
|
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! |
From: Jaimi M. <ja...@al...> - 2000-07-20 19:52:57
|
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 |
From: Stephen J B. <sj...@li...> - 2000-07-20 21:12:45
|
On Thu, 20 Jul 2000, Jaimi McEntire wrote: > 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. Doesn't this get a bit expensive when someone fires of an entire clip of ammo at one wall - and then walks right up to it to examine the damage? Seems like each bullethole would be another complete overwrite of the entire wall...bye-bye pixel-fill rate! Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |
From: <Lea...@en...> - 2000-07-20 22:41:20
|
> 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 is really really slow -- your much better off having a list of quads and rendering the bulletmarks as those... Leathal. |
From: Jaimi M. <ja...@al...> - 2000-07-21 00:16:34
|
It's not *that* slow. Having a list of quads means you get into all those z-fighting problems. Nothing that could not be overcame, of course, but annoying nonetheless. I guess the reason that this works for me because my decals are usually very large and not very numerous (I use them for explosion marks, and for shadows). Still - I will try it out everyone elses way. Doesn't hurt to try new things. Jaimi -----Original Message----- This is really really slow -- your much better off having a list of quads and rendering the bulletmarks as those... Leathal. _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Mark W. <mwa...@to...> - 2000-07-21 04:52:25
|
An extension to Jaimi's method may be to render the bullet holes to an overlay texture (of which you would have a maximum number) which is only rendered *once* on-top of the wall. With complex texture mapping this is obviously not possible, but perhaps for simple quads it would be acceptable ? Perhaps some form of scalable solution - like use Jaimi's method for a small number and when a threshold is reached, combine them into the single texture as I've mentioned and repeat ... ?? Just my 2c worth ... Mark > 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 |
From: Kent Q. <ken...@co...> - 2000-07-20 20:02:00
|
Sleazy...but -- they missed, right? So it doesn't REALLY matter where the bullet hits... Move it over until it's all the way onto the wall and don't worry about it. :-) Kent Tiziano Lena wrote: > > 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? -- ----------------------------------------------------------------------- Kent Quirk | CogniToy: Intelligent toys... Game Designer | for intelligent minds. ken...@co... | http://www.cognitoy.com/ _____________________________|_________________________________________ |
From: jason w. <jas...@po...> - 2000-07-21 01:40:51
|
survey says: BZZZZZZZZT in an online action game, like say.. counterstrike.. decals become *vital* to gameplay. you just can't see what you're doing otherwise.. situations happen where two people are facing off on either side of a doorway of some sort.. in that kind of fire fight, you can easily use the decals on the wall behind you to guestimate your enemies line of visability, get right up by it, and use it to your advantage I would now consider these sorts of marring effects a required feature of any FPS or real time tactics game. jason |
From: John R. <jra...@ve...> - 2000-07-21 02:45:47
|
Can anyone recommend some resources on how to 'clean-up' a mesh which has suffered the insult and injury of having a rather violent boolean operation performed on it? Something which will detect T-junctions and split those offending polygons up so that they will share vertices with their neighbors? Is it as simple as detecting any vertice which lies on the edge of a face and then splitting the face at that location? Thanks, John |
From: jason w. <jas...@po...> - 2000-07-21 01:46:02
|
another stratagy that may work ok as a compramise: if you've already got a lightmap on the world geometry, then do a subtexture update to the texture in question, making some little marks on it. it limits what you can do... I suspect it could be hard to get good blood stain looking things. You'd also possibly get a framerate hit while someone is shooting.. a bad situation. But it does avoid the overhead of rendering seperate geometry. and a final little diatribe on my part: I think in this next generation, games that use world geometry only a little more detailed than the current, and instead use all the rest of the geforce or whatever's few million polygons for interactive effects like this... I think game engines that make that choice will end up way better than games that just dump a huge high poly world object at the T&L. or to put it another way: what's better: a 500 poly character with a shadow cast on the floor, or a 1000 poly char with no shadow. I think shadow wins. |
From: Angel P. <ju...@bi...> - 2000-07-21 05:59:24
|
> 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! An extention like glDepthFunc( GL_ALMOST_EQUAL ) will be quite usefull for things like wallmarks and loosely projected shadows. Does anyone know if something like this is avaiable on current hardware? |
From: Giovanni B. <ba...@pr...> - 2000-07-21 07:48:34
|
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. I had not found something similiar in OpenGL. --- Giovanni Bajo Lead Programmer Protonic Interactive www.protonic.net a brand of Prograph Research S.r.l. www.prograph.it > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...]On Behalf Of Angel > Popov > Sent: Friday, July 21, 2000 9:27 AM > To: gda...@li... > Subject: Re: [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! > > An extention like glDepthFunc( GL_ALMOST_EQUAL ) will be quite usefull for > things like wallmarks and loosely projected shadows. > Does anyone know if something like this is avaiable on current hardware? > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > |
From: Neal T. <ne...@ps...> - 2000-07-21 09:54:37
|
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... |
From: Stephen J B. <sj...@li...> - 2000-07-21 14:06:02
|
On Fri, 21 Jul 2000, Neal Tringham wrote: > > 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. In OpenGL (and presumably in D3D also), you can fake a polygon offset by moving the near clip plane a tiny bit between drawing the 'base' and 'decal' polygons. This (in effect) changes the "meaning" of all the numbers currently stored in the Z buffer - so they represent a distance that is a little further away than than they did when they were originally rendered. In effect, this moves the entire scene backwards a little bit. You need to experiment a bit with how much to move it - but it's a trick that does work on ALL hardware. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |