Player Constrained Particles

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024
  • In this video we have a look at how we can make a simple scratch module to constrain our particles to a player location - great for things like dust in open world games.
    Apologies for missing half my head - green screen issues!
    If you want to learn more about Materials in Unreal Engine check out my new course here:
    tharlevfx.gumr...
    If you have any questions about Game Art VFX or the Unreal Engine then email me: tharlevfx@gmail.com
    Or you can find more tutorials on my website: www.tharlevfx.com
    or check out my work on the Unreal Marketplace:
    www.unrealengi...
    or follow me on Twitter: @tharlevfx
    If you'd like to support the channel then follow me on Patreon: / tharlevfx

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

  • @troyzilla
    @troyzilla ปีที่แล้ว +8

    For UE5 as of May 2023 you'd use a BREAK POSITION instead of BREAK VECTOR and MAKE POSITION instead of MAKE VECTOR since it wants to keep positions separate from vectors now. Also, as someone else noted, with the IF module being deprecated, you'd use SELECT modules with NiagaraFloat values for the Wildcards.

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

      Thanks for the updates!

    • @nickosavicz1453
      @nickosavicz1453 11 หลายเดือนก่อน

      Also think the inputs for the if node are flipped as his top inputs go in the bottom and so forth. Seemed to work for me now on 5.2! Thanks for the heads up!

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

    Make sure Emiter "Local Space" is off
    And the --- Shape "Box Size" is two times the size of --- Keep to Box "BoxSize"

  • @EFX612
    @EFX612 5 หลายเดือนก่อน +2

    great tutorial I've been trying to figure this out, thank you!

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

    you can also "wrap" the 3 axis at once, and without using an "if" :
    Transform your space to be centered (0.5) on the player position, divide it by your radius size, and use a "floor" on this transformed particle position to teleport it (and then do the inverse transformation to get back the true particle position) :)

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

      Personally I used the normalised range node within the scratch as we get that info later anyway, use the normalised vector and get the inverse and multiply by the range, add the owner position and use the "within range" in the IF statement to use current pos or new pos. You're normalising the range +/- between 1-0 right?

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

      i knew there'd be some better options in terms of the math but i just wanted to keep it simple for the scratch module as a proof of concept. Thanks for the alternative methods though - i'll check them out!

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

      @@tharlevfx it's a great intro into the concept! So really great work it was only after watching it I thought about trying other methods or simplification. This is what scratch pads are great for, everyone will be using it slightly differently. Perhaps for rain you'd want to respawn the particle at a higher Z position so it can fall etc. But this is why I am hesitant to release my tutorials as people only seem to want to know the final answer not a basic recipe for ideas

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

      @@floorpeas i know what you mean but i think if you explain things as you do them people will pick up on it. and the people who just want the answers can just follow the steps to get to the end result. it's hard to please all the people all the time :)

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

      @@blastforge The Normalised Range Node also uses an IF and sqrt. You can solve this still by using modulo and it should be way faster. I'm sorry I can send you a link to the function because YT shadowbans me if I do. You need to suptract the owner pos from the paricle pos. then add half the bounds. then do actual modulo function between the calulated value and the bounds for the divisor (not unreal engine internal modulo its wrong). Then you subtract half the bounds again and add the owner pos again.

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

    Awesome! This is just what I needed for my underwater effects. Thank you. Works well in UE5.

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

    I'll keep this video in my "useful things" playlist

  • @programthis3805
    @programthis3805 4 หลายเดือนก่อน

    great tutorial thanks! works

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

    Definitely Interesting and informative ! Big thanks for that!

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

    Thank you :)

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

    Awesome tute as always!

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

    Thanks for your lessons! Tell me, is it possible to animate Kill Particles in Volume when imposing particles on a model? If I set a fixed value in Z, then the part of the model with particles is not displayed, but if I try to animate in Z, then nothing happens. There is no dynamic hiding of particles that are attached to the model (static). I really hope for your help.

  • @psychokilla4905
    @psychokilla4905 6 หลายเดือนก่อน +1

    How can u know all this?
    your head is completley empty, i can see through that huge hole in your head
    Thank you for the teachings though
    hope u find a cover or a hat

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

    Great tutorial! How can one make particles partially disappear when going under overhangs/roof/indoors (preferably on CPU and without doing expensive raytracing) ?

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

    Strangely enough, I am getting an error in the scratchpad (script failed to compile) with UE5.0.2: Vector VM compile failed. Errors: /Engine/Generated/NiagaraEmitterInstance.ush(212): error: syntax error, unexpected '}'

  • @Eraserhead2416
    @Eraserhead2416 10 หลายเดือนก่อน

    Using 5.3.1 I got to the point where you added 'Keep to Box' to the emitter, it's not appearing as an option. I can add 'Shape Location' but that uniformly moves the box of particles. Has that been changed like the vector information?

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

      Keep to Box is the name of the scratch module we make at the start of the video

    • @Eraserhead2416
      @Eraserhead2416 10 หลายเดือนก่อน

      @@tharlevfx Well, I feel both dumb and satisfied, thanks!

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

    Super useful. But somehow, I don`t have the "if" node :)

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

      the if node has been replaced by the select node in latest versions - same functionality but more

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

      @@tharlevfx Thank you! Yep, figured that out and was able to finish the lesson. Thanks again, good job. It`s a pleasure to listen to your videos, everything is short, understandable and efficient.

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

    This maybe a bit late and I hope you are still taking questions, but how do you attach the particle system to a player? Everything you showed is working well, next I need to attach it to my FPC (First person character) so that where ever my player goes it is snowing.

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

      You can just add the particle system to you character blueprint and attach it there.

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

    nice one