• Welcome to the largest (sim) racing website in the world!
    Blurring the line between real and virtual motorsports.

Realistic smoke

Discussion in 'Racer Physics and Technical' started by fsr, Jan 13, 2011.

  1. Alex Forbin

    Alex Forbin

    Messages:
    727
    Ratings:
    +125
    FSR/Dave
    Guys we only have a few parameters to work with and if you think you will be able to do an accurate CFD simulation of smoke with that you're mistaken.
    I have said before that we need some form of tire heating calc that should control the alpha. If you will notice tires start out with very thin/transparent smoke that becomes less transparent as the tire heats.

    The reason for the turbulence in my settings is to (as Camsinny observed) simulate that effect. With a static image there is only so much you can do, animated billboards would help but they are FPS expensive. I think that with tire heating/alpha and a curve to control growth/alpha we can do better. I would also like to be able to place the emitters. ;)

    Alex Forbin
     
  2. Alex Forbin

    Alex Forbin

    Messages:
    727
    Ratings:
    +125
    I agree about the smoke not ascending much, mine usually stops a little higher than the car.
    The velocity makes perfect sense if you understand what it's doing, the initial velocity is combined with the randomness of _var this allows for random motion with some form of initial bias. The "x" direction should however be towards or away from the center of the car instead of how it is now. The airfriction dampens the movement so that the smoke slows as it should.
    I agree about the particle size, unfortunately we only have a fixed growth rate, in reality the particles start out small and rapidly grow but just as quickly slow, a growth curve would be ideal. As it is you have to compromise on a lot of things.
    Soft particles are a must! One of the things I really don't like about smoke right now is that the billboard "pop out" and when they are around a car you can see the cars body cutting into the smoke texture.

    Alex Forbin
     
  3. Stereo

    Stereo

    Messages:
    3,157
    Ratings:
    +2,317
    Hmm, these two go together - having initial velocity coordinates be the same as the car's would let you start the smoke off moving with the car, then go by air friction.
     
  4. Mr Whippy

    Mr Whippy

    Messages:
    3,003
    Ratings:
    +475
    I agree with most of that.

    I think you have done a great job with the particle set as it is!



    My point was more what we need too.

    I guess the important thing now is to look at the behaviour of real smoke and then decide how to best fake it with as much real logic as possible. The results you and FSR have are both right and look really good, just at different times.
    That says to me that no matter what we do, they won't be right with the current 'engine' driving the particles ALL the time. Not much point in compromising if we are gonna try work out the right way to do these moving forward :)


    We could get a nice turbulent effect with a global effector so smoke is always dancing a bit, damping to particle velocity so it slows down when it's given a high initial velocity (burnouts fire it back, but it soon slows down)
    Lets just think of the real mechanism maybe, rather than the current system and how to try make it work more like real smoke. If the current implement is just plain wrong, best to bin it and start again, than try stick new features on to a flawed model!?

    I think a really good idea would be to watch lots of videos and link to them, and describe things we see, and make 'rules' for smoke. That way it's going to be much easier to describe what smoke does and doesn't do to know what rules we need in the code!



    In theory this needs to be done right for any other smoke or airborne particles too (drag, turbulent motion etc), so may as well start as we mean to go on and nail it now and have it right for everything moving foward?!


    Just thoughts :)

    Dave
     
  5. Alex Forbin

    Alex Forbin

    Messages:
    727
    Ratings:
    +125
    Good observations. Here are some basic things I've noticed about smoke from my experiences.
    smoke0.jpg smoke1.jpg

    The first illustrates the basic motion around the tire, the second shows the needed vectors to approximate this movement.
    Edit as required.

    Alex Forbin
     
  6. fsr

    fsr

    Messages:
    174
    Ratings:
    +22
    I second this. Realistic smoke would be the next step in visual realism for Racer :)
     
  7. camsinny

    camsinny

    Messages:
    479
    Ratings:
    +21
    Well the particle system was redone a few versions ago (8.20 or so probably) so I doubt it'll be touched again for quite some time unless there's a real problem with it...
     
  8. Mr Whippy

    Mr Whippy

    Messages:
    3,003
    Ratings:
    +475
    Well, it was redone wrong then, because it still doesn't look like smoke ;)

    Honestly though, I guess the "re-done" was making it scalable and flexible, so I have a feeling what we want is now more possible to achieve.


    As per Alex's picture, I often wonder if smoke really "follows" a tyre round at high slip ratios, or if the tyre is still releasing smoke as the contact patch has moved around the tyre?
    I agree some motion is generated about the tyre due to airflow, and so particles near the tyre may try follow it's contact patch motion, but I also think that some smoke is generated off the tyre surface at those points at high temps, and that is why smoke tends to fill out the wheel arches the way it can sometimes (ie, during burnouts it seems)


    Hmmmm


    That said, I'm not looking for perfection personally. I think the 'macro' issue is still that smoke from birth to death just looks a bit wrong. Just tweaks really, but until we get the slip ratio/angle influencing generation it'll be difficult :D

    Dave
     
  9. fsr

    fsr

    Messages:
    174
    Ratings:
    +22
    If you've seen a tyre after a burnout or drift, you'll see that the whole tyre still smokes for a while due to the heat. We're talking about melting rubber here :D

    The effect of the smoke following the tyre is simply that the whole tyre is smoking, as well as causing a lot of turbulence around the wheel due to the high speed the wheel is turning at. In motion, there's all kinds of weird effects going on that will not be replicated in a sim for a long while! Just check out this pic of Fredric in full drift at Irwindale:

    5073992774_413e04048b_o.jpg
     
  10. MitchVL

    MitchVL

    Messages:
    150
    Ratings:
    +0
    The particle system was redone to be faster and more flexible .. so if we decide to add custom behaviour it can be done with more ease than before. :) But i doubt this custom behaviour will be included in v0.9

    It's an interesting read this thread ..
     
  11. Mr Whippy

    Mr Whippy

    Messages:
    3,003
    Ratings:
    +475
    For now best to just drive around without skidding too much, it's faster ;) :D
     
  12. BVSX

    BVSX

    Messages:
    188
    Ratings:
    +4
    so as in NFS Pro Street, it ilustrates how the smoke goes around the tyre
     
  13. fsr

    fsr

    Messages:
    174
    Ratings:
    +22
    Yeah, but it looks kind of silly though. The smoke needs to come from the tire, not just follow it around. I wouldn't worry about that anyway, just make it grow from the tire surface like Dave said, with a formula based on the amount of slip angle and time, as that's what makes it look real. No point in making it too specific, as it's pretty random in real life :p
     
  14. camsinny

    camsinny

    Messages:
    479
    Ratings:
    +21
    Meh. The smoke between the tyre and your eye will occlude that before that happens. As with movies - it's an exaggeration. No need to show that if you won't see it anyway...
     
  15. MitchVL

    MitchVL

    Messages:
    150
    Ratings:
    +0
    screenshot004.jpg screenshot005.jpg

    old vs soft particles with the new smoke settings

    Here is a script to test smoke:

    Code:
    rcar $car = get local car
    float $carPos[3]
    string $cmd
    
    while 1
    {
      $carPos=get $car pos
    
      $cmd = "particles spawn smoke "
      $cmd += $carPos.x
      $cmd += " "
      $cmd += $carPos.y
      $cmd += " "
      $cmd += $carPos.z
    
      send $cmd to console
      
      interrupt
    }
    
    paste it in <cardir>/scripts/paint/script.rsx
     
  16. fsr

    fsr

    Messages:
    174
    Ratings:
    +22
    Better, but to dark and grey. Should be white...
     
  17. MitchVL

    MitchVL

    Messages:
    150
    Ratings:
    +0
    Im not working on the texture, because you guys are 100 times better at that.
    screenshot031.jpg

    Added shadows on particles ...
     
  18. FiftyOrange

    FiftyOrange

    Messages:
    492
    Ratings:
    +0
    Now you're talking. That looks fantastic.

    Just to implement the technicals now, slip ratios, a bit of turbulence, 'n ting.
     
  19. fsr

    fsr

    Messages:
    174
    Ratings:
    +22
    That looks brilliant. Some texture modifications, and it's more than good enough for me :)
     
  20. FiftyOrange

    FiftyOrange

    Messages:
    492
    Ratings:
    +0
    Racer - free smoke simulator, now with cars!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.