Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Rocket Smoke Trails

Discussion in 'Editor & General Support' started by HarvesteR, May 10, 2011.

  1. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Hi,

    So, I've been wondering lately about ways to achieve an interesting, convincing effect for rocket smoke trails...

    What I want is to achieve the best possible visual effect, without of course, compromising performance... and that's where things get tricky.

    Look at this example:




    As you can see, the smoke trail has a very cloud-like quality to it... it appears very solid, and very dense...
    This isn't so easy to achieve, without using an impractical number of particles...

    So I'm looking for ideas, or at least just discuss the matter in the hopes of having some magical insight ;)

    So, to kick it off, this is something I think could work:

    Creating a new particle shader, that will animate a spritesheet of smoke textures over time, so that each smoke particle will appear to "bubble" up as it goes... This means each particle is visually more interesting by itself, so we need less particles overall, and that means each particle can stay up longer.

    Problems are, this spritesheet would have to be masterfully created and animated, so it looks convincing... may take a great deal of time and effort.
    Also, it would be impractical to create overly long texture animations in this fashion, so the smoke animation would have to loop, and it would need to run fast enough to look convincing.

    The above idea shows why I'm opening this thread... I want to discuss these ideas before committing myself to a week-long effort in getting a cool rocket exhaust effect.


    So, to keep going, here's another idea:

    Instead of creating a spritesheet for each particle, instead, give them a procedural, noise-based texture, that's created by the shader.
    This would enable nice, patternless textures, and better yet, the smoke can animate itself over the 3rd dimension of the noise field.
    Problems here? This shader will be running on a couple of thousand instances... how practical, hardware-wise, would this be?

    What do you think?

    Cheers
     
  2. sawfish

    sawfish

    Joined:
    Feb 12, 2011
    Posts:
    314
    It's a great endeavor. Rocket trails would be useful in many instances. It would be great in a military game, either from rocket launchers, missiles, etc. or even things like tailpipes, train stacks, smoke stacks on buildings, etc.

    If you created a really good (and versatile) version of this I'm sure you could sell it.

    What about deforming a tubular mesh that gets extruded behind the rocket? Between that you could probably do some sort of random blending on the texture to make it look transparent and smoky...
     
  3. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    great endeavour indeed ;)

    I wasted my morning today trying to write a noise-based shader, as in idea #2... Didn't work... for some reason the noise function in ShaderLab always returns 0... Oh well...

    I had thought of using some kind of deformable or animated mesh instead of billboards... it seems like a huge gamble with time though... It would require several days of setting up assets, just to see if it looks good or not...

    Well, I guess eventually it'll come to that... A realistic smoke trail effect requires long particle lifes, as well as density... which is something a normal billboard system utterly fails at... long-lasting particles and a huge number of them, is a good way to turn your game into a slideshow ;)

    so I might just have a go at some kind of deforming mesh... and if it works out... Asset Store!! :D
    I imagine it'll be something similar to the Tron Trail effect... IIRC, there's a script for that in the wiki... I guess I'll have a look at it.


    Cheers
     
  4. i3DTutorials

    i3DTutorials

    Joined:
    Aug 26, 2010
    Posts:
    564
    Dude, if you want the best smoke effect possible, you'll have to do it with VFX software- going the procedural route or using the default particles from the standard assets wont cut it.

    They way most major studios do their particles (Call of Duty, Gears of War, etc.) is to have a VFX team work on creating an actual smoke, fire, explosion, etc. simulation in a high end software package. For example, you could use something like FumeFX, Maya Fluid Effects, Krakatoa, etc. to create photorealistic simulations, light and render them, then you will have to use the render sequence and prep it for your realtime particle system. You'll have to do some optimization and plenty of tweaking, but the effect is worth it- leaps and bounds over anything you could do procedurally or with the Unity standard assets.

    This workflow requires that you be experienced with production ready fluid effects and simulation software or have a team in place to handle this part of the pipeline.
     
  5. sawfish

    sawfish

    Joined:
    Feb 12, 2011
    Posts:
    314
    Ever make progress on this HarvesteR? Curious which path you went down...
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Good tips i3D
     
  7. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Well, I haven't had the time to work on this part of the project lately... there are far more essential things still missing if I'm to achieve a decent playing experience...

    But I was able to tweak a particle system to the point where the rocket trails look much better now... not in any way perfect, but at least it's believable ;)

    Cheers
     
  8. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    There was an excellent particle tutorial somewhere on Yoggy's personal blog, which went hand in hand with his video presentation from the 07 Unite conference.

    http://forestjohnson.blogspot.com/

    He shows you how to use photoshop to generate some really decent smoke trails and fire, step by step.
     
  9. sawfish

    sawfish

    Joined:
    Feb 12, 2011
    Posts:
    314
    I just thought of something...

    VOXELS!!!
     
  10. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
  11. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,964
    teach me >:0
     
  12. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
    Soon on the asset store ^^
     
  13. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,964
    how much? ;-0
     
  14. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
    don't know yet, but it will be affordable ^^
     
  15. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
  16. galaboy

    galaboy

    Joined:
    Dec 2, 2012
    Posts:
    8
    this blog asks for an invition. can i have an invitatiion.