Search Unity

Puffy Smoke - Particles with a volumetric look

Discussion in 'Assets and Asset Store' started by Alesk, Sep 15, 2013.

  1. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi, I'm not sure to clearly understand what you are talking about here. The missile launcher script has nothing to do directly with the particles or their cleanup, it's here only to spawn missiles, which are linked to the smoke emitter. Could you explain further ?

    Ok, I'll see what can be done in this area, it won't be in the next update, maybe the one after that.

    Yep, I think that's possible, but in this case the mesh(es) will have to be generated twice... So it will reduce the number of particles being displayed before having perf issues...
     
  2. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    A new update is on the way : some performance improvements and tweaks.


    Before changing anything on this topic, I've managed to test it as it is now on oculus rift, and it's working pretty well, you don't need to define multiple cameras :)
    The only issue I've spotted is when particles are on the edges of screen/field of view : since they are aligned to the camera direction, you can notice that they are flat billboards, but it looks acceptable.
     
  3. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    Is there any way to get this working with the built in Particle System? The included emitter is very lacking in animation controls.
     
  4. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    It was my first idea... but the build in Particle System doesn't expose enough data to be properly used (color and size are not updated).
    I hope UT will soon fix this problem.
    In the meantime, if you have any suggestion to work around that, I'm interested ;)

    Still working on the next update, many improvements, and first iteration of the multiple lights support (1 directional + 4 omni at max)
     
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    So I finally got around to revisiting this and it works great. Not sure why cleanup was acting weird before, but I just went in and added the emitter and renderer scripts in a blank scene to play with it and poof, its working great. Took like 10 minutes... I guess I was overthinking it or the examples before?

    http://i.imgur.com/G2Harnd.gifv

    My only thoughts are in terms of optimization and scaling, I haven't tested it on a large scale but it seems to bog when I spawn 4 emitters at once, up to 20fps spike drop and immediately recovering. Perhaps it can be optimized somehow? It seems to handle 40 emitters simultaneously fine, but the creation process tanks it.

    // edit, actually it might be the explosions causing the tanks, I'll test more and give more specific feedback.

    I'm actually pretty happy with how it operates.
     
    Last edited: Oct 18, 2014
  6. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    Any chance this will be revisited with the release of U5?
     
  7. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    I still have to release an update on unity 4.3.x
    I've spent/lost too much time trying to do some nice clouds before releasing it, and I'm still not happy with it, but it should be enough for people to play with it.
    So I think I'll post it anyway in the following days.

    I've made a lot of changes in this new update (new shaders), so maybe some tweaks will be needed in your existing projects.

    About unity 5, the current version is working on it too but I've planned to start from scratch on a complete new version, so the next update will certainly be the last for Unity 4.
     
    hopeful likes this.
  8. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    What happened to pre unity 5 update? Will you release?
     
  9. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    I've made many changes, also in the shader which doesn't work the same way, and I was wondering if it was a good idea to release... And I've been stuck in other projects since then.

    So I'll release it as it is now (next week I think), and start working on the 5.x version in some weeks.

    A backup of your current project would be a very good idea before importing this new update.
     
  10. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Nice!
    Glad to see it alive. I'll aquire it later today. This way I'll have both versions and I'll se witch ones fits better. I'm specially interested on the missile smoke. The missile scripts looks interesting too :). Will work with VR? I don´t see why wouldn´t but just in case.

    Edit: Aquired :)
     
    Last edited: Dec 18, 2015
  11. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    In the future, I'll certainly make another asset only focused on homing missiles.

    I've tested it with oculus DK1, and it was working.

    Thanks ^_^
     
  12. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi !

    I've just submitted the new version (1.13) for review on the asset store ! At last !
    Sorry for the extra delay these last weeks, I had a nasty bug to fix before sending it.
     
    ZJP, TooManySugar and hopeful like this.
  13. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Nice! I'll pack the previous package under lock just in case :) . Can´t t wait to test.
    May be you could share what's in the box.
     
  14. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Of course, here is the detailed list :


    30/01/2016 - Version 1.13:

    - THIS WILL BE THE LAST ITERATION OF THIS VERSION. THE NEXT ONE WILL BE A COMPLETE REWRITE, WITH UNITY 5.3.x

    - Switch to Unity 4.3.0
    - New unified multi-compile shader for smoke and clouds, with more options
    - Unity Threading Helper replaced by ThreadPool class : same speed performances, less (no more?) GC hick-ups \o/
    - Switching off Unlimited particle now displays a Max particles count value. This number of particles will be preallocated in memory.
    - Bug fix : when disabling threads, a wrong number of particles where used when too many of them were present
    - The "Use Threads" checkbox is back on the Puffy_Emitter script, since it may be useful to be able to disable it on some mobile devices.
    - Tweak on the maximum Mesh Face count value to prevent max vertices allocation error, this parameter has also been renamed as "Particles per mesh"
    - Some corrections in the Cloud Shader : the sharpness parameter wasn't properly applied
    - Presets added in the editor menu "GameObject/Create Other/Puffy Smoke", note that you'll have to manually set the Light and Material to be used by the Puffy Renderer
    - Disabling a Puffy_Emitter script or its GameObject will now hide all related particles from the Puffy_Renderer script
    - Some memory optimizations
    - Readme file updates to reflect all changes.

    * Puffy_Renderer script *
    New features :
    - New parameter "Ambient intensity" to control how much the ambient color affect the particles
    - New parameter "LOD start distance" defines the start point for the Auto LOD option. So the LOD effect will happend between this point and the "Max render distance" value
    - Threaded optimization added on the mesh build function
    - Small performance improvements on the Frustum Check.
    - Puffy_Renderer script : "Sub mesh count" parameter added, to tweak the internal split of mesh data in order to optimize the amount of data sent to the gpu when a big face count is defined and few particles are visible. (higher value = more sub meshes = more memory comsuption)
    - Puffy_Renderer script : "Warm up" and "Warm up mesh count" added, to pre-build meshes and define how many are needed at start (good for mobile).

    Changes and bug fixes :
    - Cores Setup restricted to values Medium/High/Maximum, since lower values may lead to crash when dealing with a huge count of particles.
    - Screensize near clipping max value raised to 4
    - The Ambient color parameter state was affecting all renderers at once, it's now properly working individually on each one.


    * Puffy_Emitter script *
    New features :
    - Puffy_Emitter script : when "Assign to first renderer" is off, a "Renderer" input is displayed to pick the Puffy_Renderer to use with this emitter
    - Puffy_Emitter script : if no renderer is assigned to the emitter, gizmos wire spheres will be displayed for each particle
    - Puffy_Emitter script : Warm up added, to pre-fill the particles array

    Changes and bug fixes :
    - The "Direction" vector is now normalized before being applied to the particles motion
    - "Auto assign to renderer" renamed to "Assign to first renderer", and "Auto assign to" input removed
    - Internal changes to support multiple ShapeSpawners or MultiSpawners at the same time
    - Gradient End Time parameter moved to the Puffy_Gradient script
    - Bug fix in the particles recycling process (wasn't really noticeable, but needed to be fixed)
    - Particles are now stored in a List instead of an Array, allowing more internal flexibility and no real performance hit
    - The "chunk size" parameter is no more needed and has been removed


    * Puffy_Cloud script *
    New feature : OnDestroy method added to remove particles when the cloud gameobject is deleted


    * Puffy_MultiSpawner script *
    Bug fix : the Max Gap setting processing (taken from the emitter) for fast moving objects was not working properly


    - Shaders :
    Bug fixes :
    - Scattering effect was not computed properly, and this parameter is renamed to "Light Scattering" to be more relevant.
    - Fog is now properly handled

    New features :
    - Multiple lights support ! :)
    - Perlin Cloud demo script + 3D Perlin Noise class
     
    TooManySugar and hopeful like this.
  15. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Up on the asset store ! :)
     
    John-G likes this.
  16. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Nice, looking forward to 5.3.x version down the road. :)
     
    hopeful likes this.
  17. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    This may take some time, I first have to check what can be done or not with this new update ;)
     
    John-G likes this.
  18. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi @Alesk !
    I've got a question about your asset:
    my smoke particle has a problem: if the scene is by night, the smoke is still white.. your puffy smoke consider this and becomes 'black' or not?
    thanks in advance
     
  19. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    Yes it will be black (in fact it will get the ambient color) : it takes the light color / intensity and orientation in account.
    Try the webplayer here : http://www.alesk.fr/PuffySmoke/
    You have a slider to change the light intensity, let me know if this is what you need.
     
    Last edited: Apr 28, 2016
  20. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    yesss!!!!
    I explain you what I wish do:
    i'm building a rally simulator and I need 2 types of smoke:
    it's possible with your asset?
     
  21. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Yes, that's possible !

    If you buy it and need some tweaks to fit your needs, don't hesitate to ask ;)
     
  22. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    purchased!!!
    now I play a bit... thanks!
     
  23. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    ok thank you :)
     
  24. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi @Alesk
    finally I'm trying to put puffy smoke to my project...
    first question: it's possible disable the shadows or make a better look?


    another question:
    i need different smoke types, basically on asphalt and on tarmac but may be many different types... what's the better way? create many puffy render or change the settings dynamically?
     
  25. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    For now a better look isn't possible (but I'm working on it for the new version).
    To disable the shadows, go into the "Puffy Renderer" script, line 1667 and change :

    gameObject.GetComponent<Renderer>().castShadows = true;

    by :

    gameObject.GetComponent<Renderer>().castShadows = false;

    Sorry for that, I should have disabled it :/

    And for your second question, you should be fine by creating multiple renderers, one for each type of smoke.
     
    Last edited: May 16, 2016
  26. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    the 5.4 beta 17 :p
     
  27. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Ok, let me know if everything is ok after the fix mentionned in my previous post.
    And let me know too if you have any other question ;)
     
  28. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Working on Unity beta 5.5 ... I've got some good results with the new Shuriken update ;)
    I've also found how to get some kind of transparent shadows. It's a fake using dithering and soft shadows. It's far from perfect, but better than big dark rectangles ;)

    smoke_shadow.jpg
     
    radimoto, TooManySugar, ZJP and 2 others like this.
  29. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
  30. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Looking good, I still had no time to use the 4.x version lol
     
  31. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Haha, then you can wait for the 5.x one, which should be easier to use ;)
     
  32. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi @Alesk !
    what's up?
    I have a request: can you help me to do a better dirt dust trail when the car go on dirt road?
     
  33. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Yup, what do you need exactly ?
     
  34. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    something like this:


     
  35. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Ok, and what have you done until now ?
     
  36. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    now is like this:
     
  37. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Maybe you could add more particles and/or more opacity at birth.
    Also you could try to tweak the color based on the particle altitude : darker when they are near the ground, to simulate the shadow.
    For now it's not possible (or very difficult) to have self shadowing on particles or to receive shadows from other objects.

    You could also try to add 2 different types of emitters :
    - light particles emitter for the ones moving up and fading quickly
    - dark particles emitter for the ones staying near the ground and moving slightly sideways more than upward.

    Anyway, your demo is already pretty cool ;)
     
    TooManySugar likes this.
  38. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I was gonna suggest the same, the particles seem to lag at birth. There sould e a supper thick smoke cloud behind the car on the first meters that goes fading as it expands. You could mask the dying particles with the bigger size of the reamaining ones.
     
    Alesk likes this.
  39. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks! I'll try!!! :rolleyes:
     
  40. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    I'm working on your fixes, and I noticed that when I brake the particle become too much red:

    have you got some ideas to fix this?
     
  41. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Your smoke looks a bit too uniform, can´t you add more texture?
     
  42. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    how can I do this?
     
  43. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
  44. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Yes, it can use noise textures, and some are provided with it. Have a look at how it's set in the demo scenes.
    You have to configure the material and set the "details" textures, in the red and blue rectangle.
    The "start details" texture is displayed at the birth of the particle and is faded to the "End details" texture until its death.

    material.png

    For the red color, do you use the extra light option ? (in the green rectangle of the screen shot)
     
  45. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks @Alesk for the start and end details I'm using the same settings.. i've removed the extra lights and I check!
     
  46. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    196
    Has anybody had any success getting this to work in URP?
     
  47. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    Hi,

    This tool is quite old now. The new VFX Graph tool is a lot more efficient to do the same job, with better performances.
     
  48. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    196
    This asset may be old, but Puffy Smoke still looks so much better than anything I have found on the asset store. So thick and puffy. Developer really did a great job with this asset.
     
    Alesk and giraffe1 like this.
  49. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
    I've done a little test to port this to the VFX graph, and it seems to be working.

    Is anybody interested in a new version of this asset running in the recent Unity versions, or does it look obsolete anyway ?
     
    VIC20 likes this.