Z-Feathering and Smoke effects in COD2

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?

Newcomer

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.

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).

Newcomer

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.

Veteran

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

Click to expand...

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

About Us

Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!