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

Pyroclastic Puffs - DX11 Comp Entry

Discussion in 'Made With Unity' started by smb02dunnal, Jan 20, 2013.

  1. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Here is my second entry for the DX11 contest (my first one being Fluidity).

    It's a new version of my pyroclastic explosions some of you might of seen a while back.

    The raymarching is still done in the pixel shader (with some fancier tricks though) and the noise is calculated in the compute shader and stored in a volume texture.

    The great thing with this project is that I am releasing the full (documented) source code completely free under the MIT license, right now, here! (Until I get a chance to put it up on the asset store, still for free of course).

    A lot of people have contacted me with regards to my older version of this, so I'm hoping this will be satisfactory to you all. And let me know if you do anything cool with it, I'd definitely be interested!


    Here is a link to the full project, and executable : PyroPuffs.zip


    And for those of you without DX11, here is an updated video!
     
    Last edited: Jan 20, 2013
  2. samloeschen

    samloeschen

    Joined:
    Mar 22, 2010
    Posts:
    268
    Wow! That looks gorgeous, best of luck!
     
  3. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Absolutely wonderful!
     
  4. Kridian

    Kridian

    Joined:
    Jan 24, 2012
    Posts:
    55
    I think... I think it's time for...



    ..some Kronos!
     
  5. hellraizerhhh

    hellraizerhhh

    Joined:
    May 26, 2010
    Posts:
    619
    This contest really made some sick stuff. I really like this, great work!
     
  6. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Offering the source gratis is admirably generous, my hat goes off to you sir
     
  7. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Sharing this is incredible, thank you! It also just convinced me you deserve a Fluidity purchase, getting it now also :)
     
  8. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    FYI I'm working on a new version of this. My ultimate goal is to get it working on, Mac, PC, Android and iOS.
     
  9. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    699
    Very awesome, though maybe it would be more impressive to see in an actual animated explosion :)
     
  10. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    This is awesome smb! I'm finding that I can't use more than 5 objects in the array - anything over index 4 doesn't get the effect applied to that position. I've look though your code but I can't seem to find out where this limitation is. I'm pretty new at using compute shaders, so it's possible I'm missing something obvious. Any help is much appreciated.

    Thanks!!
    ~Jake
     
  11. BobBobson108

    BobBobson108

    Joined:
    Mar 13, 2008
    Posts:
    57
    Found the solution! It's the unroll command in the Pryo Puff shader. It must be changed from

    Code (csharp):
    1. // Scene setup, draw shapes in here.
    2. float RenderScene(float3 pos, out int objectID)
    3. {  
    4.      objectID = -1;
    5.      float sceneDistance    = 1000000;
    6.  
    7.      [unroll(5)]
    8.      for(uint i=0 ; i<numberOfObjects ; i++)
    9.      {
    to

    Code (csharp):
    1. // Scene setup, draw shapes in here.
    2. float RenderScene(float3 pos, out int objectID)
    3. {  
    4.      objectID = -1;
    5.      float sceneDistance    = 1000000;
    6.  
    7.      [unroll(numberOfObjects)]
    8.      for(uint i=0 ; i<numberOfObjects ; i++)
    9.      {
     
  12. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Hey Alex,

    I was curious if you're doing any development on this. It's an awesome effect but I messed with it yesterday and was having a hard time finding a way to actually use it in a standard way.

    The script being pinned to the camera is one trouble (if you have two or more simultaneously then you need cloned scripts to render the effect?), the other is spawning new, unique instances realtime. Do you have any suggestions on this? Seems like such a fun tool to experiment with, just having a hard time finding out ways to use it on a larger scale.

    Thanks
     
  13. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    FYI What I've provided here is a demo. It is by no means a fully functioning product. If you want to use it for your own purposes, you will have to put some work into it yourself... No free dinners.

    That being said, I am working on a version of this, which will come in a very user friendly format. But it's not ready yet. But some time this year it will be :D
     
  14. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Lol, of course. I know its a free demo. You had mentioned updating it so I was of course curious about that and ideas/suggestions to extend it myself.

    Great! Looking forward to it. =)