Search Unity

Hydra Particles - A new particle sytem for Unity3D

Discussion in 'Works In Progress - Archive' started by VesuvianPrime, Aug 17, 2014.

  1. Manny Calavera

    Manny Calavera

    Joined:
    Oct 19, 2011
    Posts:
    205
    johnliuzx likes this.
  2. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    How do the particles react near walls? For example when I use Unity's standard Shuriken particle system my "smoke" will go through the walls.
     
  3. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    We have a very simple collision system implemented. 2D and 3D collisions are supported with independent bounce/friction coefficients, as well as physics material support.
     
  4. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    What you want to use is Hydra's collision radius attribute in the emitter. Instead of having the point collider as a point in the middle of the particle (which would cause half of the particle to go through a wall), Hydra can use what's effectively a sphere collider. This can also scale with particle size (if you have a random particle spawn size or change it over lifetime). So you can keep most (if not all) of the particle on the right side of the wall. It also works with physics materials and you can set bounce intensity and a few other things.

    Collision Examples are next on my to-do list for Hydra promo. Hopefully I should be able to demonstrate that soon.
     
  5. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    I don't see why it wouldn't be possible. The trick with smoke and dust like that is to use an animated shader so you have medium-sized particles, but within the shader there is an panning/stretching/rotating effect that manages all the little specs and the wobbliness of the cloud/plume/puff.
     
  6. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    where can we download it for use?
     
  7. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Hydra isn't available yet, but will be available soon. We're almost finished getting it ready for launch.


    EDIT: never thought of that, my mistake
     
    Last edited: Jan 28, 2015
  8. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    PURCHASE? The title says open source, any clarification on that?
     
  9. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Honestly, I'm just here for the FX demos and promo stuff, sorry if I caused some confusion.
     
  10. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    Thanks for replying. Is it possible to get the particles not go through the wall with the standard Shuriken particle system? Is there a price range for Hydra?

    I can't wait to see your examples!
     
  11. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Collision Examples

    Basic Collision.png
    Here's some collision. I used a small amount of friction (below 0.2) and some reasonable bounce value (0.6 to 0.8). Particles are set to change color by lifetime and face their velocity.

    smoke collision.png
    Smoke doesn't go through walls if you want. Personally, I would adjust the collision radius down a bit (maybe 20-25%) so there's some minor clipping, so the smoke looks like it presses right up against the wall, but only if you can't see the other side. I also used the Gravity Force, set to a negative value, to help the smoke rise. The smoke doesn't have much in the way of bounce, but a small bit of friction (0.1-0.2) to help it build up a bit.

    Scaled Collision.png
    It was hard enough trying to get it this close, so sorry for what looks like small inaccuracies, but all the particles that change size over their lifetime are colliding correctly with the geometry. Some look a bit off because they're one frame away from the contact, but rest assured they hit properly. The smaller particles are a fraction of a meter (unit) in diameter, so even the tiny particles can be trusted.
     
    rahuxx likes this.
  12. Ghosts_Riley

    Ghosts_Riley

    Joined:
    Dec 7, 2013
    Posts:
    82
    Wow! This looks great! This is just what I wanted! Thanks for the pictures!
     
  13. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    @rahuxx, for some clarification on "Open Source":

    I started making Hydra Particles in the first place because of frustrations with Shuriken. If Shuriken does things you don't like, your best bet on getting it changed is to submit a bug report and wait for Unity to fix it. Some of the Shuriken bug reports have gone unnoticed for years.

    With Hydra Particles I wanted to be able to provide the end user with the raw C# scripts instead of an obfuscated DLL. This way if something in the package is behaving badly, and I'm in the hospital, the end user is always able to go into the code and modify things.

    Hydra Particles will be free as in "speech", but not free as in "beer".
     
  14. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    @Ghosts_Riley We've settled on ~$70 for our first release.

    This includes all the scripts (emitters, forces) as well as the HydraCommon library (tons of utilities for maths, physics, and other goodies).

    This will also contain example scenes, prefabs, shaders, materials, textures, and so on. @Jesus has really gone above and beyond with his shaders, there are some really nice Shader Forge compatible shaders in there.

    Further, we're trying to get everything documented with some half-decent tutorials before launch. Also preparing a support forum to make sure people aren't dropped in the deep end.

    Finally, we're maintaining a todo list at Trello so you can see we have plenty of ideas for post-release.
     
  15. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    I have updated the thread title to hopefully prevent confusion, including my own.
     
  16. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Few more pics.

    You may have seen the particles can have different sizes and shapes. The billboards can be independently scaled per-axis.
    axis scaling.png
    Also, you can lock them to scale in a linear/uniform way where you can have various sizes of thin, long arrows, instead of just random scaling in every axis.


    Another thing is the bezier curve emission instead of just boring old meshes or primitives. These can be set to a point-to-point line or a closed loop (joining first and last points).
    bezier emission.png
    Emission is divided into segments between points, so an area with lots of points will have more emissions than an area where the points are few and far between.
     
    VesuvianPrime likes this.
  17. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Bump!


    Some more examples!

    Asteroid scene that responds to lighting (point and directional) and shadows correctly. Now it's easy to have tons of asteroids around a planet running really fast.
    Asteroids.png

    Also since nobody got the bug puns yet, I figure I'd give this away - you can animate vertecies with this because you have the correct particle mesh information...so you could move wings in the direction they're supposed to move. Then use forces to move the butterflies and the look-at option to make sure they fly forward (not backwards or anything).
    butterflies.png
     
    twoc46 and zyzyx like this.
  18. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    130
    I was interested in this many months ago when I thought you were close to a release, but nothing seems to have happened. The website has been replaced with a "Derp" message now as well...

    What's going on?
     
  19. VesuvianPrime

    VesuvianPrime

    Joined:
    Feb 26, 2013
    Posts:
    135
    Hi Nindim

    Apologies for the nonense with the website. I had a falling out with my host and am in the process of migrating.

    With regards to the extreme lateness of the release: there was a period where I was waiting on friends to produce the promotional content to sell the asset on the store. This work hasn't been completed and has hit my motivation. Further, there have been real-life events that have taken my attention.

    I can still complete this project, I just need to make a push to polish the final elements.

    That said, I'm going to look into releasing an open beta of the project. I'm just as eager as you are to see this in the hands of people.

    Thanks,
    Ves
     
    rahuxx likes this.
  20. SirStompsalot

    SirStompsalot

    Joined:
    Sep 28, 2013
    Posts:
    112
    I will say that I'm totally interested to see Hydra Particles come to life. Let us know if we can do anything to help!
     
  21. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Really?! That would explain some things lookig a bit off with my particles then! :D

    And this... would have to be one of the biggest undertakings I have ever seen! Definitely one asset that is actually worth every penny one will pay for it. I am not one for paid assets, but if I had the money, I would pick this up simply to fiddle around with it! :)

    BWT, @Jesus, dat aurora back there... ;) If anything, I think the name "shader Jesus" would suit you! :p Nice work, and
    for OP, good luck with this! :)
     
  22. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    How does performance compare to shuriken, since it's your own script and not built-in code?
     
  23. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    It's not as fast, but a direct speed comparison is kinda like apples and oranges.

    What Hydra has in physics, lighting and the other modifiers, Shuriken has no answer for. On the other hand, Shuriken (and its predecessor to a degree), with the simple default particle shaders and materials, is basically unmatched in terms of speed.

    This of it like this: if you're doing a space scene, you would use shuriken for the distant stars, the ones that don't move and you can use just an additive blend on a 64x64 sprite, and you can have tons of them. You would then use Hydra for the galaxy in the middle of the shot, the one that uses gravity to drag the stars in and around it, and then for lighting the gas clouds and nebulas.
     
  24. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    That's my questions answered then. :)
     
  25. ttpro1995

    ttpro1995

    Joined:
    Oct 2, 2015
    Posts:
    1
    Hi, I am interesting and want to use. Where can I find the source code repository or package file ?
     
  26. Abended

    Abended

    Joined:
    Oct 9, 2018
    Posts:
    142
    Hey hydra dude,

    I can't find this on the web at large. Where'd you go?