Upcoming Events

Weekly BMW races on Simracing.GP Other regular AC events on Simracing.GP Weekly GT3 Sprint Races on Simracing.GP Weekly GT4 Sprint Races on Simracing.GP Daily WTCR races on Simracing.GP

Realistic smoke

old vs soft particles with the new smoke settings
QUOTE]

A terrible accident at the test track.
screenshot005.jpg
Fun stuff Mitch.
Alex Forbin
 

Stereo

Premium
a bit of turbulence

Yeah, as well as variation in initial values, making turbulence more direct post-spawn would help I think - the expansion rate is due to turbulence, and so is the increase in transparency. To conserve the 'number' of smoke particles, really the transparency should be inversely proportional to the square of the size - eg. if you go from 1 meter wide to 2 meters, it'll have 1/4 the opacity.

I'll have to get out my notes, but I think brownian motion's distribution spreads linearly. So you have linear size increase, squared transparency falloff.

It might also help to have a bit of random nudging to each particle - if you discretize turbulence (say, into 60Hz) the distance moved due to turbulence between each frame is a Gaussian distribution, and should make the smoke a little less uniform looking when in motion.

One of the papers had a description of how they rendered the smoke as well; probably too complicated for Racer but could inform choices when editing the shaders.
 
I started to do that but figured it would be too much of a strain on the FPS.
Looks nice. :)

Alex Forbin

It might cost some frames on some systems, and the other problem is that you will get lines of shadow on the particle (like when you have no soft particles .. but only for shadows).
but the benefits outweigh the risks as they say.
 
Could the option of having shadowing on the cloud particles be a setting in Racer Options page? At least then the end user can opt for settings for a fps heavy photo-shoot; or an fps lite racing graphics setup. Esp for those with less than current gen PC's & GPU's
 
Sparks wrong. Also no grass_smoke in particles.ini. I guess Alex doesn't like dust being kicked up when a car goes off course and into a dusty grass field. It's not realistic without the dust except when the grass is wet from rain.
I fixed the particle.ini file attached.

sparks.jpg
 

Attachments

  • particles.7z
    2 KB · Views: 159
Yeah, as well as variation in initial values, making turbulence more direct post-spawn would help I think - the expansion rate is due to turbulence, and so is the increase in transparency. To conserve the 'number' of smoke particles, really the transparency should be inversely proportional to the square of the size - eg. if you go from 1 meter wide to 2 meters, it'll have 1/4 the opacity.

I'll have to get out my notes, but I think brownian motion's distribution spreads linearly. So you have linear size increase, squared transparency falloff.

It might also help to have a bit of random nudging to each particle - if you discretize turbulence (say, into 60Hz) the distance moved due to turbulence between each frame is a Gaussian distribution, and should make the smoke a little less uniform looking when in motion.

One of the papers had a description of how they rendered the smoke as well; probably too complicated for Racer but could inform choices when editing the shaders.


Good idea, physical elements like that are important, so double size quarter transparrency is a key one to getting right looking smoke :D


Those soft particles look nice, and that tint of blue in the edges of the smoke looks good too :D
 
sfs.jpg
Just some fun with the code Mitchvl posted. That attaached scripts file can be uncompressed in a car folder.
 

Attachments

  • scripts.7z
    630 bytes · Views: 185
Sparks wrong. Also no grass_smoke in particles.ini. I guess Alex doesn't like dust being kicked up when a car goes off course and into a dusty grass field. It's not realistic without the dust except when the grass is wet from rain.
I fixed the particle.ini file attached.

View attachment 34349

oops, I forgot about messing with the other bits. It's mainly due to my messing with the associated shaders. Thanks for the update.

Alex Forbin
 

Stereo

Premium
Finally got around to looking up some resources.

http://www.noisemachine.com/talk1/24b.html
As you see on that page (and clicking to the next) realistic turbulence is pretty doable. In this implementation it takes log(n) time per pixel, with n the screen size of the image (it's fractally generated from large coordinates down to the size of the pixels), plus a pseudo-random lookup sequence.

Could be looking at 4D since our smoke is in volume; then the smoke texture would bias the noise function, and its billboarded position would determine 3D coordinates (with the 4th being time of course). That would allow coherent structure that's larger than a single smoke particle, and air movement would be implemented as time-variation in the coordinates (eg. instead of x, use x + wind.x*time)

Or drop the 4th dimension, and just use 3 - X,Y texture coordinates and time (with some addition to time to make sure each particle is unique, perhaps). Probably simpler to implement, but then each particle acts independently.

Some of this I could implement myself; not the contribution from game time (not sure how to get that in the shader) and having a unique id for each particle.
 
sounds good Stereo, and i'm glad that this topic wasnt thrown away, bcoz the smoke is very important thing to make the game not only more eye candy but more real :)

And i want to mention that while gaming the smoke apears normal, like it should be, but in replays is less smoke than it actualy should be... and this issue is with us since long time ... needs solving too
 
sounds good Stereo, and i'm glad that this topic wasnt thrown away, bcoz the smoke is very important thing to make the game not only more eye candy but more real :)

And i want to mention that while gaming the smoke apears normal, like it should be, but in replays is less smoke than it actualy should be... and this issue is with us since long time ... needs solving too

I might add this as well, there is NO grass/gravel smoke in replays.

Alex Forbin
 

Stereo

Premium
Hmm... Still working things out.

I thought these normal maps might be useful to someone.
1) spherical random normal (any direction equally likely) - http://dl.dropbox.com/u/20733494/spherenoise.tga
2) hemispherical random normal (any direction above the surface) - http://dl.dropbox.com/u/20733494/hemispherenoise.tga
(see: http://dl.dropbox.com/u/20733494/hemispherenoise.png)
3) hemisphere normal - http://dl.dropbox.com/u/20733494/hemisphere.tga
hemisphere.png


The second is more practical for noisy surfaces. If you want to make it less noisy, mix it with #8080FF to bring the normals closer to straight forward. (8080FF is the regular surface normal, straight out - if you blend the two, you'll get something that's still noisy, but less likely to be at right angles to the surface)

Third's something I was fooling with for smoke - at the centre it points forward, at the edges it points straight to the sides. Outside the circle, it just fills in with normals pointing outward in the right direction. Still not sure exactly how I'll manage this but it might come in handy.
 
Has the delay thing been discussed?
I once said that it would be great if the smoke has some cind of delay and fade. When you start to spinn the wheels, the smoke does not acctually generate before the tire heats up, that can be very fast, or slow depending on the relation of wheel spinn/revs to ground.
Also the same on braking, the tire becomes hot and smoke will appeare but, there will always be a little delay. Noy instantley, but then again, I havent been much around the last year so I havent gotten into things. :D
 
After making myself dizzy I've noticed a couple of things:
What happened to the shadows?
and it'll be nice when we have a new tyre model that considers heat. That way if you're doing a donut and the front tyres are moving but not as much as the rears (i.e shouldn't be making as much smoke...if any) they don't actually make as much smoke as the rears.
 
Top