Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 09-Mar-2010, 23:51   #1
CamRaiD
Registered
 
Join Date: Mar 2010
Posts: 1
Default A burning long unanswered question about smoke effects in games !!!!

Hi,

I know little in general about terminology, but I would love it, if someone could answer me; Why is it, that games still have the annoying tendency for smoke and explosions to be cut off ugly like when their flatness passes through a wall ???

I would have thought that our technology would have found a way to stop that (clipping?) effect that looks a sorta bad...

Are there ways to stop that ??

Why don't programmers use those ways ??

We can do so much with graphics but can' stop the smoke from getting cut off in the floor !!
CamRaiD is offline   Reply With Quote
Old 10-Mar-2010, 00:04   #2
Albuquerque
Red-headed step child
 
Join Date: Jun 2004
Location: Guess ;)
Posts: 3,084
Default

Depends on how the 'smoke' was generated.

If it's done with flat textures projected onto flat 2D planes in 3D space, you'll get clipping where that 2D plane intersects another object (wall, rock, tree, another actor, another explosion, etc.)

The most readily available answers would either be a particle system to "emit" the fog, or a volumetric texture. Particles will look more realistic most likely, given a proper implementation.
__________________
"...twisting my words"
Quote:
Originally Posted by _xxx_ 1/25 View Post
Get some supplies <...> Within the next couple of months, you'll need it.
Quote:
Originally Posted by _xxx_ 6/9 View Post
And riots are about to begin too.
Quote:
Originally Posted by _xxx_8/5 View Post
food shortages and huge price jumps I predicted recently are becoming very real now.
Quote:
Originally Posted by _xxx_ View Post
If it turns out I was wrong, I'll admit being stupid
Albuquerque is offline   Reply With Quote
Old 10-Mar-2010, 01:00   #3
Karoshi
Member
 
Join Date: Aug 2005
Location: Mars
Posts: 181
Default

Quote:
Originally Posted by CamRaiD View Post
Hi,

I know little in general about terminology, but I would love it, if someone could answer me; Why is it, that games still have the annoying tendency for smoke and explosions to be cut off ugly like when their flatness passes through a wall ???

I would have thought that our technology would have found a way to stop that (clipping?) effect that looks a sorta bad...

Are there ways to stop that ??

Why don't programmers use those ways ??

We can do so much with graphics but can' stop the smoke from getting cut off in the floor !!
IIRC one of DX10's features was the ability to read Z and implement "soft particles" blending to, among other things, avoid exactly what you describe.
Karoshi is offline   Reply With Quote
Old 10-Mar-2010, 01:56   #4
arjan de lumens
Senior Member
 
Join Date: Feb 2002
Location: gjethus, Norway
Posts: 1,256
Default

If you want to just stop the part where an explosion/smoke object is clipped against the wall, one possible approach would be to use an occlusion query; one query for each object, then render in their entirety any objects passing the test. This doesn't necessarily work all that well, though; if the occlusion query test region is occluded - e.g. the explosion in question happens just behind an enemy - you end up not drawing the explosion at all when you should have drawn it, resulting in the enemy looking as if it is being blown up by nothing at all.

A problem here is that the explosion effect - at least if it is drawn as a flat 2D object - presumably should be drawn either decidedly in front of or decidedly behind objects in the scene, with a decision being made on a per-object basis. Such decisions cannot always be resolved; e.g. in the case of an explosion happening behind an enemy, you may decide that the explosion should happen in front of the ground that the enemy stands on. This too doesn't work all that well; you now get a big chunk of explosion that violates depth perspective.

Using a particle cloud partially overcomes these problems; you can still get individual particles clipped, but this is likely much less egregious than having a big flat 2D object clipped. This may require a fair amount of GPU horsepower to look good, though.

A more elaborate method that uses the depth buffer to perform soft blending (instead of making hard ordering decisions) is documented on the Nvidia developer site, at http://developer.download.nvidia.com...#SoftParticles; this looks much better than any of the approaches above, providing a good solution to the whole clipped-explosions problem. It apparently requires DirectX10 features, though - which rules out its use in cross-platform games.
arjan de lumens is offline   Reply With Quote
Old 10-Mar-2010, 06:29   #5
Sobek
Locally Operating
 
Join Date: Dec 2004
Location: QLD, Australia
Posts: 1,773
Default

Quote:
Originally Posted by Karoshi View Post
IIRC one of DX10's features was the ability to read Z and implement "soft particles" blending to, among other things, avoid exactly what you describe.
Hmm, Team Fortress 2 had soft particles present during the beta, which they soon removed for performance reasons. Similar effect?
__________________
Valve Software - Giving me Episodic nightmares
Bulletstorm - I Will Kill Your Dick!
Sobek is offline   Reply With Quote
Old 10-Mar-2010, 07:06   #6
jlippo
Member
 
