Search Unity

Creative [Beta] Ultimate GPU Particle System

Discussion in 'Tools 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:
    160
    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:
    175
    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:
    160
    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:
    175
    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:
    160
    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:
    175
    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:
    175
    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:
    160
    I'm using 2019.3.0f1 with URP on a Mac.
     
  9. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    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:
    175
    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:
    7
    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. Danistmein

    Danistmein

    Joined:
    Nov 15, 2018
    Posts:
    82
    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:
    175
    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:
    175
    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:
    175
    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,235
    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:
    160
    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:
    175
    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:
    160
    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:
    175
    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:
    7
    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:
    7
    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:
    174
    Last edited: Mar 13, 2020
  25. niflying

    niflying

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

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    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:
    7
    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:
    175
    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:
    175
    Cones are supported, but thickness is not. You can either emit from volume or shell.
     
  31. Cangar

    Cangar

    Joined:
    Nov 27, 2018
    Posts:
    7
    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,462
    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:
    111
    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.
  36. Foxenstein66

    Foxenstein66

    Joined:
    Nov 5, 2020
    Posts:
    1
    Hello! I'm making a project and I'm trying to make a particle skinned mesh that changes color with time. The thing is that I cannot make meshes, I only can make trails of particles (kind of). Any solutions, please?
     
  37. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    Hey Foxenstein66,
    sorry for the delayed response. Did you try to swith the particle type without anything happening?
     
  38. papathor

    papathor

    Joined:
    Oct 8, 2012
    Posts:
    41
    @MaxProude is this asset still being supported and updated? I'm considering getting it in the sale, but I'm concerned about the reviews' comments about numerous bugs. Are these being fixed and the asset being improved?
     
  39. Brian-Ryer

    Brian-Ryer

    Joined:
    Mar 5, 2013
    Posts:
    43
    I was wondering the same thing, been looking and considering a purchase.
     
  40. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Any update on the trails feature?
     
  41. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    Hey look001,
    trails are already working in the latest version. You can enable them by changing the particle shape.
    The particle buffer is restructured. x: segment count, y: trail count
    You can also find a demo in the project files.
     
    look001 likes this.
  42. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Is it possible to take an image and have it turn into particles
     
  43. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    Yes, you can use the texture emitter to do that. You can assigns texture and the amount of particles is equal to the amount of pixels. They will be automatically arranged if you burst emit them all at the same time. Then they will behave like normal particles and be simulated the same way.
     
  44. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Is this asset still in development?
     
  45. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    I'm currently working on an update that adds new features, fixes and compatibility with 2021.1
     
  46. edufurlaneto

    edufurlaneto

    Joined:
    Sep 18, 2017
    Posts:
    17
    Hi. I am getting two compile errors on 2021.1

    Assets\Ultimate GPU Particle System\Resources\Scripts\Editor\GPUParticleSystemEditorEmitterGizmos.cs(71,107): error CS0117: 'Handles' does not contain a definition for 'DotCap'
    Assets\Ultimate GPU Particle System\Resources\Scripts\Editor\GPUParticleSystemEditorEmitterGizmos.cs(226,17): error CS0117: 'Handles' does not contain a definition for 'CircleCap'
    I changed the DotCap to DotHandleCap and seems to resolve one error, but did not find a replacement for the other.


    Also, your Example scenes always conflict with Playmaker LoasScene action.
     
  47. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    Thanks for letting me know. I thought I fixed this already. Maybe an old version of that file somehow made it into the project. I'll take a look asap.

    How does it conflict with playmaker?


     
  48. MaxProude

    MaxProude

    Joined:
    Feb 24, 2013
    Posts:
    175
    @edufurlaneto I tired to replicate the problem, but it worked fine for me. Somehow you must have gotten and older version, that was not supposed to be imported into Unity 2021.1.

    Here's how I did it:
    1. Downloaded the latest official release: Unity 2021.1.12f1
    2. Created a new project with it.
    3. Went to the Asset store and opened the package manager though the link.
    4. Downloaded and imported the package.
    5. It worked.

    If you can't get this version for some reason, try this to fix the problems: Search and replace Handles.DotCap with Handles.DotHandleCap. Unity changed the API on this one for some reason.
     
  49. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    It might be the issue where Package Manager holds onto a cache of all recent downloads…
    to fix, need to find the persistent folder where Unity assets are stored, and delete the cache AND the locally stored asset package. Then re-download the new version.
     
  50. edufurlaneto

    edufurlaneto

    Joined:
    Sep 18, 2017
    Posts:
    17
    Strange... I still get the same error even after deleted the package, download again and using it in a new project in 2020.3.
    It seems the error in only on "GPUParticleSystemEditorEmitterGizmos" script. Could you, please, send the updated version to my email?
     

    Attached Files:

    • GPU.jpg
      GPU.jpg
      File size:
      259.1 KB
      Views:
      320