Search Unity

Volumetric Smoke Shader

Discussion in 'Works In Progress - Archive' started by jack-riddell, Sep 30, 2015.

  1. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    ether that or just cutout particle shadows which is just lazy
     
  2. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I'm curious how this project is coming along. Did you already submit something to the asset store?

    P.S.: I spent like half an hour looking for this thread and only found it because I remembered that "cloud sandwich" was being said in this thread ^^. I was looking for particles and shadows the whole time x].
     
  3. dzq1ru

    dzq1ru

    Joined:
    Aug 13, 2014
    Posts:
    2
    Hi, great work! I filed when tried to do the same. Waiting for release on Asset Store. Can I join beta test?

    My config:
    Windows 7 x64
    Intel Core I5 2.66 GHz
    12 Gb RAM
    Nvidia GeForce 560 Ti
     
  4. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I could test too if you want. Send me a private message if you are interested.

    Win 7 x64
    Intel i7
    GTX 670
     
  5. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    I would also be happy to offer my system for beta-testing. I have an AMD processor, which seems to be less common.

    System specifications:
    OS:
    Microsoft Windows 10 Enterprise
    CPU: AMD FX-9370 Eight-Core Processor, 4415Mhz
    RAM: 16GB
    GPU: NVIDIA GeForce GTX980
    Monitor Native Res.: 2560x1440px

    Thank you in advance for your consideration!
    - S.
     
  6. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    +1
     
  7. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    sorry for the radio silence. on Christmas day my landlord called told me that my house was going to be demolished so he could build some apartments on the land and that i had to find a new house which is not easy at that time of year in Melbourne. The house hunting has taken priority and has unfortunately delayed the asset but as of today i have finally secured a roof over my head so after i finish moving it will be back to finishing off the asset
     
  8. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Sorry to hear that! I moved last year too and it took us 9 months to find our new home. I can't imagine how stressful it must be to have that deadline crawling nearer and nearer while you look for a new place. Glad to hear you found something!
     
  9. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    im not sure if my stuff violates that patent as it uses a combination of several techniques.
     
  10. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Why would nvidia have any interest in keeping people from using advanced graphics technology? That stuff is a factor that drives their hardware sales and I'd imagine that they mainly patent things so that no one else does or as a backup plan in case they ever get sued for violating patents. If you are unsure, maybe you could just ask them, if it's ok to use?
     
    Last edited: Feb 11, 2016
  11. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    thinking about it but not sure if it would be better not to draw attention to myself than strait up ask and risk it. as the saying goes its better to ask for forgiveness than ask for permission. anyway I'm still not 100 percent sure what I'm doing falls exactly under there patent
     
  12. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I understand your concern. Maybe use a fake mailaccount?
     
  13. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Disclaimer: I'm not a lawyer by any means and my comment here should not be misconstrued as any sort of legal advice. However, I do work for an attorney who deals with patents as part of my full-time job.

    Patent infringement (in the US, at least) seems pretty difficult to prove, unless you are doing the exact and complete "thing" that's been patented. A variation or omission from the patented technique, however small, usually means you're in the clear.
     
    Martin_H likes this.
  14. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    So after a long delay and a lot of F***ing around (Don't get me started about renting in aus) I'm back on station and working on the volumetric smoke. i have done the Inital packaging work and am now looking for a couple of alpha testers to test out what i have and give me some feedback.
     
    S_Darkwell likes this.
  15. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I'd be happy to alpha test. Just send me a message with a download link if you're interested.
     
  16. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Free to do some testing if required.
     
  17. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    This asset is of great interest to me. Additionally, I have a long weekend beginning tomorrow. I'd love to do some testing on your behalf.

    Be well!

    - S.
     
  18. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    pulling together some basic documentation and ill throw up a drop box link hopefully within the day. before anyone gets too hyped this package isn't a magic bullet. it needs a lot of tweaking to look right
     
    S_Darkwell likes this.
  19. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    Of course! While I hope to have a solution such as this one for future projects, at the moment, I'm just excited to see what it can do and what contributions I can make to its success. :)

    - S.
     
  20. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    ok looks like pro builder basic is going to be bundled with the first alpha because i cant find a way to remove it without loosing all the models i have made with it
     
    S_Darkwell likes this.
  21. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    277
    I'd definitely be willing to check out that dropbox link, help separate pro builder and proof documentation if you need.
     
  22. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    just to clarify its the free version of pro builder so i wont be leaking any paid content
     
    S_Darkwell likes this.
  23. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Just a heads up but the next version will require you to use the Unity 5.4 beta. Im implementing the Light Proxy Volume code to give my particles more light support
     
    John-G likes this.
  24. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Supposedly if you manually delete ProBuilder scripts from your project directory you'll lose the script references but not the meshes.
     
  25. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    I think i tried that but the meshes went with it
     
  26. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    its not that big of an issue now while I'm working on alpha's and beta's
     
  27. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Added support for light probe proxy volumes. not sure how useful it will be in the long run apart from wrecking performance but its there
     
    Seneral likes this.
  28. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Screenshots! :D
     
  29. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    hey does anyone know if there are any normal mapped particles available on the unity asset store? i had a quick look but i couldn't find any. anyway here is some very early wip of a particle effect with normal maps NormallMappedParticles.png
     
    Mister-D likes this.
  30. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Same setup with a slightly different normal map. the underlining technique produces a few to many errors, i was hopping it wouldn't be noticeable with the low frequency detail of smoke but i was wrong. next step should clean it up a bit NormallMappedParticles2.png
     
    eskovas likes this.
  31. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    created this cool effect whilst playing around with compression options. might be useful for something in the future idk NormallMappedParticles3.png
     
  32. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    here is a looping smoke particle with normalmap
     

    Attached Files:

    hopeful and John-G like this.
  33. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    and another one for u to test your system with ;)
     

    Attached Files:

    hopeful likes this.
  34. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    thanks man
     
  35. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Doesn't look like much but that's one properly normal mapped particle.
    NormallMappedParticles4.png
     
  36. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Very nice! Can we see a comparision of normal vs normal mapped in a practical use (Smoke)?
     
  37. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    not using the best art assets and haven't setup lighting correctly but this should give you an idea of the difference

    this is per pixel normal mapped
    NormallMappedParticles5.png

    this is is per vertex normal mapped
    NormallMappedParticles6.png

    the reason i'm doing this to to try and create the puffy volume effect you see in images like this
     
    John-G and Seneral like this.
  38. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    with better art assets and a little more shader code this is what normal mapped particles can look like
     
    moure likes this.
  39. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    It's looking awesome!:D Keep it up! Really looking forward to being able to use this one day.

    --IronDuke
     
  40. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Are you calculating the cotangent in the pixel shader for this, or just using the tangent as is?

    More specifically can the particles rotate?
     
  41. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    particles can rotate but for performance reasons they have to be bill boarded as in they have to face the camera directly
     
  42. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I'm asking about the normals. Unless Unity fixed something they didn't have proper tangents on quad particles so a rotating normal mapped particle wouldn't render properly.
     
  43. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    well i used my magic programming skills to solve the quad tangent problem. there are still a few issues / limitations but for 90% of particle effects it works fine
     
  44. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Another test with a more cartoon Texture / normal map
    CartoonSmokeTest1.gif
     
    Mister-D, John-G and Seneral like this.
  45. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looking great.
     
  46. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    hope you focus on realistic. Unfortunete how curretn devs. are using such a great engine like U5 to make pixel/2d/toon visuals that look worse than a lot of games from the 90's.
     
    popupAsylum and Mister-D like this.
  47. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    Not sure why, but that cartoon particle test is somehow mesmerizing...

    --IronDuke
     
  48. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Because it looks like a lava lamp? :)
     
  49. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    so in the latest version of the shader code i couldn't understand why my computer was running so slow. i eventually discovered that unity was trying to compile over 300,000 variants of my shader based off the multicompile options i had added, turns out making one mega shader with all the options isn't the best idea
     
    elbows and Martin_H like this.
  50. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Making good progress on multi light support, using a mix of per pixel and per vertex shader's to get good performance while still capturing the key high frequency details
    NormallMappedParticles7.png
     
    John-G, Martin_H, Haagndaaz and 2 others like this.