Join Date: Oct 2004
Posts: 699
Default

Quote:
Originally Posted by arjan de lumens View Post
A more elaborate method that uses the depth buffer to perform soft blending (instead of making hard ordering decisions) is documented on the Nvidia developer site, at http://developer.download.nvidia.com...#SoftParticles; this looks much better than any of the approaches above, providing a good solution to the whole clipped-explosions problem. It apparently requires DirectX10 features, though - which rules out its use in cross-platform games.
I think Incoming Forces used feathered/soft sprites on DX8 and many games did after that including CoD series.
jlippo is offline   Reply With Quote
Old 10-Mar-2010, 12:56   #7
Karoshi
Member
 
Join Date: Aug 2005
Location: Mars
Posts: 181
Default

Quote:
Originally Posted by Sobek View Post
Hmm, Team Fortress 2 had soft particles present during the beta, which they soon removed for performance reasons. Similar effect?
I really don't know, never played TF2. I'll answer anyway, the illuminati (pun intended) are free to correct me if I spew too much drivel. This is from my recollection of old conversations, I've never written a single line of DX code.

I assume TF2 has at best a DX9 path. In DX9 there is no way to read-access the Z buffer. But you are free to implement your own Z buffer as a MRT with the big caveat that you will bypass any Z acceleration fixed hardware.
Soft blending as described above uses the distance between the semi-transparent primitive and the Z depth to modify the alpha blending factor to make the primitive be fully transparent as it crosses the floor (opaque Z depth = primitive depth).
On naive DX9 you go from "accelerated Z write and ROPs" to "non-accelerated Z writes plus Z reads" incurring a substantial performance penalty.
On DX10 you get the accelerated Z writes and just have an extra Z texture read and some ALUs vs. a normal, horrible lines on the intersections, alpha blended "smoke" wall.
The "soft particles blending" was a bullet point in the DX10 PR campaign, with much screenshots on the usual websites.
Karoshi is offline   Reply With Quote
Old 11-Mar-2010, 06:22   #8
jlippo
Member
 
Join Date: Oct 2004
Posts: 699
Default

Quote:
Originally Posted by Karoshi View Post
I really don't know, never played TF2. I'll answer anyway, the illuminati (pun intended) are free to correct me if I spew too much drivel. This is from my recollection of old conversations, I've never written a single line of DX code.

I assume TF2 has at best a DX9 path. In DX9 there is no way to read-access the Z buffer. But you are free to implement your own Z buffer as a MRT with the big caveat that you will bypass any Z acceleration fixed hardware.
Soft blending as described above uses the distance between the semi-transparent primitive and the Z depth to modify the alpha blending factor to make the primitive be fully transparent as it crosses the floor (opaque Z depth = primitive depth).
On naive DX9 you go from "accelerated Z write and ROPs" to "non-accelerated Z writes plus Z reads" incurring a substantial performance penalty.
On DX10 you get the accelerated Z writes and just have an extra Z texture read and some ALUs vs. a normal, horrible lines on the intersections, alpha blended "smoke" wall.
The "soft particles blending" was a bullet point in the DX10 PR campaign, with much screenshots on the usual websites.
What you can do with dx9 and earlier is write depth values into an another MRT.
This way you do not have any strange problems you would have with z-buffer.

After basic implementation one might want to do particles with depth information about their shape as well.

Last edited by jlippo; 11-Mar-2010 at 06:28.
jlippo is offline   Reply With Quote
Old 11-Mar-2010, 08:21   #9
zed
Member
 
Join Date: Dec 2005
Posts: 2,089
Default

from here I say I was doing it earlier than feb 2006, thus this has been possible > 5 years (though this is with opengl)
Like I said then there was a performance penalty invloved, I assume with new hardware this has been improved somewhat

http://www.gamedev.net/community/for...opic_id=375173
__________________
stalk me on twitter
zed is offline   Reply With Quote
Old 13-Mar-2010, 11:16   #10
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

We have soft particles in Just Cause 2. We use it for clouds too. It comes at a performance penalty though, but for any decent video card I recommend to have it enabled.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 13-Mar-2010, 18:22   #11
bigtabs
Senior Member
 
Join Date: Jan 2007
Location: TDO, Germany
Posts: 1,222
Default

I first remember seeing 'soft' smoke edges in COD 2 and though that we'd never see hard edges in smoke again. FEAR really surprised me with the hard edges there. It was the one graphical aspect of that game that really let it down for me.

I'm surprised to see it in any game nowadays. COD 2 was a long time ago.
bigtabs is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:22.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.