How to Import Phoenix FD water sim into Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to my channel um so today we're gonna have a look on how I did this kind of video [Music] [Music] [Music] okay so some of you asked me uh how I could import the phone uh which come from an alembic file from a water simulation how I could import this into Unreal Engine 5. so now guys I'm going to explain you the process behind um so the first step is start with 3ds Max and Phoenix you have to to find the right model of a boat and you have to run an animation on a specific amount of frame in that case I use 20 120 frames so if you divide um by five uh it's 24 so it's size seven of animation um I'm gonna assume you already know how to run um simulation a water simulation into Phoenix if you have no experience at it I will share with you some tutorials on the YouTube you have some great tutorials and you also have a great course you can buy if you want to to check further I'm quite a beginner at whatever simulation so um I might meet not the best guy to to teach you how to but I will show you the the right things um if you want to copy my settings I explained firstly the the workflow I create a dummy box and that dummy box I animated there over 120 frame and then I attach my boat my water Sim and my particle Shader all to that box so it's following all following in my box and when you press play you run the animation you have to wait a bit and it will run your your simulation um then the more particle you you put into your simulation the more time you will have to wait the more heavy will be your files and also the more precise are going to be your your simulation um I open all my tabs here if you want to copy my settings but again I suggest you to to watch some tutorials that I I will share with you one super important things you have to take a gun when you make a water theme is the scale and the velocity of the boat you have to um to be as precise as possible if you want to have a look at my unit setup my unit it didn't matter and um in my system unit serve one unit it's equal 10 centimeters so um the goal of this tutorial it's it's to teach you how you can import this into unreal and and run it in real time so the first step guys um you can see I have um uh three thing here I have my water simulation which is into this green box and then I have my particle shaders it so all these little dots you know and it represents this form the Splash and the Mist you know um so how you can import this into unreal at the end it's it's pretty much simple you know you need to select your liquid simulation so I take a while in my computer in the export tab here you have to make sure you have set in mesh by default it disables so put it in mesh put it only after to run your simulation you know it's highly recommended to deserve this after exporting okay and you go to Five exports export selected liquid I just did it just for the proposancy relation we're gonna put liquid one you have to save it and here you have to check um the settings I think it's the default one um and you just hit exports you're gonna see it's going to take some minutes it will depend a lot of how many frames you have uh if you have a good computer or not and if you have a high resolution mesh or not I'm gonna pause the animation and see you back when it's done all right guys so he has been taking five minutes to export a little bit less you can see already for 125 frames um my file is eight gigs so be careful if you want to render like 1000 frames maybe you end up with huge files take care of that maybe you you better want to to split your animation into different parts so you don't you have like more manageable files okay especially in Unreal Engine uh if you want to run it with decent frame rates so the next step is to import this liquid into an error so I have a project here I created we're gonna make it again for the proposal of this tutorial a new basic level okay and you just have to import this file into your content folder I'm gonna drag it and here is the settings you want to check you have to ex import as geometry cache very important and other very important thing I think by default is checked you have to uncheck flattened tracks okay this is uh to uncheck otherwise it's not gonna work and the rest I think is by default you can check my settings here I'm going to click import again it's gonna take a while but we're gonna see what's happened at the moment it's look like video threes all right okay guys uh some my Android engine have been um stacking a bit maybe five minutes and after five minutes don't worry it will be appears in your um in your content folder it just take very long time to to compute for the unreal editor so just be passion guy I was checking my task manager and was not responding but after five minutes a liquid just appear so as soon as you have your liquid Sim just drag it here okay and for some reason for some reason I have been uh I have to to invert here I'm gonna put 90 degree I'm gonna set it to zero just to keep it clean and check here also one thing I notice it it I think it's because of the scale I have to set this to 10 to match the scale of unreal and here guys you have your your water with no material up here but it's the water for unreal how you can animate it um it's pretty straightforward you have to add a master sequence let's let's put a new one shot in that case um and five seconds is perfect is what I need I'm gonna create a master sequence I'm gonna drag my sequencer here so you can see it better um and here what you have to do um we're gonna enter the shot okay here I'm I'm from my camera view okay and how you can animate this like I did on unreal so you just you want to drag your liquids in drag it into the sequencer and then you're gonna go to track you're gonna go to Geometry cache components no sorry it's not your Metro cache components delete geometry cache here here we go and this is a geometric cache so now when I press play you can see I have my simulation running so at the moment I have only the water with no no material I don't have the foam I don't have the boat but no you we're gonna look at how you can import the foam and the mist and the splashes so for this it's a little bit more tricky because um I could not find the way look on on the and and then 3ds Max you can see the phone and the splash the Mist are like a point include it's like some particles it's not not a geometry so you cannot import like this the particle into unreal you have first to convert it into mesh so you can see all the mesh you can see all the foam the Mist as mesh and you can run it into unreal so how you can do that I could not find a way to do it straight into 3ds Max so the first step is to export the particular Shadow here if I select you can see I have particle so you you go in your your Explorer or 3ds Max and you can see the foam the liquid the Mist let me see if I can no I cannot select so you have if you want to export the form for example you have to click particle form here on the 3ds Max and then same you go to export export selected and here we're gonna write form [Music] practice particle all right save I'm gonna keep the same settings and no sorry guys I I am missing something I'm not sure if I if it's very important but how I did how I made it work here when you go to exports don't export it as export it as particle okay here you select particle all right and again you click on your particular forms you will notify exports export selected and again particles for right save keeping the same settings exports here you can see it's a little bit a little bit faster it will depend a lot of your animation if you have a lot of foam or not if you have high resolution or not Etc all right it's look like this is done I'm gonna check here and you can see my phone is one gig The Next Step guys is into blender so open blender please download this video if you don't have it I'm not a expert in blender but it's the only way I found to to run my sim into Unreal Engine so just go to file import alarm Big File then you found the particular phone that we just export from 3ds Max and we're gonna import the alambic file so you can see it's super fast and if you if you press play you can see your 5 Second animation at the moment it's a point include it's if there is no geometry it's only um a cloud of points so what we're gonna do here on blender we want to convert this this uh all this this point into geometry so um it's it's super easy to do you have to do three a few steps um the first one uh it's you want to convert this you want to back this animation so I think you have let me remember how you do this um yeah you go to object animation and bake animation you press ok so now it's baked um then you have to add you need to add the modifier geometry node modifier add modifier you find geometry node here all right and you press new you go to Geometry node and here you need to press shift and a to open the geometry node tabs and you will need to convert your points into volume point to volume you you plug it here you can see now it's it's like kind of a volume and then another um another shift a go to volume and volume to match and usually use this here and here now you can see uh it's uh it's a mesh here you can adjust the settings to increase the density so radios let me again I'm not an expert on sorry for blender users but please be kind with me what I'm trying to do is like too much as close as possible radius um what I'm trying to do it's like to be in the let me go back to layouts so this is not the Dizzy results let me see what's going on here resolution size Maybe yeah yeah this is melvato size and voxel size let's try point one well looks like it's heavy foreign radius 0.5 all right this thought to look quite nice density let's try 0.5 nope one yes yes let's see this is acceptable maybe it's a little bit too big to my taste um maybe a radius I can set it to 3.5 yeah I like it yeah look you can start to see the foam patterns from the animation I think it's it's acceptable for this tutorial so you can mess up with the settings maybe if your blender user you know some tricks to improve this also let me know in the comments if so we're gonna go back to the layout tab and check how this work this look pretty slow but we're gonna try with that all right so I'm gonna select this I'm gonna go to file export and find the alambic again I'm gonna go to my tutorial folder and I'm gonna set this to particle form underscore mesh mesh export alembic maybe it's going to take a while look 20 percent 21 I'm gonna pause the tutorial so the video is wrong it's shorter um the export is finished right and I end up with a file of uh 64 gigs so in my test it's a little bit too heavy guys I'm gonna try to mess up with the settings again and find a way to reduce this file I would like to reach the half of of the size so maybe I can increase this by two and I I will maybe have um and maybe I can increase the radius oh no and I think that way I can reduce the the size of my file so let's try again to export export as alembic go to your folder and we say particle from mesh 2. this is a tricky part of the tutorial guys because [Music] um you don't want two big files into unreal then you lose some frame rate so you can see already the exports go a little bit faster I'm gonna stop for now and and come back when it's done look by changing those parameters I have the same amount of frame and I went from 64 to 16 gigs so it's much more acceptable for unreal I think then it's up to you guys it's a trade-off speed against quality for the purpose of this tutorial we're gonna we're gonna use that file because we're gonna wait much less in the process of importing and run this into unreal so um the next step is to come back to Unreal Engine and here you know I have my level and the liquid and in my sequencer I have my liquid animated something happened here I need to go to action Advance fix actor reference yeah okay so in the content browser we're gonna import the particle mesh 2. so I'm going to drag it and here again same settings you can see the track name is practical form that's correct import as geometry cache very important and other very important thing and check flattened track the new import and and of course I forget something look it will fail it was hard to find for me the reason why it's failing and the reason for that it's because you need some mesh some geometry into all your frames so if we go back to blender and we're gonna go to the layout tab and look if we go to the beginning of the animation frame zero you can see I have no geometry and this is the reason why unreal is crashing is failing at the Imports um you'll see let me show you again mesh 2 directly you import and this fail to empower Laura um please okay so uh it's super easy to fix you just go here you can see on the framed 4 I have geometry almost nothing but I have something and it's friend three three I have nothing so I have to crop the three first frame and start the export from the frame four so how you can do this it's super easy you go to export alembic and when you go to alarm you go to your tutorial and we're gonna put mesh three all right and here frame starts we said for an N 120 that's correct okay so exporters are in big and wait again I'm gonna see it in direct because it's not so long so if the tutorial is not so fast but the process neither okay I'm gonna I'm gonna stop to save you some seconds guys sorry so now we have the export finish uh the mesh 2 and the three the match three what we did we cropped the empty files the empty frames and you can see the size uh it's the same it makes sense because what we crop it's like nothing at the end um the the three first empty frames so we're gonna try to import it again into unreal and see what happened now so I'm just gonna drag this into the content folder and again you check all your parameter is good geometry cache and and check flattened track and you click Imports and now maybe your computer gonna freeze for a few minutes but you don't have this error message that's a good sign so I'm gonna stop again the tutorial and come back when the import is finished all right so the import is done um honestly I had to wait a quite long time to to make it happen maybe during 20 25 minutes my my editor was freezing and just loading so don't worry guys um is it not crashing just wait and it will appear in your content browser when it's done that's why I wanted to reduce my 5 from 64 to 16 to not wait for for all my life you know so um back in the editor you will have the particular form uh as in Geometry cache just first drag it into your viewport I'm gonna place it to zero like the other then I'm gonna go to the sequencer I'm gonna choose track actors to sequencer particle from mesh and I have it here then I'm gonna track geometry cache okay it's here the same we're going to scale it by 10. maybe this you can fix it at the import but I'm just doing like this 10. make sure it's set to zero so it will match the rest I'm gonna press then I need to rotate it also this you can maybe check it at the import but uh I just did it like this minus 90. the liquid is 90 some I think the form should be 90 also 90 not minus okay yeah makes sense and here it's pretty much all so if you want to match with the liquid remember that we crop the first three frames so we're gonna place it correctly you can see it's like pretty heavy file so don't accept it to run it at 60 FPS it's more The Proposal of this it's not to make a game but the Cinematic Zone and we go to the frame 4. you can just put four here more easy and you put this you'll just drag it until the fourth frame and that's all guys where is no where is my thing yeah because frame file we have almost no geometry remember so I'm gonna try to press play and you see maybe because of my recording it's even slower let me check what's happened we're going to activate the frame show FPS so you can see here I'm 120 but as soon as I press play my frame gets get mad okay don't accept to to run this again at uh actually at real time here it looks like for some reason the placement is not good but you know like I just put it like where it should be I'm gonna just put it like here yep I'm gonna yeah I think it's something like that then that will make sense is to also import the boat you know so for this you can just use RMB or data Smith I like to use a data Smith because then you can adjust further everything like if you want to change the position of the boat or I prefer to use a data Smith in that case so I'm just with the material editor because this is a Corona render I just apply a standard physical material um I'm sorry and I'm gonna export this as data Smith export check that that's Miss or your yes okay let work then back to Unreal we're gonna import the data Smith so here I'm checking River open let's put it in the tutor YouTube folder yes and here I need to remove This Global exposure yeah the reason I don't need it I had to exponently select it but I forget it but whatever I'm gonna remove all this yes and here I have my boat so maybe you want to put it into a blueprint to make it easier I'm just gonna put State like here just try to match the scale the position looks nice so let's go back to the sequencer here you can import your River you can track the transform you go to frame zero and you try to find the the position so what I see it's like the boat should be more here okay I'm gonna place a keyframe very important convert to linear so the the velocity keep stay linear and then go to the end it's 120 and the the 120 wait here I need to go to 25. and in my master also 25. okay so back in the frame 120 and just drag the boat then let's go in one frame before because sometimes I had troubles yeah um all right and just drag it here nope sorry check this and drag it here and should be around here yeah again here right click on the keyframe linear and that's all guys here I have it looks like my phone is not at the right position so let me see what's happened here what's happened with my phone this will be here you know what you can do if you have troubles I don't I don't understand why it's not moving now but what you can do is just like to use some keyframes also to to adjust it so for example here you want the form here so you also can track the transform Tab and you just had some keyframes so at this point is here at this moment it will be here check here you have auto key server set on okay all right looks nice I did frame put the phone maybe here then you just fine tuning you know your your work and at this Frame put it here and at this Frame put it here okay and that's all you you have your mesh your foam so to get the proper water you know what you can do I really suggest you to go to to download the what online pack it's it's really really nice pack so if you go to a Sim content you can just drag in a really nice ocean uh I'm gonna put it at zero here when you you put it on top you can go to live ocean taking a while you can remove the whatever she wants you know then you just try tuning as in real I think I can stop from now the tutorial because then I could keep a war and hours fighting the results um one really important thing guys uh that I did not show you now but you could take into consideration so first this material you also can apply your water material on top and then try to put at the same level you know and and try to to mix it this is one key also key you can just apply a water material here so in that pack you have a bunch of material so um you you can just apply also a water material here let me check if I have something to show you don't know Maybe maybe that one nope this is not the right one but you have one material in that bag um that that worked pretty well maybe that one again this is not we are out of the tutorial already so I'm gonna stop it um another thing to take into consideration guys uh that I had on my the video sample I show you at the beginning you know when you go to Phoenix you have the form but you also have the Splash and the Mist so you know we just did the process with the foam and the liquid but if you want all the water theme from Phoenix you also need to export the splashes so just it's exactly the same process as the form you know so you will need to take the splashes go to file go to export selected um and uh you but you put particle splashes and Save same settings export and then you repeat the process you know you import it in blender you bake the animation and you you add the geometry node modifier you convert the points to volume you convert the volume to mesh and then you export the mesh as long Big 5 by cropping the first frame and then you can import it to Unreal and when you import it to unreal and then you track it you put it in into your level sequence you track it um you track it into your sequencer you check track geometry cache and that's all you have your your work done so guys I hope I learned you something um I would love if you try to repeat the process that you show me is a result and if you have any question um you can ask me in the comments or send me a message on Instagram or whatever you want all right guys so many things to watch everything and I wish you happy renderings okay ciao
Info
Channel: Victor BLANCHARD
Views: 6,384
Rating: undefined out of 5
Keywords:
Id: Kc6Z7vrKs9k
Channel Id: undefined
Length: 41min 47sec (2507 seconds)
Published: Tue Jan 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.