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

Ойындар

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.s...
- Deathrey's FFT Ocean: dev.epicgames....

Пікірлер: 99

  • @rabellogp
    @rabellogp Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @deygus
    @deygus11 ай бұрын

    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. 🔥

  • @ghislaingirardot

    @ghislaingirardot

    11 ай бұрын

    Thanks!

  • @awakenwithoutcoffee
    @awakenwithoutcoffee Жыл бұрын

    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

    11 ай бұрын

    Wish you luck.

  • @brickrar

    @brickrar

    9 ай бұрын

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

  • @naufaldihilmi8507
    @naufaldihilmi8507Ай бұрын

    Hi can you make a small boat version of it, the one where you needs character to paddle. I'm looking at your collection for tier 2 sub, def loving it

  • @erifuUu
    @erifuUu Жыл бұрын

    clicked for the water, stayed for the content

  • @SHA3DOW_
    @SHA3DOW_ Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @SHA3DOW_

    @SHA3DOW_

    Жыл бұрын

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

  • @nickgennady
    @nickgennady Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

    It sounded too promising not to try =)

  • @Thats_Helpful
    @Thats_Helpful Жыл бұрын

    Thank you so much for this!

  • @Nick_fb
    @Nick_fb Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @medmel2160
    @medmel2160 Жыл бұрын

    I wish I could subscribe more than 1 time!

  • @Darloud
    @Darloud Жыл бұрын

    Waiting part 2:)

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @norvsta
    @norvsta2 ай бұрын

    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

    2 ай бұрын

    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

  • @cammiewolf
    @cammiewolf6 ай бұрын

    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

    6 ай бұрын

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

  • @11Schollen
    @11Schollen7 ай бұрын

    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

    7 ай бұрын

    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

    7 ай бұрын

    ok thank you!@@ghislaingirardot

  • @YEAHSURETHINGMAN
    @YEAHSURETHINGMAN4 ай бұрын

    Damn, thought this was an actual tutorial lol

  • @jimmycheng7997
    @jimmycheng7997Ай бұрын

    Hi, I was wondering how did you change the water system at 9:08? The built-In Buoyancy component does not have access to setting. Thank you!

  • @ghislaingirardot

    @ghislaingirardot

    27 күн бұрын

    This is a custom system I'm describing. The built-in water/buoyancy system is something else entirely.

  • @geanmarcosloffi
    @geanmarcosloffi9 ай бұрын

    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

    9 ай бұрын

    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

    9 ай бұрын

    @@ghislaingirardot I'm not having success

  • @geanmarcosloffi

    @geanmarcosloffi

    9 ай бұрын

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

  • @geanmarcosloffi

    @geanmarcosloffi

    8 ай бұрын

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

  • @Phoenix_VR
    @Phoenix_VR Жыл бұрын

    incredible

  • @void9853
    @void9853 Жыл бұрын

    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

    Жыл бұрын

    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: kzread.info/dash/bejne/in-T2NKgc5CXgNY.html

  • @nBodyResearch
    @nBodyResearch10 ай бұрын

    In Niagra the break vector 2d node doesnt show?

  • @berendstudio4660

    @berendstudio4660

    9 ай бұрын

    Me too. Did you find the solution for that?

  • @ghislaingirardot

    @ghislaingirardot

    9 ай бұрын

    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.

  • @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

    Жыл бұрын

    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

  • @charlieatron
    @charlieatron Жыл бұрын

    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.

  • @vembdev
    @vembdev Жыл бұрын

    so cool

  • @funagengames1177
    @funagengames11778 ай бұрын

    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

    8 ай бұрын

    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

    8 ай бұрын

    @@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

    8 ай бұрын

    @@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

    8 ай бұрын

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

  • @jwallace2913
    @jwallace291311 ай бұрын

    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

    11 ай бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    @@ghislaingirardot Thanks I appreciate the response!

  • @leonardm6736
    @leonardm6736 Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @zytron615
    @zytron615 Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

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

  • @CanalHardcorePlay
    @CanalHardcorePlay5 ай бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    5 ай бұрын

    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++

  • @zogi1798
    @zogi1798 Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

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

  • @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

  • @user-br5sy9dr7u
    @user-br5sy9dr7u9 ай бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    9 ай бұрын

    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

  • @myasga
    @myasga10 ай бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    10 ай бұрын

    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

    10 ай бұрын

    @@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

    10 ай бұрын

    @@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.

  • @zeon3d755
    @zeon3d75528 күн бұрын

    where can we download he project

  • @ghislaingirardot

    @ghislaingirardot

    27 күн бұрын

    please read the video description.

  • @Phoenix_VR
    @Phoenix_VR Жыл бұрын

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

  • @ghislaingirardot

    @ghislaingirardot

    Жыл бұрын

    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

  • @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:

  • @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

    Жыл бұрын

    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 ($$$).

  • @thenodebook1981
    @thenodebook1981 Жыл бұрын

    hey would this work on multiplayer?

  • @0AThijs
    @0AThijs Жыл бұрын

    Nice timing 💀

  • @UsernameNULL755
    @UsernameNULL755 Жыл бұрын

    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

    Жыл бұрын

    🤣

  • @sethleland

    @sethleland

    10 ай бұрын

    Jesus.

  • @kiriljakimov4016

    @kiriljakimov4016

    5 ай бұрын

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

Келесі