Basic Mechanical Animation - Blender to Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign today I'm going to show you how to do some basic mechanical animations uh on a very simple model within blender uh we're going to create the mesh we're going to create the animation and then we're going to export it into unreal so let's just get started I think a picture's worth a thousand words so we're just going to get right into it the first thing we're going to do is delete the default Cube so hit X to delete then what we're going to do is change the unit scale of our unreal sorry of our blender project the unit scale we're going to change this uh from metric one unit scale to .01 and the reason we're going to use .01 is that unreal uses centimeters as its core metric so if you do not do this step and leave the unit scale at one all of the animations that you import into unreal will look extremely small uh exactly 100 times smaller than they should be so we're going to create a cylinder in the example I'm going to use today we're going to create like a missile silo with a uh the top is going to open up so the missile can come out so we're going to create a cylinder I'm going to hit the numpad uh number one and period to do the front view and uh Center it the next thing I'm going to do is move this up so I'm going to hit G for move I'm going to move it on the z-axis and I'm going to move it up by one meter okay so we can see it's two by two meter the scale is one okay I'm gonna go into modeling for the item I'm gonna frame it then what we're going to do is remove the top face here I'm just going to select that hit X and delete face okay the next thing I'm going to do is we're going to create the top portion so I'm going to do add icosphere and open up the panel down here I'm going to move it up so we can see it a little better and I'm going to increase the number of subdivisions so instead of two I think we're gonna go to three is actually pretty good but I think we'll just do four works just fine now this doesn't really look much like a missile silo because we have um an entire sphere there so what I need to do is cut that in half so to do that I'm going to turn on x-ray okay and we are simply going to pick the middle portion and then select everything below there okay so that looks like it's halfway I'm going to hit X to delete we're going to delete all those faces the next thing I'm going to do is I'm going to select a couple of these and then do select linked okay I'm going to scale this out a little bit and then we're just going to move these down okay so with them down like that they're kind of sitting right on top so if you can picture that this is the Dome of our missile silo and inside is our missile right so that is yeah so this is the X-ray view now what we need to do is give our walls some thickness so to do that pretty simple I'm gonna go to our mesh I'm gonna go to modifiers now I'm going to add two modifiers the first is solidify and we're gonna bump up its thickness 2.1 meters the next one is um I do want to smooth shade this um so I can do object smooth shade it kind of looks a little weird and so one way to clean this up very quickly is just do an edge split modifier and now it is smooth shaded but we still retain our edges pretty well and in order to animate this we need to give it a skeleton or an Armature or a rig depending on how you want to say it so the first thing we're going to do is add in a bone uh Armature now when you add the Armature you can't see it um so if you go to the uh attributes of the Armature go to viewport display you do in front but you still don't see your bone and the reason is is look how small it is it's .01 meters right so it's small compared to our mesh so what we're going to do is scale our bone or our Armature I'm going to do scale 100 hit enter and so now we can see our Armature okay in order to open up our missile silo I think the easiest way to do it is going to be to place our bone along one side and then we're going to create a second bone which lifts the lid up and I will show you what I mean by that so our current bone is at um zero zero so it's kind of sitting right in the center of our missile silo what I want to do is move it to one side so I want to move it I believe on the X right so now that we have our bone there now remember when you when you go into unreal like you don't see the bones or anything so what I'm going to do with our bone selected I'm going to go into modeling you see it's kind of sitting over to the side and I'm going to lift this up and make this bone a little taller right up to about here and I think I'm actually gonna move the whole bone in it's kind of right in the middle then what I'm going to do is we are going to extrude another bone so I'm going to select up here at the top of this bone we're gonna now extrude another bone uh e E for extrude so now that our bone uh has another bone what we can do is we can attach the mesh to be influenced by bone one so our root bone is not going to move or rotate or do anything but in order to open this up we're just going to grab this bone and rotate it up and if we make all of the Dome here follow that bone then it will open up along with it we're going to go back to layout we're going to select our mesh um one other thing I'm going to do is if you look at our Armature here its scale is 100 so I'm just going to apply the scale and the location select the mesh I'm going to go back into modeling oh before we can apply the mesh um you need to parent the mesh to the Armature and when you do that I'll show you um the mesh will get some vertex groups automatically generated for it and that is what we want so I'm gonna get rid of the camera up here we don't need that so now I'm going to grab the Armature select that first I'm gonna click that I'm going to drag down and grab the cylinder or you can shift select now we're going to parent and I'm going to do Armature deform with empty groups okay now that I've done that you see it created two vertex groups bone and Bone one I'm gonna go into modeling we still have our entire uh Dome selected and so I'm going to go to the vertex groups and I'm going to assign a weight of one which is our weight right here to that vertex group so then if we go back to layout mode I'll show you if we go to Weight painting weight paint you can see that with bone 1 selected it is this these upper um these the Dome of our missile silo is 100 influenced by this bone so wherever this bone moves to this is going to follow okay all we need to do now is animate yep so we're gonna go to animation we're going to go in here I'm going to reset our uh frame so I'm going to hit one and I'm going to come back here I'm going to select pose mode and at frame zero I want to select both of these um I'm going to select everything and then we're gonna insert location and rotation keyframes at frame zero for both of those bones okay then at bone not bone at frame 30. I'm only going to select the upper bone I'm going to turn on auto keying down here so whenever I move this bone now it's going to automatically insert a key and we're going to position our cylinder right so I think that right there is fully open right so at frame 30 this is where it's going to be you can see these uh the walls are solid the shading looks correct everything looks pretty good and it's animated pretty well now we could open this far or we could go a little bit farther something like that right looks good to me it it it opens up shoots our thing back and then all we need to do is close it back up so very simple to do that all I need to do is copy um the keys so I'm going to select them by click and drag copy I'm going to go to let's say frame 60. okay and here I'm just going to paste those keys okay so at frame 60 it's closed at frame 30. it is opened and then um it goes back so this is our complete animation really simple right really simple you can do a lot more complicated things but for right now this is going to meet all of our needs now the one thing I'll say though is when you're about to launch a rocket I think that this Dome is going to open up a lot faster than it's going to close and so I think what we should do is let's grab these um let's grab these uh keyframes I'm going to hit G and now we can go ahead and move these and so I'm going to move these out to let's say frame 90. okay so what's going to happen is it's going to open up and 30 frames but it's going to close from the open position in in 60 frames so now we can play this yeah it still doesn't seem like very urgent does it it seems to open pretty slow I think what I'm gonna do is even move these back a little farther so I think we're gonna open up in let's say 10 frames so now yeah it opens up really fast and then closes looks pretty good okay so now we did this animation in the dope sheet um I am not an expert in this but I think I think what I can do is if I go to the action editor I can take this action and rename it I'm going to call it launch and then there's so we have launch and I don't know what push down means maybe we'll try it yeah I don't really understand what that push down is but anyway this is our launch action I think I could create more actions uh if I chose to do so um but for right now we're just going to keep it simple Actually I don't even think I have to select any of them I can just export export everything um fbx I'm going to call it Untitled and we're just going to export everything I'm not even going to worry about the lamp or any of that okay so let's export this now we're going to go to unreal okay I pulled up the content browser and I have a test folder I'm going to drag my fbx into here from File Explorer this is really small probably hard to see but this is your standard fbx import I am going to choose to import the skeletal mesh right because we do have a skeleton and the animation so I'm just going to say import so now we have um interesting we have two animation sequences I don't know why that is um but we have our skeleton so let's just open one of these up okay so here you can see this is our skeleton right uh we don't have any material on it or anything like that and it probably needs some work with the UVS but I'm not going to worry about that um here is the skeleton uh you see we have our bone bone one and then I think the export adds this this bone end um but here is uh bone one and then this is the I think the root bone maybe that's what it adds in yeah interesting so there's our skeleton and now let's look at our animations so here is our animation that we've imported into unreal um and I think yeah for whatever reason it imported it twice I wonder if it's because I did the push down uh not exactly sure but uh what you can see here is that uh this is our uh this is our missile silo right so if you take this close this out look at this craziness so here never mind all the never mind all the animals never mind the uh never mind the worm but if you look now I know we don't really have a missile silo in uh in the medieval times but uh you can definitely see that this is our uh our animation come to life and everything looks pretty cool right so all you need to do is put some materials on it and uh uh that's about it so this video These always take longer than I expect them to I uh it does take a lot of time to make these and um believe it or not I recreated this like three times because I messed up and uh I wanted it to you know not be confusing so um if you like this kind of content please hit subscribe please comment please like and please share um uh I definitely you know enjoy doing this comment and I love hearing from everybody but uh my schedule is pretty tight and um you know the biggest reward I can get is having you guys like this material and and appreciate it so uh thumbs up Hammer the like button and uh thank you very much for watching if I get enough interest in this I'll show you how to trigger this animation within your blueprint so that for example when you're ready to fire your missile you can go ahead and just trigger it from within a blueprint rather than just having it constantly animating so all right everybody thank you very much have a great day and I'll talk to you later bye
Info
Channel: Gordon Vart
Views: 5,298
Rating: undefined out of 5
Keywords: ue4, tutorial
Id: DqQuYNK1a2E
Channel Id: undefined
Length: 21min 8sec (1268 seconds)
Published: Sun Nov 20 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.