Let's Build the RPG! - 57 - Unreal Engine 5.1 FluidSim Interactive Water Tutorial
Вставка
- Опубліковано 10 чер 2024
- In this episode we set up interactive water that will work on all UE5 water (landscape water) bodies. Although in this episode we're focused on the ocean we set up in episode 55, this functionality will also work on UE5 water lakes and rivers. We first cover all the key settings to get fluid sim up and running, including some of the limitations. Then we go over the different dynamic actors required to interact with the fluid sim. It looks like the skeletal mesh actor interaction is broken on 5.1, dynamic fluid sim component integration and fluid sim impulse integration are both working just fine. Because the skeletal mesh actor interaction is not working with 5.1, in order to get the fluid sim integrated with our player character we set up dynamic mesh actors on our character sockets. Once we have footstep effects up and running, we finish out the episode getting our gameplay abilities integrated with the fluid sim: both flamethrower and fireball.
00:00 Intro
00:14 Today's Goals and Key Concepts
01:41 Prequisite steps for FluidSim
02:17 FluidSim settings, options, and dynamic force component
11:13 Fluid Impulse component
12:08 Fluid Sim working with Footsteps and jump effects
16:30 Setting up ocean to utilize water particle niagara effects and sounds from episodes 20 and 21
19:08 Water material setting for fluid sim foam (not sure this matters)
19:59 Gameplay Ability Flamethrower fluid sim interaction
30:33 Fireball fluid sim interaction
34:52 Function clean up
36:26 Conclusion and preview of next episode
New episode released every Saturday morning!
Previous Episodes Referenced
Footstep Sounds (Episode 19):
• Let's Build the RPG! -...
Water Footstep Sounds (Episode 20):
• Let's Build the RPG! -...
Water Footstep Splash Effects (Episode 21):
• Let's Build the RPG! -...
Gameplay Abilities (episode 26):
• Let's Build the RPG! -...
Flamethrower (episode 27):
• Let's Build the RPG! -...
Fireball (Episode 30):
• Let's Build the RPG! -...
Ocean water body (Episode 55):
• Let's Build the RPG! -...
References specific to this episode:
Ben Cloward's FluidSim episode:
• Interactive Water - Bu... - Ігри
For anyone who is having trouble using more than one fluid sim actor plane, you need to go into the begin play for the sim trigger actor (BP_DynamicForce_component/BP_FluidImpulse_repeating) and change the "Get all actors of class" from using an array index of 0 to just a standard array and then whenever you run the sim check(by default its on tick) you just do a for each loop with the array you made on begin play and plug the loop body and array element into the target for "Apply fluid force impulse", if the stuff isn't working double check the array is using "get all actors of class" in 5.0 epic accidentally made the BP_DynamicForce_component use "Get actor of class". Ideally, you would turn this into a custom actor component and remake it in C++ since a for-each loop in blueprints on tick can bog down performance, and in C++ it's not an issue.
This would fix the fireball thing, I also recommend creating a custom component based on the Impulse repeating example BP for a character or actor. If you have a varying landscape height you can also break the world location of the "sim" variable made on begin play and just use the z value. that will auto-set it to wherever the sim plane is so you are not hard coding world coordinates.
To the creator of the video I want to thank you for making this video, I have not found any other resources that show how to set up water interactions using the epic water system. Epic should update their docs for this or make a tutorial on the learn.unreal page.
Hello!
Can you tell/show me exactly how I could do this?
And after weeks... I find this tutorial that teach me exactly what I need. Thanks man, I'm subscribing to your channel right now!!!
welcome
I don't know why it didn't occur to me at the time, but I think the right way to handle the underwater explosions is using that Fluid Impulse component. So most likely we'll do a future episode on that, unless I hear any better ideas 😄
Also, for anyone that looked up this video up to try and get bullets react to the water. The way I achieved it is by first adding a physics material to my body of water, making sure visibility/camera collision channels are set to block for the waterbody. Then do a line trace for that water physics material, if there is a hit, spawn a BP_Fluid_Impulse_Repeating at impact point. I also made the BP_Fluid_Impulse_Repeating variables exposed on spawn so I can set it within my weapon fire blueprint and make sure to set the lifespan of the BP_Fluid_Impulse_Repeating to around 0.5 seconds (otherwise it will repeat indefinitely )
really good, thanks bro!
As always- Great job! please Make a tutorial about swimming system!
I was able to find a alternative way of getting this to work. While spawning and attaching the BP_DynamicForce to sockets at BeginPlay is a viable option you will often get error messages if there is no water in your scene. Now this is fine if you plan on having water in all your maps but it was not realistic for me especially since you leave the Dynamic force running even if its not even being used (when you are not in the water). Another option is like one commenter mentions, you can add the BP_DynamicForce_Component as a child actor in your characters blueprint but again you run into the issue of having it run at all times during gameplay.
So my solution is to set the child actor as BP_DynamicForce only when my characters capsule component overlaps a body of water and reset it once the capsule stops overlapping the water. The only problem I found with this technique is that the simulation will stop working after entering/exiting the water multiple times. Im only writing this in case someone with a better understanding of unreal engine can find a fix for this or an ideal solution. Will update this if I find the fix myself.
Is there a way to make the ripples look different? other shape for example
Hello, I don't understand it: I see here that the UE5-provided-water is reacting to the character and items. Does the water in UE5 also has buoyancy for items? I tried the "Marvel Master Reactive Dynamic Water V3" in UE2.7. It's very nice, but do I still need it? Does the Unreal Engine 5.1 FluidSim Interactive Water have all functions of the "Marvel Master V3" ?
I have a character, created in iClone 8, in the sequencer, attached the BP_Dynamic_Force_Component to her left foot, in the sequencer, and thought it would work to create an effect on the water as she walks in it. The fluid sim is in the correct place, but still nothing.
Wouldn't happen to have any ideas, would you?
Thanks for your time.
Hello buddy, do you have any tutorial on how to make rivers transitioning into lakes, waterfalls, and the water bumping around props (rocks)??
i have a problem where any water plane i place into the viewport is completely invisible, and idk how to fix it
is there a way to increase the radius of the instanced component?
found it nvm
I've been trying to get the Fluid Sim working on UE 5.0.3 and 5.1.1, but haven't had any success at all. Are there any other settings that I need to be aware of or adjust to get it working?
Make sure your ocean's z level is set to 0. Check your landscape too.
@@NumenBrothers I'm using a Water Body Lake instead of an ocean. The z is set at 0, but it's still not working for me.
UE 5.0 is not working on mine either, It's never worked on version 5.0
I don't have all those extra nodes in my 'Event Graph' when I double click the 'BP_Third Person_Character'. I see the 'Event BeginPlay' node but not a 'Set Post Process Dynamic Material Instance' node like you have. My last node on the 'Event BeginPlay' tree to the right is 'Add Mapping Context'. Is there something I'm doing wrong? Can I still use that node? Optionally could I just parent that dynamic sphere instead to the character's body like you would in Maya? I'm sorry, I'm a newb in Unreal.
will you cover a way to make ocean audio as you approach the ocean spline?
Yes
Hi I'm new to Unreal Engine, after 14:51 it stopped working. There wasn't any ripples coming out of my foot. Do you have any suggestions to make it work?
I forgot to attach the Mesh node to parent on the Attach Actor To Component node. This was causing my Dynamic Force Components to not attach to the sockets, which was causing no ripples.
4:50 When I turn off Show simulation mesh, it doesn't work..what should I do?
Hello! Is there a limitations on how many actors I can have? I have set it up the way you showed in the video on my char, no problem.. But when I tried to set it up the same way with my boat, it dont work.. nothing works besides the character, even when I try to just drop a example sphere in the water 💦.
my pc crashed 3 times while i was doing this
hi sir, im doing exactly the same thing ypu said but its not working in ue 5.4
do you know why?
Good! Do you know how to move the high of the BP_FluidSim? Even if I move the Z-axis higher, the interaction point is still at the same place(on the ground).
lol
How do i make it work with a animated character? I want it to be rendered with sequencer... please anyone help!!
You dont need to run code for socket on begin play you can just drag and drop bp dynamic force on to static mesh component it will become a child of it as a part of the character bp
Can you explain in detail how to do this to a newb? Thanks!
So I think I got it. lol So you Add a mesh to the BP Third Person and then just drag that bp_dynamic_force component on top of it. The only issue I have is it is only working right at the character's hips. How can I make it work at it's feet or even entire body if he/she were swimming? Thanks! Also, whenever I reopen the level I have to add the static mesh and force again. How can I avoid this
How to implement this within Lyra?
Hmm.. I dont seem to be finding the _CORE content like you've got in this video with a lot of functionality already built out for the Third Person Character.
Do you have any advice on how to get FluidSim to work for multiple waterbodies at different z locations? I'm trying do a mountain landscape with multiple pools of water at different elevations. 🤔
I recommend in that case, use Niagara Fluids like I do in Episode 58. From what I can tell it's quite performant, works well for still water.
@@NumenBrothers awesome - thanks so much! 😎
I came across this issue just now (regarding different z heights). Have you found a different solution ? I have already got lots of lakes with water bodies (by unreal) working with post process and buoyancy and don't want to start from scratch) @@NumenBrothers
Wow! Is there any way you can make these RPG functions premade available to noobs (maybe/obviously for a price) or make your bad selves available for consulting (again maybe/obviously for a price)?
I appreciate the sentiment! Apologies, not available for hire. I recommend getting to know people on a Discord- usually the best way to get a sense of who has talent in a certain area. Also from what I've seen there are paid plugins out there that handle water better out of the box, so that's the area I'd recommend exploring.
Hi, i have an issue with my water, when i go underneath, there is the blue water clearance, but when my camera is looking down the ground, the shaders of the water dissapear. What can I do to fix this ?
Are you using the standard UE5 water post process material? I just tested this on 5.1 and it's working okay
@@NumenBrothers it might be an issue with my water system then, because I've added the possibility of swimming.
Uma coisa que você não fala no vídeo que e muito importante, quem esta tendo problema para simular a física da agua na UR5 5.1 e que o nível da agua tem que esta no nível Z 0 só assim funcionou para mim! Não sei porque mais vi no foram da Unreal que so funcionava assim.
como que ve o nivel z?
mon ami tu es superrr!
Cara vou te mandar uma real quando tiver fazendo um tutorial aproxima mais a câmera das Bluprints para vermos o que você esta fazendo.
Hello NumenBrothers, it's not working for me. Is it possible that i can download this Scene from you?
Set your landscape and water height (z level ) to 0. That should fix it.
Great video ! ......1 question,
My Fluid sim is not centered on my player... any idea why ? how to fix?
Make the 'ball' of the fluid sim visible to see where it physically is when the player is moving around. Hope that helps
@@NumenBrothers I meant the square thing when i press follow player :) but i adjusted it in its blueprints, ( if anyone has same issue) I manages to make it all work in the end, Thaaanks soo much. keep up good work.
The step at 4:10 already does not work for me, anyone know why that could be?
Make sure your ocean's z level is set to 0. Check your landscape too.
@@NumenBrothers Oh wow it works thanks!, Did not know that had to be 0
@@TommyS04 if you watch the whole episode ( you don't have to) there's a setting on the dynamic actor that looks at what level the water is, and by default that setting is 0
@@NumenBrothers Weird, mine was -1536, even when I set that number to the z of my landscape/water it did not work. I watched the whole episode and everything works great, thank you for making this video
How is fluid sim working for u in 5.1 impossible, it's broken af , it only works for you if taken original plugin
Seems unperformant to set so many water meshes around the island.. Isnt there any other way to use the mesh wich is already the water?
i cannot for the life of me get the interaction to work hahaha. I drag the ball and theres nothing. Am i missing a checkbox? Thank you
Are you on UE 5.0? because if you are then your having the same problem everyone else is
@@OwnthethronebyRXINC sorry thought i replied to my comment. Yeah it was unreal engine 5.1. I upgraded to 5.2 and it worked. The water also has to be one the z 0
@@baza6127 this comment is too overpowered. thanks stranger. :)
@@baza6127 This is still the working solution as of today!
My boat works in simulation, but as soon I PIE only my character works and not boat.
first i want say thank you so much for your videos you are amazing . can you plz if you can and if you know how to do it make big and beutiful waterfall in unreal engine 5 ? i serach lots of videos on whole youtube but there is no normal tutorial :( :( so sad maybe plz one day you can make it thank you :)
hey Derakon, I recommend checking out the Wild West learning project that just came out for free: www.unrealengine.com/en-US/blog/explore-the-old-west-with-these-free-unreal-engine-assets There's a small waterfall in there that's high quality- should give you some ideas
@@NumenBrothers thank you so much
Do you know already why simulation is turn off after a while?
please tutorial fluidflux