Niagara 105 - GPU Particles and Collision Events

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024

ความคิดเห็น • 78

  • @WilliamFaucher
    @WilliamFaucher 2 หลายเดือนก่อน +1

    So eloquently explained, thanks so much!

  • @arttilt
    @arttilt 3 ปีที่แล้ว +2

    Swiftly becoming a computer engineer from your videos as well. Beyond worthy.

  • @FightingWitch
    @FightingWitch 4 ปีที่แล้ว +10

    Really useful explanation, thank you for posting this video!
    However, I would suggest to remove the overlaying text after a bit from the beginning of the video, as it overlaps with the command prompt and message log, and perhaps make the camera PIP smaller and placed somewhere where is less likely to have important information (maybe top left?)
    Other than that, great stuff!

  • @chutneystudios
    @chutneystudios ปีที่แล้ว +1

    I periodically look at this video to revise some basics, thanks

  • @SanthoshKumarfojoheartthrobe
    @SanthoshKumarfojoheartthrobe 7 หลายเดือนก่อน +2

    I thought you were my lifeline for showing me how to use collision events with gpu emitter... but then 13 minutes later, i was dropped dead.

    • @tharlevfx
      @tharlevfx  7 หลายเดือนก่อน

      If you check out my intro to niagara course I show how to replicate all the events on gpu

    • @glay011
      @glay011 5 หลายเดือนก่อน

      @@tharlevfx Which course is about GPU particle collisions?I want to buy

    • @tharlevfx
      @tharlevfx  5 หลายเดือนก่อน

      @@glay011 introduction to niagara covers the basics of collisions. Then I look at obstacle avoidance in the advanced course and inter particle collisions in simulation stages

  • @ameliamorrison7265
    @ameliamorrison7265 3 หลายเดือนก่อน

    THANK YOU! You are a lifesaver for this video!

  • @darkhummy
    @darkhummy 3 หลายเดือนก่อน +1

    Thanks, that looping bit was something I got stuck on for triggering another emitter on collision. So unintuitive.

  • @allaboutgamedev4224
    @allaboutgamedev4224 3 ปีที่แล้ว +1

    Superb job. Nicely organized. You saved my day!

  • @svdwellen
    @svdwellen 4 ปีที่แล้ว

    Mandatory comment to support this video. Thank you very much!

  • @liquaard2824
    @liquaard2824 2 ปีที่แล้ว +1

    Note -
    Cpu - For Ai and Physics etc
    Gpu - For Drawing
    - Gpu information to cpu is costly , so cannot simulate Collisions on Gpu , has to be done in CPU
    - For Huge no of particles do GPU sims or will be heavy cost on cpu

  • @3d8bits44
    @3d8bits44 ปีที่แล้ว

    Thanks for the awesome content! This tutorial really Helped me!

  • @foxy2348
    @foxy2348 2 ปีที่แล้ว

    Thx 4 the background knowledge! Awsome content!

  • @parmidarazavi4553
    @parmidarazavi4553 3 ปีที่แล้ว

    @tharlevfx
    I am facing an issue with the Collision node which is my particles die the second they hit and object! I do not want them to die ! I need to keep them in an infinite lifetime. And when I deactivate the collision node, they stay alive.. so I am 100% sure it is the collision node that is killing them after contact ! And I am currently using GPU, distance field collision.
    Do you have any idea how I could keep them?
    Thanks!

  • @FrozenTampad
    @FrozenTampad 3 ปีที่แล้ว

    Sorry, what does it means to use DirectRead? I have an exact situation that I'm trying to use GPU as the collision spawned particles. Since I can't use CPU event handler to pass GPU, what is the proper way to do the DirectRead method? Thanks

  • @UnrealSimon
    @UnrealSimon 4 ปีที่แล้ว +1

    nice video, thank you! i'll try it out in my project :)

  • @DoRealAres
    @DoRealAres 2 ปีที่แล้ว

    sooo, why is his fps way down at 45fps while he only has a few particle effects in an empty level?

    • @tharlevfx
      @tharlevfx  2 ปีที่แล้ว

      The video encoder takes up quite a lots of the gpu time

  • @darcksnow59
    @darcksnow59 3 ปีที่แล้ว

    Hi ! How can we have self colliding particles ?
    I need to fill a container with particles but particle don't stack on top of heach other. Is it possible to have a kind of self repelling particles ?

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว +1

      its not simple i'm afraid - if you look at epics content examples they do something there to set up particles with particle collisions but i've never tried it myself

  • @Omberone
    @Omberone 3 ปีที่แล้ว

    Good video! Just a quick caveat, the GPU can definitely process information and send it back to the CPU. Check out compute shaders :)

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว +2

      so i'm not an expert on programming but i think you still have to package up your compute shader to work with the existing hardware - so for example you couldnt use a compute shader to both calculate physics collisions and then also spawn something based on those collisions, in the same frame.

  • @user-ht7ez7yz7m
    @user-ht7ez7yz7m 3 ปีที่แล้ว

    A question ---- how do I create Collison query in ue5

  • @SurviveOnlyStrong
    @SurviveOnlyStrong 2 ปีที่แล้ว

    hello, how to spawn decals at the place where niagara particles collide with the floor?

    • @tharlevfx
      @tharlevfx  2 ปีที่แล้ว

      You shouldn’t really use particles to spawn decals - use a line trace or physics collision instead.

  • @qbix4627
    @qbix4627 3 ปีที่แล้ว

    Is there a way to get some data on surface the particles collided with? I need to spawn particles flat against collided surface and I just can't find a way to do it. Even default collision modules just use location read/write nodes...

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว

      i think if you need surface data information then you need to use line traces in blueprint, rather than particle collisions - i might be wrong though. check out the niagara examples in the content examples project - there's some more advanced techniques there with things spawning and changing colour based on collisions.

    • @qbix4627
      @qbix4627 3 ปีที่แล้ว

      @@tharlevfx I just finished doing exactly that. I'm tossing some particles on the ground, they fire the blueprint event, each of them has line trace based on their position/velocity vectors, then I spawn new system on the hit location with one particle in it. The performance of this setup is just absolutely horrible. I'm hoping that IF it's possible to get surface normal in Niagara, it'd work much better... maybe.
      I didn't find anything I could use in content examples. The color changing thing is pretty much updating color based on "HasColided" bool. I'll keep digging though.

  • @valdemilson
    @valdemilson 2 ปีที่แล้ว

    Thank you so much!!!!!!

  • @yofern
    @yofern ปีที่แล้ว

    is it possible to just spawn once insted of infinite? cause im trying it and its not working. Also great work man!!

    • @tharlevfx
      @tharlevfx  ปีที่แล้ว +1

      If you change the emitter loop to Once and then use a spawn burst instead of spawn rate it should just happen once.

    • @yofern
      @yofern ปีที่แล้ว

      @@tharlevfx yep, It was that. Thanks a lot🙏

  • @anim8ruk
    @anim8ruk 4 ปีที่แล้ว

    Thanks for the video, however, when I do this, I get the burst FX spawning at the initial location AND on collisions. I can't seem to get the burst to only play on the collision even itself. Have you seen this?

    • @anim8ruk
      @anim8ruk 4 ปีที่แล้ว

      ooo....never mind.... I had a spawn rate on the 'burst' too. Setting the spawn rate to 0 and setting Spawn Number in the Event Handler Properties fixed this :)

    • @anim8ruk
      @anim8ruk 4 ปีที่แล้ว

      However....how do you set a particle to 'kill on collision' like you would in Cascade?

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว

      Peter Clark you can set an age multiplier to be really high and kill them off with their lifetime

  • @peterpppppppeter1122
    @peterpppppppeter1122 3 ปีที่แล้ว

    Thanks!

  • @AntonyCatdog
    @AntonyCatdog 4 ปีที่แล้ว

    Hi
    How to spawn emitter on location of particle collision (death)?
    Basic event handler spawns only on burst particles on location, but not an emitter.
    Thanks

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว

      Antony Catdog are you also generating the location data?

    • @AntonyCatdog
      @AntonyCatdog 4 ปีที่แล้ว

      @@tharlevfx Yes, location is okay. But it's only burst. not a emmiter that lives< expample 10 second. It only lives of particle lifetime

    • @AntonyCatdog
      @AntonyCatdog 4 ปีที่แล้ว

      Example: Dummy fall by the gravity, has collided, generate death event and location.
      Fire emitter 10 second and particle lifetime 2 second receive death event and location. But spawn only particle 2 seconds and that's all. No emitter 10 second living

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว +1

      @@AntonyCatdog ah i understand - i'm not sure you can use a collision event to trigger a spawn rate particle from a position natively. you might be able to use a blueprint event to spawn a new emitter at the collision location but i've not tried that with niagara yet. its almost certainly possible using a custom module but i'm afraid i dont have experience with that either.

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว +1

      @@AntonyCatdog this sounds like a problem better solved by using a physics object for the dummy and then spawning an emitter via blueprint on the physics collision, rather than just using niagara. or via a custom module as i mentioned above.

  • @Paul-hw7kc
    @Paul-hw7kc 4 ปีที่แล้ว

    How do you kill particles on collision? I have rain falling inside houses it looks ridiculous.

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว

      if you're using CPU collision then theres an option to advance the aging rate, just set that to a very high number and it will work as a kill on collision.

    • @Paul-hw7kc
      @Paul-hw7kc 4 ปีที่แล้ว

      @@tharlevfx Thanks for the quick response! I took the default third person structure and flipped one of its walls up into a ceiling. So, the particles should be treating the actor as a collision object. I cranked advanced aging up to 100,000,000 and I still have particles passing through my ceiling. It appears there are more falling outside than under the ceiling. It appears some particles are colliding whereas others are oddly passing through.

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว

      Paul717 are you using cpu or gpu particles because they collide differently? Have you tried the analytical planes rather than mesh collision? Sadly particle collisions aren’t perfect so you might just need a different solution.

    • @Paul-hw7kc
      @Paul-hw7kc 4 ปีที่แล้ว

      @@tharlevfx I'm new to Niagara so a lot of this is stuff I'm not familiar with. I have requires persistent IDs enabled. Sim Target is set to CPUsim. Collision is set to CPUsim. CPU collision type is raytraced. Collision is enabled. I'm read the tool tip of CPU collision type and it appears raytraced is what I need cuz I need the rain drops to collide with a variety of objects such as buildings, terrain, water and the third person character. The analytical planes looks like it would be limited in that regards. I've been doing more research, and some of the things that might work is kill planes, onparticlecollide event, and particleshascollided. I just don't have enough experience to know how to implement these, yet.

    • @tharlevfx
      @tharlevfx  4 ปีที่แล้ว

      @@Paul-hw7kc yeah unfortunately particle collisions probably just arent reliable enough for this use case. the easiest thing might be to expose a lifetime parameter to your system and then just manually place your fx so that the rain doesnt go through the building. dealing with Rain fx in games is quite a known complex thing i'm afraid.

  • @YandWandA
    @YandWandA ปีที่แล้ว +1

    If, like me, you came here to learn how to use Collision Events to spawn GPU particles this is NOT a tutorial for you. This tutorial only shows how to use CPU particles in collision context.

    • @tharlevfx
      @tharlevfx  ปีที่แล้ว +1

      It’s not possible to use collision events with gpu particles due to the nature of how the gpu works I’m afraid

    • @YandWandA
      @YandWandA ปีที่แล้ว

      @@tharlevfx Absolutely agreed. Just the title of the video could be a bit better. What I saw in a video titled "GPU Particles and Collision Events" wasn't what I was expecting.

    • @tharlevfx
      @tharlevfx  ปีที่แล้ว +2

      @@YandWandA ah I see - I guess it’s two topics in one video, I can see how that could be misleading

    • @YandWandA
      @YandWandA ปีที่แล้ว +2

      @@tharlevfx That being said, credit where credit's due. Very good video overall! I ended up giving a thumbs down, due to only finding out at the very end of the video that I didn't find the solution I was looking for. In hindsight though, I feel I overreacted, so would rectify it.

  • @idanben-moshe1317
    @idanben-moshe1317 3 ปีที่แล้ว

    Very helpful video!
    Quick question: How can I use the collision event of a CPU particles emitter inside BP to make any sort of action on colliding and not just other emitter responses to the collision?
    I hope it was clear and thanks again

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว

      Idan Ben-moshe I’ve not tried it with niagara but you definitely used to be able to create blueprint events from cascade particles - I made a video about it

  • @idanben-moshe1317
    @idanben-moshe1317 3 ปีที่แล้ว

    Is it possible to make cpu particles collide with different emitter's particles, colliding particles mid air?

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว

      Sadly not, collisions between particles would be too expensive for real-time. You could try making a blueprint that spawns lots of little physics meshes but that might be expensive on the frame rate

    • @idanben-moshe1317
      @idanben-moshe1317 3 ปีที่แล้ว

      @@tharlevfx Gotcha, thank you for the quick reply.
      How about emitting invisible physics meshes with collision enable sprite emitter in the same systems, do you think the two systems in front of each other will simulate collision like effects? Or would only the meshes collide while the sprites go through? Thx

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว

      @@idanben-moshe1317 yeah I don’t think that works either I’m afraid. What type of effect are you trying to replicate?

    • @idanben-moshe1317
      @idanben-moshe1317 3 ปีที่แล้ว

      @@tharlevfx I'm trying to make wo flamethrowers flames colliding, I have a great sprite emitting particle system that collides with the world, good fire spreading effects on collision with meshes or skeletal meah.. . But when fire meets fire I want them to collide in the middle. I hope my imagination came through

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว

      @@idanben-moshe1317 so I would maybe try having an invisible collision mesh the same size and shape and as the flames and then line or sphere trace forwards the same size and shape again - if the trace hits the collision then spawn a new effect for the flame collision, maybe shortening the lifetime of the two flamethrowers appropriately

  • @pencilgun4934
    @pencilgun4934 3 ปีที่แล้ว

    Hi thank you for the great video. What would be the most effective way to kill particles as soon as they collide with meshes in your world? Like rain hitting a roof or ground. The moment they touch they get nuked. TY :-) Also is it possible to create "hold out" volumes, volumes in the middle of your world where you DONT want particles to spawn or enter or pass through.

    • @tharlevfx
      @tharlevfx  3 ปีที่แล้ว +1

      In niagara there’s a kill module and a hascollided property - if you connect them then once they collide the particles will be killed instantly. You could also use this to definite a volume where particles are killed with a little bit of math

    • @pencilgun4934
      @pencilgun4934 3 ปีที่แล้ว

      @@tharlevfx TY very much!