Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Assets [Beta] Ultimate GPU Particle System

Discussion in 'Works In Progress' started by MaxProude, Mar 13, 2018.

?

Do you want to have a GPU Particle System in Unity?

Poll closed Apr 13, 2018.
  1. Yes

    100.0%
  2. No

    0 vote(s)
    0.0%
  1. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    Ah, so if we wanted to use this for something like a full-screen blizzard effect, it probably wouldn't cause any issues for something like that?
     
  2. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    That's right. In a blizzard effect, you wouldn't notice this problem. Only effects that have to be very precise.
     
  3. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    Thanks for the answers, I went ahead and got the asset and have been playing around with it. Looks like it is going to work really well! One question that I didn't see in the documentation. Is there any sort of API that can be accessed from a script to dynamically change the properties of the emitter at runtime? Specifically, I'd like to change how many are emitting and the stretch factor of the billboard to make snowfall dynamic based on a larger weather system.
     
    MaxProude likes this.
  4. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    I haven't come around and designed neat API yet, but most of the properties are public and can be accessed without a problem from a script. If you can't find something you can take a look at the editor file. It demonstrates how to use some functions correctly. You can also send me a message or post your question here.
     
  5. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    Thanks, that seems to be working well! A few points of feedback after playing around with this further:

    • I moved the system into a 3rdParty asset folder. This causes the welcome message to not appear and an error to log about not being able to find Logo.png (it is looking in Assets/Ultimate GPU Particle System/Resources instead of Assets/3rdParty/Ultimate GPU Particle System/Resources). I haven't seen this issue come up with other assets.
    • If you put the logo back in the directory where it is looking for it, the welcome message appears every time you hit the play button, which isn't desired.
    • For some reason, the Emission Rate is changing from Value to Min/Max curve every time you hit play (fixed this by manually setting emissionRate.mode = 0 in my own script).
    • For some reason, the Min/Max curve doesn't seem to work, unless I am misunderstanding how it should. It is set as a sine curve with X = 1000 and Y = 1000. I assume this should always return an emission rate of 1000. However, it seems like it is only emitting one particle.
    • Sometimes after making changes in the PS editor, the particles will only render on top of the vegetation meshes in the scene and nowhere else until we hit play and then stop again.
    • Rotating the Cone Emitter shape doesn't seem to do anything. The particles always emit toward the sky.
    • Enabling a Light Mode under Material Options causes all the particles to disappear. Is this because you need to set up the Map textures?
     
    MaxProude likes this.
  6. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Thanks for reporting the problems. Can you tell me a little bit more about your setup? Unity version, SRP, PC/Mac. I'll fix the problem with the problem with the path and the welcome message right away and look into the other issues.
     
  7. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    As it turns out there has never been a problem with linear space. The slight slanting of the particles are caused by the noise texture that I used to generate turbulence. You can fix this now by unchecking the sRGB box in the import settings. I'll keep doing some testing but it looks good so far.

    Sorry for that. I'll keep testing the other stuff, but I couldn't replicate it yet.
     
  8. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    I'm using 2019.3.0f1 with URP on a Mac.
     
  9. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    273
    Has the position 0,0,0 bug been fixed? Can this be used in moving objects away from the center of the world? Hesitant to buy this from the asset store reviews and the lack of response to those reviews by the dev.
     
    MaxProude likes this.
  10. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Yes, bounding boxes can be defined in the main editor tab.
     
  11. akuei2

    akuei2

    Joined:
    Oct 17, 2018
    Posts:
    69
    Hi, long time no see ... max.
    How about you trail effect? Possible as a x-mas gift? :p ;)
     
  12. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    6
    Hi Max,

    I'm the guy in Berlin, have you seen my email? :) Anyways, I've found out a few things (e.g. attractors can have negative forces, I was being a dummy), but some issues I couldn't solve. The most important is that skinned mesh emitters are being funky for me. I made a little video (1 min) where you can clearly see the issue. The wrong emission point is (0,0,0). I forgot to show that when selecting another different skinned mesh of a monster for testing, the emission even vanishes underground, away from (0,0,0). I hope you have an idea about what to do here!

    Some more questions:
    1) When I create a collision plane attached to the hand (such that the particles don't fly through it) and move the hand, it kinda cuts the particles and then they slowly drift away, instead of pushing them away with the hand. Is that correct? Is there a way to push particles with my hand?
    2) Is there a way to detect collisions with objects in the world? I suppose not, but want to go sure.
    3) Can you point me to how I can find out how many particles are currently alive in this emitter?

    In general, for future reference and other people: It works great in VR! The scene you can see in the video renders at around 4ms with a 1080ti and the particles don't even make a difference. It's "only" 130k particles, but I mean... I don't even need more, it looks brilliant and doesn't cost anything!
     
  13. wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    Joined:
    Nov 15, 2018
    Posts:
    62
    Hey Max,

    I am finding a solution to play massive blood splash effects with low cpu load(there are thousands of soldiers to fight in a scene). GPU Ultimate Particle System seems like the best choice for me. Can you give me a similar tutorial to achieve this?(How to make a blood splash effect with this Asset).
     
  14. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Hey long time no see! :D
    Unfortunately those things are more tricky than I expected. Also I couldn't dedicate enough time to it as I would hoped. I'll keep working on it. Maybe I can wrap it over the holidays.
     
    akuei2 likes this.
  15. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Hello fellow Berliner!
    Thanks for the feedback. I thought I replied... Could you check your spam folder, maybe it went in there.

    As for the bugs:
    Could you tell me a bit more about what you want to achieve? I assume you want to make particles fly from the hand to the object or vise versa. Also, if you could provide a test case, I'll look into it and try to set it up correctly and fix the bugs.

    As for your questions.
    1) I honestly haven't thought about the possibility to attach the collision plane to the emitter. It designed those to work in world space and don't move a lot. The problem with the collision plane is that they have a positive and a negative side. In the negative side (Red side), particles are always colliding. I did that to maximise precision and so that no particles could fall through it. If you move it around , everything that's on the green side is not affected and everything on the other side will collide. Every collider only works with the particle system it was assigned to.
    2) Collision with objects in the world is possible, but they need to write to the depth pass and only collide with front facing objects.
    3) All particles in this GPU particle system are being calculated simultaneously. Getting the particles with a lifetime > 0 would be pretty hefty to calculate, because we can only get this info from a texture. The best we could do is an estimation. Is this important for your game?

    Cheers,

    Max
     
  16. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Hey there!
    There are many ways of achieving a blood effect. You could make a texture sheet animation or animate particles like a a splash by scaling it up etc. However you do it, make a single particle system and re-use it as much as you can. You can do so by moving the emitter around and calling Emit(1) on it whenever you need it. You can also have multiple emitters with different textures and behaviours so that you get splashes, slashes, drops and other types of gore effects.

    You mentioned, that you have thousands of effects like this on screen, so I assume that the effects are very far away/ small. I would recommend to fine tune them in the same manner.
     
  17. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,040
    I just want to toss my name in the hat as someone else who would really appreciate a solid example of using this for a nice blood effect somehow. I simply cannot find anything that works with the HDRP that looks any sort of decent, and I finally grabbed this in hopes that it might be up to the task, but I just don't know enough about how to go about creating such an effect. My particular situation is somewhat the opposite of the gentleman (or lady) who also asked for it, as mine are close up and am hoping for a bit "over-the-top", perhaps Mortal Kombat style splash effect from a sword slash or stab, but anything really would be helpful.

    Even if it is just a solid step in the right direction, as I have tried everything from Obi-Fluid (No HDRP support), half, or possibly a dozen other assets on the store and the only things that are decent again don't work in HDRP due to handwritten shaders, or similar. One even ended up being really nice, but turned out it was just a 2d sprite on a billboard, which didn't really help me much due to it being elaborate enough I thought it was 3d from the demo video.

    If you happen to have some spare time, and would not mind creating an example, I, and I am sure the other poster as well, would really appreciate it.
     
  18. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    Is there a way to make the billboards face the camera? For example, I've got my snow effect working great, but if I turn the camera, the effect no longer looks correct because you are seeing the snowflakes from the side.
     
  19. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Yes, sure. Simply pick billboard as the particle type. Horizontal and vertical particles also gave the camera but are also facing a certain direction.
     
  20. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    61
    Actually, going back and reading this I realize having them face the camera doesn't make a lot of sense. What about making them face random directions to resemble actual snowflakes?
     
  21. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    I would recommend to use a sprite sheet animation with different shapes to get more diversity of snowflakes. Set the particle system to pick a random index. Randomly rotating particles in 3d space really doesn't look so good and I haven't used it myself at all.
     
  22. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    6
    Heya just wanted to let you know that I found the culprit for the (0,0,0) particles on the left hand: The left hand is scaled negatively and otherwise identical to the right hand. Apparently the camera which is being used to render to the rendertexture for the skinned mesh renderer can't take negative values! I also found out how to change the color, one has to run UpdateColorOverLifeTime(). Either add it in the update function of the particles or run it after every color change. So now I'm even more happy with this amazing asset :)
     
    richardkettlewell likes this.
  23. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    6
    Hey Max or anyone else reading this: I have a strange issue when building my project: The particles are not emitted from the skinned mesh any more, and they are also not animated at all, plus their draw order seems to be strange. This does not happen when playing in the editor. See this example:


    Anyone have a clue what's going on here? Not being able to build is kinda not ideal...
     
  24. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    96
    Last edited: Mar 13, 2020
  25. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    78
    does this support rate over distance?
     
  26. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Yes it does. Subframe interpolation isn't in yet but it will come in a Future update. To hide this, you can simply give the initial speeds a slight variation in speeds.
     
  27. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    6
    Hey Max,

    I've waited for quite a while now and did not get an answer, neither as an email nor here in the forum. I still have the issue when building as seen here in the video above. Now I get a message that my emails are not getting through to you, relaying denies. Are you aware of this? I would really appreciate an answer here or via PM or whatever, just give me a hint on where to look or what to do, please. If I cannot build my game, I can't sell it, and that makes your asset 100% unusable for me even though I love it and have made a lot of effort to really have it look and behave amazingly.
     
  28. LaserSaber

    LaserSaber

    Joined:
    Jul 20, 2010
    Posts:
    11
    Does this system support cone shape emitters? If so, does it give control over "Radius Thickness"?

    upload_2020-6-3_9-30-32.png
     
  29. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Sorry, I didnt see your emails. This looks like a problem with the mesh emitter. Can you give me a repo case so I can debug this? Looking at this I'm only guessing.
     
  30. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    160
    Cones are supported, but thickness is not. You can either emit from volume or shell.
     
  31. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    6
    Heya, this time I didn't get a notification about this answer. Strange. But yeah it probably is an emitter issue... I'm using a skinned mesh emitter, the SteamVR hands. So if you don't have a VR headset, this is going to be difficult to reproduce. Can you send me an email to marius.s.klug@gmail.com, please? For some reason I can't send you emails, they get stuck and your website is not reachable. It would probably be the easiest to have a Zoom meeting and share screen so you can see what's happening. Or you just come over, since we're both living in Berlin ;-)
     
    m_stolze likes this.
  32. m_stolze

    m_stolze

    Joined:
    Jun 24, 2020
    Posts:
    4
    PM is on the way.
     
  33. StutterFoxStudios

    StutterFoxStudios

    Joined:
    Mar 5, 2014
    Posts:
    40
    Hi @MaxProude ,

    Apologies for posting this here. I tried to reach out to you via your support email regarding this asset and your fog of war asset but sadly it bounced back. I thought I had the wrong email so attempted to confirm on your website but that too seems to be temporarily down.

    Is there another email address you can be contacted on?

    Kind regards,
    Todd
     
  34. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Hi Max,

    Bought your package but got this when sending email for support.
    Do you have a discord channel?

    Message not delivered
    Your message couldn't be delivered to support@maxproude.com because the remote server is misconfigured. See technical details below for more information.

    The response from the remote server was:

    550 relaying denied (ID:550:1:3 (mi006.mc1.hosteurope.de))
     
  35. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    55
    I bought this asset some time ago. It's realy amazing it runs of mobile and is very easy to use.
    I have some questions about it:
    1. Is it possible to make the particals follow along a spiral, maybe to set a path for the particles to follow?
    2. Is it possible to change material options at runtime, since it recompiles the shader

    Please keep on developing this project further. Thank you to the developer of this particle system!
     
    Last edited: Aug 9, 2020
    MostHated and richardkettlewell like this.
unityunity