Search Unity

Smokey

Discussion in 'Made With Unity' started by Reznic, Sep 29, 2006.

  1. Reznic

    Reznic

    Joined:
    Sep 13, 2005
    Posts:
    21
    Check this out. It's an example of smoke with a moving fractal texture. To add an alpha channel, I used the VertexLit (seperate alpha) shader from this thread: http://forum.unity3d.com/viewtopic.php?t=2451&highlight=. To make it less flat I added a second material with the Particles/Alpha Blended shader to add shadows and highlights. I'm having a problem where the particles don't fade out before they dissappear. For this test I'm just faking it with fog.
     

    Attached Files:

  2. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    cool stuff. er i guess... hot stuff!
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    That's some pretty impressive smoke!

    --Eric
     
  4. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Wow, nice. I hope you'll be willing to share when it's finished, since it looks amazing.
     
  5. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Thats really neat! I am wondering how it would look with a colorful background or used as a rocket trail. Probably the most impressive is when you move the camera inside the smoke.
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Very nice smoke!
     
  7. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    pretty nifty, all you need now is the light from the fire lighting up the smoke =P
     
  8. Reznic

    Reznic

    Joined:
    Sep 13, 2005
    Posts:
    21
    I'm actually having a bit of trouble. I'm just starting to learn the shader language, and there are a few things I can't seem to figure out: This smoke uses the fractal texture script from the procedural example project and, therefor needs an alpha channel to not look like squares. The shader from this thread: http://forum.unity3d.com/viewtopic.php?t=2451&highlight= allows for this, but doesn't allow for the paricles to fade based on the particle animator component. I've been trying to write a shader to make this work properly, but not having much success. If anyone can help me out with this that'd be great.

    When this is all finished I'll definately upload the scene and assets and a how-to.
     
  9. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Code (csharp):
    1.  
    2. SetTexture [_MainTex] {
    3.                Combine texture * primary DOUBLE, texture
    4.             }
    5.  
    replace the combine line with this:

    Code (csharp):
    1.  
    2. Combine texture * primary DOUBLE, texture * primary
    3.  
     
  10. Reznic

    Reznic

    Joined:
    Sep 13, 2005
    Posts:
    21
    Okay. Here it is. A web-player and unity package of my procedural smoke. Use it, modify it, do whatever you want with it.
     

    Attached Files:

  11. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Fantastic stuff. Thanks very much for sharing!
     
  12. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    Thanks, that's impressive -
    If you play with the fractal speed, you can create a very convincing billowing effect!
    And the fractal script could be used to modulate terrain heightmap ...
     
  13. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    WOW... i am more than impressed. And procedural textures will certainly come in handy when i look at the atmospheric simulation project wich started in the colaboration section of the forum.

    Strange, that things exist for such a long time without being noticed. It seems to need some modifications for unity 2.0 though.

    Many thanks!

    Frank
     
  14. Joe ByDesign

    Joe ByDesign

    Joined:
    Oct 13, 2005
    Posts:
    841
    Very cool result!

    I started coughing profusely when the smoke filled the camera view...

    Coincidence!? :p
     
  15. TBoxman

    TBoxman

    Joined:
    Aug 2, 2008
    Posts:
    29
    Rez, thanks for the Smokey package. It's just what I was needing. I had logged into the forums specifically looking for fire and smoke.

    I got the package imported and now have fire/smoke in my scene.

    But my world seems to be much larger than yours. How do I scale up your smoke emitter?

    Or should I worry about the scale of my world and re-import it to be smaller? I'm in the early stages so don't mind if re-importing is the smartest thing to do.

    Is scale something I need to worry about in Unity? Meaning is it possible for my world to be too large and cause problems?

    I modeled it in C4D in metric and imported it at a scale of 1.

    Thanks for the advice,
    Terry
     
  16. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    This very nice, how does one cause the smoke to last longer so it lingers high in the sky?
    I've gotten bigger smoke but not longer lasting smoke.
     
  17. merlinthehairy

    merlinthehairy

    Joined:
    Jan 23, 2013
    Posts:
    1
    wow thanks so much really great help to my project.