Advanced Boat Simulation PART 1 - Building a buoyancy system using Niagara in UE5!

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มิ.ย. 2024
  • Project files are available as a Tier 2 reward on my Patreon: / ghislaingir
    Twitter: / ghislaingir
    Hey! Here's the first video of a three part series where I dive deep into the makings of a neat boat simulation in UE5! Apologies for the lengthy intro as usual :D feel free to use the timestamps below! I hope you'll like the video! Thanks for the support, cheers :)
    0:00 Intro
    0:30 Context
    1:30 Context - Synchronous Readback
    2:08 Context - Asynchronous Readback
    3:06 Context - Alternative Method
    4:10 Disclaimers
    5:30 Demo - Levels
    6:19 Demo - Blueprint Setup
    8:00 Demo - Niagara Readback System
    9:00 Demo - Buoyancy Settings
    11:10 Demo - Summary
    11:50 Demo - Enabling & Disabling Buoyancy
    12:35 Demo - Water Altitude
    13:05 Tutorial - Niagara & Blueprint Setup
    15:15 Tutorial - Readback Test Emitter
    15:48 Tutorial - Niagara Readback Emitter
    18:00 Tutorial - Niagara Wave Sampling
    18:40 Tutorial - Water Altitude
    19:35 Tutorial - Sampling Gerstner Waves
    21:38 Tutorial - Sampling Water Flipbooks
    22:16 Tutorial - Apply Buoyancy Force
    23:34 Tutorial - Apply Drag Forces
    26:10 Breakdown - Buoyancy Component
    27:44 Breakdown - Snap to Water
    28:34 Additional Notes
    29:41 Outro
    Links:
    - FFT Readback Paper: odr.chalmers.se/server/api/co...
    - Deathrey's FFT Ocean: dev.epicgames.com/community/l...
  • เกม

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

  • @deygus
    @deygus 9 หลายเดือนก่อน +4

    Thanks Bro, been working recently on a Boat-based Project and was really scratching my head about some of the mechanics involved in it. You really nail down a good explanation of all the fine tuned details required for such things. 🔥

  • @rabellogp
    @rabellogp ปีที่แล้ว +14

    Brilliant!
    I could watch that boat splashing for hours. So cool!

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

      Ty! It's quite satisfying to drive around ngl :D

  • @Thats_Helpful
    @Thats_Helpful 10 หลายเดือนก่อน +1

    Thank you so much for this!

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

    Nice. You did what I mentioned while back with Niagara water physics.

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

    looks angelic! nice work!
    it doesn't behave like waves.

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

      Water shader/buoyancy feel can be fine tuned to your likings :)

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

    incredible

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

    Waiting part 2:)

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

      Working on it rn! Should be live in two days.

  • @awakenwithoutcoffee
    @awakenwithoutcoffee ปีที่แล้ว +9

    God works in strange ways. I am working on a simple game and it would look so cool with these physics. God bless you,

    • @GameDevAraz
      @GameDevAraz 10 หลายเดือนก่อน +1

      Wish you luck.

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

      How did you go? This guide is advanced. Did you end up buying his patreon?

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

    so cool

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

    clicked for the water, stayed for the content

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

    I wish I could subscribe more than 1 time!

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

    This is great!
    I was hoping to apply this to my existing scene that uses UE5's Water plugin, but all the Gerstner wave calculations seem to be obscured in various HLSL & C++ files.
    Is there a way to recreate/use those functions inside of the Niagara module? Or would it be better to use a different wave approach

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

      Afaik UE's water plugin comes with extra native functions in Niagara to sample Gerstner waves. Try maybe enable the Water extra plugin and see if that enables new functions/interfaces in Niagara.

  • @cammiewolf
    @cammiewolf 4 หลายเดือนก่อน +1

    Amazing and so thorough! I am looking to add this to sequencer for a promo, do you have a suggestion to how I can capture this result with sequencer?

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

      Thanks! Honestly, I'm not sure. I have very little experience with sequencer :(

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

    🤯...I understood maybe about 30% lol...But its sooo cooool!!!!. Thnaks mate.

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

      Means I don't do my job well enough :D

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

      @@ghislaingirardot no lol 😂 😂 I just don't know enough yet 😜

  • @jwallace2913
    @jwallace2913 9 หลายเดือนก่อน

    Really great video! I am curious, would it be less expensive to get a single location from the prop to trigger the damping/non damping. Not as accurate but I bet it would be very close.

    • @ghislaingirardot
      @ghislaingirardot  9 หลายเดือนก่อน +2

      Thanks! Yes, it's an alternative. I used to do it that way but wasn't too stoked on the result and pretty much no difference in performance

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

    Great video and super cool system!
    Any suggestions on how this would work with Vertex Animation Textures (VAT) which samples a texture sheet for height info? It seems like it would work but I'm not sure how I would replicate that in a niagara system

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

      Thanks. Hmm depends on how the VAT texture is sampled and how easy it'd be to recreate the same setup in Niagara. If it's based on a mesh UVs, it'd be tricky I think. Maybe doable using a static mesh sample module in Niagara to get that mesh's UVs? I'm not sure. If it's based on world position, then like I explained in the video, it's just a matter of replicating the same node setup and using particles world positions to sample the VAT texture.

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

      @@ghislaingirardot Thanks I appreciate the response!

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

    Great tutorial! Although I'm way out of my depth, I maintained enough neural buoyancy to get it all working up to 18:00 in UE 5.4.1. And now for the waves. And my question: would this work with Niagara Wave Pool system? Or even Houdini wave/particle sim brought into UE with the HoudiniNiagara plugin? TY again for the tut, I'll see if I can recreate that super simple water Material shader next.

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

      Ty! Like explained in the video, this system can, in theory, work with *any* system, as long as you can provide Niagara a way to sample the wave data like it's done in the material or whatever render pass. I'm not familiar with the Niagara wave pool system so I can't provide much more information. Buoyancy using Wave/Particle simulation is another topic but again, it's technically doable. Just have to provide Niagara the means to sample the wave height so that it can be sent to BPs

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

    Thanks for the tutorial, it looks amazing, almost similar to Sea of thieves!!!
    I really respect your video and content, I have nothing against you in this comment and I think it's amazing. Probably just really few people know this and you got huge respect for just sharing this complicated tutorial, but my hate is towards Epic:
    - If I knew to how to make BP and implement chunks of c++ codes into BP system of UE5, i`d be most certainly working for a company that pays a lot for that kind of knowledge, such as coding drivers for devices in c++. Until they consider implementing scripting language based on c#, Unity is perfectly great alternative for making games.

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

      There's Verse soon. Also, it just sounds like you're not willing to get out of your comfort zone. C++ isn't that bad, neither is BP. Get out there and learn and you'll get there in no time. C# in UE is never going to happen, best deal with it now and accept it if you want to work with UE. Else stick with Unity :shrug: Unity is cool

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

    Incredible work, Ghislain! This is just what I needed. I’ve got one question: I created a water shader using a combination of sine and noise nodes in the material. If I understood correctly, you have to recreate the wave algorithm in Niagara. This makes sense with math-based nodes like sine, but what about the noise node? Is there an equivalent node in Niagara to the material’s noise node? Or what about if you’re using a height texture in the water material, can you use the same height texture when recreating the waves in Niagara?

    • @ghislaingirardot
      @ghislaingirardot  7 หลายเดือนก่อน +1

      Hi! Thanks. Correct, you need to recreate the same algorithm in Niagara. Unfortunately this is a bit tricky with a noise node. It's not a dealbreaker on itself, because noise is either maths-based on texture-based, but it's pretty much impossible to reproduce, unless you look at UE's source code to see how this noise node does its magic. For a texture, the simplest method is to use world projection in your shader & then you can use you the particle's world position to sample the texture in a similar way, and that's pretty much it. I hope that answers your questions

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

      @@ghislaingirardot ah, that’s what I was afraid of with the noise node. Looks like I’ll have to find another way. Just to clarify, when you say sampling the noise texture at a world position, do you mean sampling the color value of the texture from the Niagara module? If so, how do you do that? Or maybe I misunderstood. Thanks again for your help!

    • @ghislaingirardot
      @ghislaingirardot  7 หลายเดือนก่อน +1

      @@funagengames1177 Yes you can sample your texture in Niagara just like you do in your water shader. But you must be able to reconstruct sampling UVs, thus why using the water mesh's UVs is not recommended. Prefer using AbsoluteWorldPosition X&Y, that way you can use the particle's X&Y world position to reconstruct the same sampling coordinates (I think that bit is explained in the video actually)

    • @funagengames1177
      @funagengames1177 7 หลายเดือนก่อน +1

      @@ghislaingirardot perfect! You're a huge help and I'm continually impressed by your ability to create awesome systems in Unreal. Thanks again.

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

    Great System! Does this work in Multiplayer when several clients are walking on a floating or sailing boat?

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

      I doubt it works in MP, but you could try I guess. I don t usually worry about replication at all unfortunately

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

    Thank you very much for the video!
    I wonder if it is possible to make grass with the help of Niagara by shifting the height with a shader. This would be great for endless landscapes?

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

      Sort of. I've already made a video of a Niagara-driven dynamic grass prototype. But there are many limitations with grass/foliage instanced with Niagara (lack of painting tools and such. Lots of custom tech to be built to go around these limitations)

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

      what exactly do you mean hmm, what could Niagara give you for grass that static mesh doesn't give you ?

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

      @@awakenwithoutcoffee Niagara can instanciate static meshes sure, but you lack tools to dictate where to instanciate those meshes and it's usually amongst the biggest hurdle with GPU foliage instancing. There's no foliage tool, no landscape grass tool like you have in UE with traditional CPU instancing. You have to build things yourself in Niagara and it's really not straightforward to build, nor are such tools usually straightforward to use for artists

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

      @@ghislaingirardot I do get that but what benefit do you (potentially) get from spawning grass with Niagara ? is there some kind of player interaction particle effect needed ?

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

      @@awakenwithoutcoffee Allows for cheap GPU-driven interaction physics/effects: th-cam.com/video/XK_vpgC-1Ps/w-d-xo.html

  • @11Schollen
    @11Schollen 5 หลายเดือนก่อน +1

    hello. at 7:37 you add the "Buoyancy System Interface" to the blueprint. when I try to do this there is no Interface with that name. Do I have to create this myself? Or do you know a reason it might not show up in the dropdown? cheers!

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

      Hello! It's an interface that comes with my system. You either have to create one on your own, following the principles explained in this video, or join my Patreon to get the files

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

      ok thank you!@@ghislaingirardot

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

    Instead of using simple collision, could you also use complex collision or would that be a problem with the simulate physics?

    • @ghislaingirardot
      @ghislaingirardot  11 หลายเดือนก่อน +1

      I'm almost certain 'Simulate physics' requires simple collision afaik but I could be wrong

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

    Nice video ! Is it usable in multiplayer ?

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

      No idea! Try it? I know replicated physics is currently receiving updates in UE5 so.. I suppose?

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

      @@ghislaingirardot allright thanks 😊

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

      It'll be jittery in current UE versions because there wont be any client side prediction and the movement will just get snapped to the new location every so often. You can use something like "smooth sync" but if you want proper client side prediction/reconciliation you have to make a physics function inside a custom CharacterMovementComponent and the same function will run on client and server so it will likely have to be CPU only calculations and I'm not sure you can use niagara like that unless your server has a GPU ($$$).

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

    very important question if u don't mind, does this work with forward shader or only deferred?

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

      This buoyancy system is independent of the renderer. Doesn't matter if you use forward or deferred (unless Niagara has limitations with forward I'm unaware of, but I don't think so)

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

      @@ghislaingirardot this is extremely good news....is this project file available on patreon?

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

      @@Phoenix_VR 29:48

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

    I managed to build water from the 3:10 tuturial, how would it be possible for me to build a buoyance for this water? Do you think it is possible to adapt this water to this buoyance system?

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

      Yes technically doable but not something I've tried and it's likely complicated. That FFT simulation is all done on the GPU so the wave height and all is there in Niagara, just have to send it back to blueprints using the same async readback technique I described in this video. The difficult part is to convert a pontoon's location from world to FFT simulation space so you know what FFT point to sample and the correct wave height to send back. You'll have to figure it out for yourself tho I'm afraid.

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

      @@ghislaingirardot I'm not having success

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

      @@ghislaingirardot I'm not familiar with the codes used in Niagara, I don't know how to get the wave height

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

      I believe that if I redo this water niagara on cpu it could generate collision

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

    si je vais suivre toutes les étapes que tu as fais dans le video, je vais pouvoir atteindre le niveau de qualité que tu as montré au tout debut de video sans être inscrit au patreon?

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

      J'explique les principes, ça sera à toi de mettre un bon coup de polish pour arriver au même résultat mais en théorie oui. A noter que je parle que du système de buoyancy. Je viens de sortir la partie 2 ou j'explique mon système de foam. Bon courage à toi.

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

      @@ghislaingirardot genre si je vais appliquer tout ça dans Fluid Flux par exemple, ça va marcher ? parce qu'il n'y a pas de foam dedans

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

      @@nij4785 Aucune idée, à toi d'essayer :shrug:

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

    hey would this work on multiplayer?

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

    Is it eats too much fps to run? How it run with a few boats in a scene?

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

      I've not performed extensive testing but the GPU part should remain efficient and scalable. Just the blueprint part that is the bottleneck but should be pretty straightforward to convert to C++

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

    Is it possible to replicated the boat movement using this method?

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

      Hey. I believe so? There's on going work for much more improved replicated physics in UE5 5.3 and onward I believe. But it's really not my area of expertise so who knows.

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

      @@ghislaingirardot I know games like Blackwake have figured out replicated boat physics somehow so I assume there is some sort of server-side solution to this stuff

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

    hello ! grate video, what make a material for water ? i see the video, and i din't see the tutorial for create the material

    • @ghislaingirardot
      @ghislaingirardot  10 หลายเดือนก่อน +1

      Hi, thanks! Part 4 briefly covers the water material, and I've explained how to make water shaders in a few of my other videos as well

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

      @@ghislaingirardotokay thank's, but the video FFT ocean flipbook is a tuto for create water ?

  • @0AThijs
    @0AThijs ปีที่แล้ว

    Nice timing 💀

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

    Damn, thought this was an actual tutorial lol

  • @user-br5sy9dr7u
    @user-br5sy9dr7u 7 หลายเดือนก่อน

    Super video !! ou est-ce que l'on peut trouver ce petit bateau stp ??

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

      Merci! Euh c'est un que j'ai modélisé pour les besoins du projet. Il est fourni avec les fichiers UE, dispo sur mon Patreon en tier 3

  • @nBodyResearch
    @nBodyResearch 8 หลายเดือนก่อน +1

    In Niagra the break vector 2d node doesnt show?

    • @berendstudio4660
      @berendstudio4660 8 หลายเดือนก่อน

      Me too. Did you find the solution for that?

    • @ghislaingirardot
      @ghislaingirardot  7 หลายเดือนก่อน +1

      Most nodes output are 'Niagara Numeric'. Make sure to right click on it and convert it to vector 2D to have the menu show contextualized vector 2D functions/nodes.

  • @myasga
    @myasga 9 หลายเดือนก่อน

    Hello , i need spherical water body for my planetary project- this is possible to set with your system?

    • @ghislaingirardot
      @ghislaingirardot  9 หลายเดือนก่อน

      Hi. Technically I think it is. You'd have to replace the buoyancy upward force with a force which direction is based on the direction from your planet's origin and the pontoon's position. Something you'll have to figure out for yourself though :)

    • @myasga
      @myasga 8 หลายเดือนก่อน

      @@ghislaingirardot Thanks, Okay - it uses standard water system ? If yes spherical water is out of my range then seems to not support , tried with custom body mesh and failed

    • @ghislaingirardot
      @ghislaingirardot  8 หลายเดือนก่อน

      @@myasga I'm not sure if you have actually watched the video, but this is a custom system and will require tweaks to support spherical water body but it's is technically doable.

  • @UsernameNULL755
    @UsernameNULL755 11 หลายเดือนก่อน +1

    The tutorial is great, very impressive stuff. But your accent and pronounciation are sometimes very hard to understand, which makes the video significantly harder to follow. Please consider it as a constructive feedback, I'm not trying to be mean or anything. My suggestion is to at least try to fake a british/amercian pronounciation.

    • @ghislaingirardot
      @ghislaingirardot  11 หลายเดือนก่อน +5

      🤣

    • @sethleland
      @sethleland 8 หลายเดือนก่อน +1

      Jesus.

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

      Have you heard of subtitles? Also, the accent isn't bad at all and I could follow it clearly