MSFS Tutorial - Animated open Hangar - Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my dear friend welcome back to another tutorial and uh today i'm gonna show you how to make this uh wonderful the automated door hanger this is gonna be a sim object creating blender i have set it to open at eight o'clock in the morning and this is gonna close when it reached about six pm in the evening see how we can do this let's fire up a blender okay so now we are in in blender and what we're gonna do is create the hanger we want as you can see this is a normal angle made out of a single cube and there is nothing inside as you can see and the first thing that we should do to open the door anger is to separate the doors so this model has already the four doors the four faces for the doors but is if you try to move them they are they move all the geometry they are not separated from the other stuff so what we're gonna do is separate each door and to separate them i want to select the faces that each dollar is composed of and i'm gonna press the letter p to separate the selection so we have we have the anger and the door so let's do this for the other one and for this one i'm gonna create some more thickness for this so i'm gonna use a loopcast modifier and press p and separate the selection so we have now in object mode the angle let's call this main angle which is the angle number three and we have uh well i'm gonna call that internal right this will be door internal left oh well this is internal and this is exterior you know door external is the left one and this is the door external one is the right one okay so we don't need the anger at this time uh we're gonna work to the door and as you can see the door have no thickness in there or we can delete this part here and there is the faces of this and also for this one i'm gonna delete the faces so now we can add the modifier a certified modifier with the thickness of maybe 15 centimeters i think 50 centimeters is right and also for the other doors uh what is that certified modifier and 15 centimeters and also 15 centimeters so if we unhide the anger now we can see that we have our door with their thickness new thickness applied oh i have to modify this so the door can't slide in i'm gonna extrude this a little bit yeah and now we are okay so i can freely move the doors as you can see they are separated from the anger i'm gonna give the also the anger some thickness because uh when we open the door yeah imagine this this anger as the door open uh in the simulator we see nothing we can see transparent because the the normals of the cube are pointing in the outside direction you can see if we go there into edit mode look at the normals the normal are pointing outside so we can only see the direction where the normal are pointing at so we need to solidify also this mesh here and add a certified modifier i think that a thickness of 0.2 is okay maybe a little bit more okay 0.4 is okay and we can also apply this modifier because all the inside as to have the the same material of this uh discolorated gray material uh but we can do that later and now let's unhide the door and let's do the animation for the door so i'm gonna have this front view and i'm gonna open the animation tab in the front view so make sure you are in the top sheet editor and the action editor and i'm gonna select this internal door and i'm gonna animate it i have to select the object i'm gonna press e to insert a keyframe and will be a location keyframe and i'm going to go to frame i will say 80 grab this and move into the x direction so g x all the way up so we can open the anger and in this position i'm gonna of also insert a keyframe for location and as you can see if we play the animation now the door is opening and i like this uh default behavior where the door starts slowly and um go a little bit more fast and then stops slowly uh so we're gonna give this animation a name this action a name uh will be door into the left and i'm gonna push down the animation down to the anal hey there the target but if we go to the non-linear animation now we can see that we have the door internal left ear and i'm gonna put the internal left the strips so let's animate the other doors and the e i'm on frame zero and i press e to insert the location keyframe go to frame maybe uh 100 it has to travel a lot more okay let's move it right there and i'm going to insert a location keyframe here so we can see the two doors opening and this will be the external left and push down to the nla editor let's rename it go back to the dope sheet now the same thing for the other door so press [Music] go back in the dope sheet e to insert the frame location and now go to frame 80 let's move this in the x direction all the way out here and insert another location keyframe so we have our animation done okay perfect so the animation for all the doors is done now let's change the material of the stuff here okay now get that we have our anger animator in the blender export this in flex simulator so i'm gonna select all file export extended gtls tutorial and we can now continue in windows explorer because this is gonna be um sim object because the doors are controlled by a sim parameter um in the case i show you the same parameter is the the time of the day uh but you can control it in another way you can control it by pushing us some buttons in the airplanes like the yoke visibility or the the landing lights which all those parameters and let's go back in with this explorer and let's see how we can construct this particular sim object this object will be a sim object so we need to move it in another folder not in the modal lib folder so we can cut it and this we go to the package sources sim objects landmarks and we're gonna now that we have a folder for our new sim object in the structure of this folder is gonna be like this there should be a model and a texture folder so all the file related to the model is gonna be gonna go in the model folder uh maybe we need to export this again to create a texture and also before compiling keep in mind that you need to add in your c modules landmarks your folder your objects folder a file called scene.cfg and in the title you need to have the name of your same object and in the model you have you need to have a model.cfg with the xml file related to your c object you can find those files also in the sdk samples uh when sock samples package searches sim objects landmarks and of course you have the theme.gfg and the model.cfg and before compiling you need of course to have a line in your package definition calling your sim objects otherwise the object won't be compiled okay so i have opened it in visual studio code or you can use whatever editor you want the xml for our sim objects the xml as the model info section with the new uid for our model lod is a section where all lods of our object are defining you can see this also in scenery objects then you have a lot of animations lines each animation lines as a ued as a length and the length is the length of the animation that we have in blender so for this door external left if you go to the animation tab door external left is this one and goes up to 100 frames so it's one of the frame the name of the animation door external okay right of course one for the right and one for the left the type of animation in this case is same because we are evaluating the animation on a simulator parameter uh the autoplay parameter because this animation will auto start and we have um another type parameter that is related to the part info section and is called with the same name parting for external right then the node in our blender file for convenience i call the animation strip and the animation action in the nla and the animation note in the same way so to avoid the errors so we have an animation line for each door door left or right internal and external then we have a section where we blend together all the animation then we have the the list of animation that are blended together to obtain the the total animation and each animation as the qed which is the same defined in the above animation section and i don't want in this case my animation to loop so it's uh it's not to repeat it over time and i can also define a speed for my animation so one is 100 speed and uh two is 200 speed and 0.5 is the 50 speed so at speed of the animation now for each door we have a part info section each partition has a name and the name is the name of the node defined here so this is the name in italian and well defined as door okay so i have translated all of those stuff and then we have and the name of our node uh the length of our animation so for the external right door the external okay so the external right door is external because it's the more external is 100 frame and the internal ones as 80 frames as you can see so 100 frame for the standard right door and then we have the the behavior of our animation this animation is calculated with this code and let's um let's write it in in another way so you can better understand what this course is if you haven't already i have made another video on sim objects where you can find another explanation of this code but i'm gonna explain that to you right now so we evaluate the local time in seconds if it is greater and gt means greater than uh 28 800 seconds the seconds from midnight so it's 8 a.m divided by 60 480 minutes from midnight or 8 hours from midnight so if this value is greater than 28 then we have an end here and operator is always put after the operands in discord that is rpn code so and is less than 64 and sixty 864 x hundred is the same sixty four thousand eight hundred divided by six divided by sixty and this is six pm in the afternoon or i put it another evaluation the value of this particular variable that is called yolk hidden one so the left yoke is even then i will play my animation to frame 100 so to its full length otherwise i will play my animation to frame zero if those two condition so if i'm between 80 am to 6 pm or i eat in the yolk then pay animation to 100 else play animation to zero it's pretty it's not difficult but you have to you need to have some little bit of experience in programming to do this to understand this otherwise you copy and paste and you will be good so this line of code and then we have um a lag and this lag is not easy to explain it's not easy to understand that the documentation is really it's really not clear to me but the the smallest the number uh and the slowest the animation so with like 10 and all those parameters i've put here so speed 1 and animation length 100 that is 100 of the animation the animation will be slower than the default a a value like 50 and the animation will be the same as in blenders as you pay eating blender more or less more or less and a value like uh 100 makes your animator really fast uh i would say three or four times than the speed that is in blender so it's so the same goes for all the other doors except that for the interior doors my animation length is 80 so i go to frame 80 and then i close my model info that i have opened right at the beginning of my xml file so we can now go to the simulator well we needed to of course compile the sim object and copy the the content to the community folder and we can now try our object in simulator okay so i have loaded flight in flight simulator it's 3 minutes past 16 and 4 p.m in the afternoon this is local time so the anger is open because we are between 8 a.m and 6 p.m so the anger is open go ahead with the time 6 pm in the afternoon and the anger is closed and if we come later to the airport the anger is closed but you know that if we unhide the yoke now you can see the anger opening for us and we add the yolk again the anger will close okay i hope that you like this video and in the next one we're gonna do some work inside the anger uh because uh why you know when you open a when you open anger uh cool stuff can happen so let's make it day and if i make a day the anger will open it's okay okay so you know if you make it rain it's gonna rain inside the anger because the seam doesn't know that this is a solid surface okay uh so in the next video we're gonna cover this um the stuff and we're gonna make the anger without the rain without the snow mix and work inside the anger and add some lights because inside the anger there are no whites at the moment hope you enjoyed this video and see you next time bye bye that's very funny this opening yeah isn't it
Info
Channel: Federico Pinotti
Views: 7,586
Rating: undefined out of 5
Keywords:
Id: En4vlcqIr7M
Channel Id: undefined
Length: 21min 34sec (1294 seconds)
Published: Sat Apr 02 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.