Z-Feathering and Smoke effects in COD2

Matt B

Newcomer
Hi guys, I was just wondering if anyone knew much about the implementation of the smoke and particle effects in call of duty 2. This game has to be one of the best looking ones I've ever played and in particularly the smoke effects are phenomenal. It seems that they are just very cleverly used sprites but it's the first time I've seen sprites used which don't "clip" into their surroundings, they seem to really have volume and thin out before clipping through objects.

I've heard there is a technique called Z-Feathering they've used for this but i haven't been able to find much about it. Does anyone have any info about how it's implemented?
 
Last edited by a moderator:
I don't know how they do it, but I played the demo and was blown away at how realistic the explosions looked! I kept replaying the start of the demo over and over just cause I couldn't believe the explosions / dust / smoke were being created real-time.
 
I think Quake 4 is using similar technique for smoke. AT least it looked that way on Nexus where you blow up the hangars with jets...
 
There are a few ways to achieve this effect. One way is with depth sprites, described here:

http://www.ati.com/developer/samples/DepthExplosion.html

One other option is to disable depth testing when rendering the sprites then do a depth compare in the pixel shader and alpha blend the sprite based on the depth compare (so that the sprite fades as it intersects the ground, for example).

--Chris
 
Hey chris, thanks for the info, the Z-Depth compare trick seems like a pretty nice and quick solution. However how stable/glitchy are the results? I would have thought it could break down in a complex scene and give odd results where the normal of the tested object is close to perpendicular to the camera.
 
chrisATI said:
One other option is to disable depth testing when rendering the sprites then do a depth compare in the pixel shader and alpha blend the sprite based on the depth compare (so that the sprite fades as it intersects the ground, for example).

--Chris

You don't have to disable depth testing, just make sure it only rejects the pixels where the alpha would be 0 anyway.
 
Back
Top