Blender Animated Game-Ready Asset Tutorial | Polygon Runway

Creative 3D objects
9 followers
#gjwarts #drawing #art #digitalart #3dmax #sketch #interior #creative3D #howtodraw #3ddraw #3Dobject
Hey everyone, welcome to my new tutorial. Today I want to show you how to model and animate
a sci-fi themed vehicle and export it for game engine from blender including the animations and
I really hope you will enjoy this one and if you do please don't forget to leave that like
and if you're new around here hit that subscribe. Now let's jump into blender and first of all we'll
build a simple sci-fi tank design so I will just select everything here in the scene,
press x and choose delete and let's press shift and we'll start with a plane and now let's scale
this up so I'll tap into the edit mode press s then y and scale it to around five or six meters
something like this and now let's press e to extrude and push this up now let's press s then
y and scale it on y-axis and then e again to extrude and then s then y again to scale this back
down like this now let's tab out and let's hold shift and right click here and let's press shift
and we'll add another plane now tab into the edit mode and let's press s to scale this down like
this and press g then x and move it to the side here and let's press s then y and scale on y-axis
those will be the tracks or the track covers or fenders or whatever you want to call them
so let's do something like this I will scale this up a little bit more still and now let's look from
the side by pressing 3 on an armpit let's press g then z move this down like this and let's press
e to extrude and then e to extrude again we can go a little bit higher here and now I'll toggle
the x-ray here press s then y and scale it like this to maintain this angle approximately
something like this and now I will go ahead and create tracks now these won't be any like rigged
or moving tracks because from a top down view you wouldn't see this moving in any way so let's just
press 3 for face select select this face right here press i to inset and now we'll just press e
to extrude this down and then s then y to scale it like this and now let's go for edge select right
here alt click this loop and we'll press v to separate this and right click to release it in
place I want to have this as a separate mesh so the transition is sharp there and now let's select
these two edges right here press ctrl b and create the bevel and let's increase number of cuts to
let's say three something like this so this is the suggestion that there are in fact tracks
underneath and now let's select these two edges on top by holding shift and press ctrl b to bevel
those as well and I think three cuts will work here as well and now we can tab out and let's go
to the modifiers panel and let's add mirror modifier right here and let's use the eyedropper
tool to pick this object as a center for mirroring and we have now those on both sides and I like
that there is a little bit of a gap here so let me just look from the top by pressing 7 on an
and then press alt d then y and duplicate this to the other side like this if you just started
blender and you have trouble following all the tutorials make sure to check out my courses
where in addition to the step-by-step instructions you also get full in-depth explanation of all the
steps and all the tools and you get to learn everything from simple low poly design all the
way to full character illustration textured environments even a little bit of sculpting
and hard surface modeling so if you're interested please check out the link in the description
and now we'll create the turret so let's select this object right here tap into the edit mode
and with this top face selected if it's not let's go to face select and select it hold shift s and
snap cursor to select it and now we can tab out and let's press shift a and we can add a plane
and press g then z and move this up a little bit so it goes above the tracks and now tab into the
mode and let's press s to scale this up a little bit like this and now let's press ctrl r and create
a cut right here in the middle left click and right click to confirm and now select this edge
press x and delete vertices and let's go ahead and add mirror modifier here as well
and enable clipping and let's press 1 for vertex select or you can click right here
select this one press ctrl b then v to enable vertex bevel and reduce number of cuts with the
mouse wheel and let's do something like this and now we can select this one press g twice to slide
this back like this and now let's do the same vertex bevel right there okay now let's press a
and e to extrude and now let's select these two vertices on top let's hold shift s snap cursor to
select it and let's go ahead and switch our pivot point to 3d cursor and now let's select this other
and press s and scale them inside like this so we maintain those nice flat faces there and we can
press g then y and move this back a little bit like this okay i really like that let's press 3
for face select select this one press i to inset and now press b to enable boundary mode and it
will ignore the one on the inside and let's press e then y and just scale this down we'll put some
canons in there so we can now tab out let's hold shift s and snap cursor to select it and let's
press shift a and we'll add the plane now let's press g then y move it right here and then from
the side view let's press g then z and move it around here now tab into the edit mode and let's
switch back to medium point and press s to scale this down right here and we can go even further
like this you will see why and let's press 2 for edge select select this one press g then y and
just extrude like this and now if we enable extra view we can hold shift select this one on the
other side press x and delete only edges so now we're left with these two edges and we can convert
them to curves so tab out right click and convert to curve and now in the curve settings geometry
section we can reduce the resolution and increase the depth and we'll create two canons like this
now let's toggle the x-ray back again and additionally we can tab in and press s then x to
scale these together a little bit like this and then play with the depth i think something like
this might work tab out and let's right click and convert to mesh now we'll tap back into the edit
mode press l hovering over one of those press x and delete vertices and we'll go ahead and add
mirror modifier so again we don't need to repeat all of the steps on both canons and now let's
press ctrl r to create a loop cut and slide it back here now let's press 3 for face select alt
click this loop and let's press alt e and extrude along normals and let's do something like this
here and here in the front let's press 2 for edge select alt click this press e then y and extrude
and then f to fill so i think this will work nicely for a base canon shape now if you enable
x-ray view you can select all of this and press g then y and move it back and forth a little bit
and adjust the proportions so now let's tab out and let's talk about the x-ray i want to create
some small details here and there so here on the top let's select the turret and let's tap into
the edit mode select this edge hold shift s and snap cursor to select it and tab out and let's
press shift a and let's add a circle and modify this to 12 vertices should be enough now tab
into the edit mode and press s to scale this down now press 1 for vertex select press e then z
and extrude like this and then press f to fill i to inset and again e to extrude then we'll press y
to separate scale this down e to extrude and finally enable x-ray view switch to face select
and select this bottom face right here press x and delete it we don't need that down there
and let's toggle the x-ray back and finally we can tab out select this turret once again
tap into the edit mode and let's just go ahead go for the edge select select these edges by
holding shift let's press p and separate the selection into a new object i will now tab out
select the new object tab into the edit mode and now we can press a then e z to extrude on z-axis
like this and now that's extruded let's first check our face orientation and we have some
flip normals here so we can press a and shift n to recalculate and then press alt s and scale
this inside and additionally press s for even scaling to achieve something like this and then
e and extrude along normals to do something like this and again press s for even scaling
to do something like this now press 3 for face select enable x-ray view and down there
alt click this bottom loop press x and delete those faces toggle the x-ray back and now we'll
press a to select all and shift and to recalculate normals and now let's tab out let's select this
one here and do the same thing so select all and shift and to recalculate and now what i'll do
is to just select everything hold shift select the body first of all right click and convert
to mesh that will apply all of the modifiers even the mirror modifier and then press ctrl j to join
so what you should have here is one single object one single mesh with all these separated pieces
inside if you tab into the edit mode and no modifiers right there and now we can go ahead
and add the bell modifier increase the segments and in the geometry section switch this to arc
and in the shading enable harden normals and let's disable clamp overlap so we allow for
some distortion and now let's go back on the amount until most of these disappear like this
and now right click shade smooth and we'll fix these by separating the parts of the mesh so if
you go into the edit mode and enable x-ray view you can press 2 for edge select or click here
let's hold alt key and select this loop on the canon hold alt and shift and select another one
and right here as well and here and now we'll press v to separate this and right click to release
and now if you toggle the x-ray you will see this is no longer connected so the bell modifier
doesn't kick in there so we can tab out and one more thing i want to do here is to increase the
angle because you can see the bell modifier is catching some of the angles on the cannons so
let's do something like 50 degrees and this should work nicely here so this is like a super basic
locally stylized tank model but it's good enough to try and animate this and export as an animated
fbx for game engines so let's hold shift s snap cursor to world origin and we'll go ahead and
add an armature so press shift a go armature and let's do single bone and now this is not visible
so let's go to the armature settings and here in the viewport display we'll enable in front so it's
always visible doesn't matter if you're in the x-ray or not and let's look from the side by
pressing 3 on an armpit and first of all let's select our tank press g then z and move this up
so it sits on the axis there and now press ctrl a and apply location and now we'll select the bone
again tab into the edit mode and let's press a to select all and then r and 90 to rotate 90 degrees
let's hit minus to rotate to the other direction and confirm with enter and we'll just move this
lower so press g then z move this here now press shift d then z to duplicate this and move it right
here now let's do another one so press shift d then z and move it right here and then again
press shift d then y and move one of these here okay now let's look from the top by pressing 7
on an armpit and press g then x and move this bone right there this will work as a cannon
like this and now we'll just name these so select the one on the bottom go into the bone settings
and name this tracks now let's select this one this will be the body here we'll have a turret
and this one will be cannon.l and you will see why just in a second so now let's select this
one hold shift select the bottom one press ctrl p and parent with keep offset now let's do the
same thing here so select the turret bone hold shift select this one press ctrl p and parent
with offset and finally same thing right here so we are basically creating like a chain
and now since this one is named l we can just go ahead click armature and choose symmetrize and
that will create a duplicate of this with the r suffix for us now let's step out and in the
armature viewport display let's switch the display to stick we don't need those large
bones visible and basically this is everything we need now to rig this so let's rename this
to tank and we don't need to rename this and now let's select the tank body hold shift select the
armature and press ctrl p and we'll parent this as armature deform with empty groups so now if we
select the vehicle you can see in the object data properties there are vertex groups created
with the names of these bones so currently if you move the armature you can see the tank is moving
because it's parented but if you will move this in pose mode nothing will happen so let's select
the tank tab into the edit mode and first of all let's press one for vertex select click away to
select everything and now let's hit l hovering over the track here and as we go along we can
hit l to select linked and now let's find tracks here and hit assign let's press h to hide this
and we can press l hovering here select these parts with the body and assign this to body
and now let's press h to hide so it doesn't get in the way and let's do the same thing here
for the turret parts and let's hit assign and now let's press h now select the left cannon
and assign and basically now just press a to select all and assign the right cannon
and now press alt h to unhide everything and if we now tab out select the armature and go into
pose mode so you can either select the pose mode here or you can hit ctrl and tab now you're able
to separately move this to move the turret and rotate it and of course move these cannons
however you like and this is what i will use for the animation and this is always the easiest way
to get to transfer your animation from a software like blender to a game engine every game engine
understand bonds and vertex groups and this should work seamlessly whether you want to bring this to
or even online engines like spline so let's do some animation first i will expand this right here
and i will set this to something like 60 frames this will be a very short animation and first
thing i want to do is to do like an idle animation so this will be very stylized imagine in the game
you have a tank it kind of just sits around and puffs you know in place so i want to create like
up and down animation but i won't do this manually creating all those keyframes let's
press n for the side panel and let's right click and create single keyframe on z location and now
we'll hit ctrl and tab here in the timeline view and we get to graph editor so let's now expand
this and you can see there's the body and there's z location we can go in the modifiers right here
if you don't see this part press n same as with the viewport and let's add the built-in function
and we can leave this at sign and let's do additive and now we'll just place with the
amplitude and face so let's do something really small like 0.05 and see how this moves this is
still quite a lot so let's do 0.025 i think they'll be fine but it goes a little bit hectic
if you want to better see this curve you can hold ctrl and now drag with the middle mouse button up
and down to kind of zoom in on this and now if you change the face multiplier you will see how many
of these movements you get let's try to increase this a little bit something like this and now
we'll go ahead click channel and bake the animation because this is another thing you need to do let's
click it they will basically translate this procedural animation to keyframe on every single
frame because your engine wouldn't be able to recognize your procedural animation from blender
probably so this is what you need to do and now to simplify things let's press t and change the
keyframe to linear interpolation so we don't need those handles since we get keyframes on every
single frame and now we just need to optimize this a little bit so i can see that these two are
probably the ones i need to connect in the beginning and end so let's select these two
press x and delete keyframes and now we'll just select everything go here with the cursor and
change this to 2d cursor and now you can press s then x and just scale this out frame by frame
it looks fine something like this make sure you are careful with the shape of the animation on
sometimes you might need to move things around a little bit and now if you play this back you can
see this should loop very nicely it's baked in it's on the bone right here and what we can do
right here is to go into the dope sheet and switch this to action editor and we have the tank
animation slot right here and we can name our action let's say this is the idle animation
and now basically we'll just hit the fake user to protect this animation in case you
would close the blender file and you can just duplicate this and rename to fire
and now we can just press a to select all press x and delete keyframes and now there's no animation
happening here on this bone but if you switch this back to idle your animation is back it's
for you in these animation slots so let's go to fire animation let's go to frame one and what i
want to do here is to rotate the turret a little bit and shoot from those cannons so let's go back
to timeline and let's switch the rotation from quaternion to xyz euler and now let's right click
on a z rotation and insert single keyframe and let's move like 10 frames and modify this
just like that right click and insert single keyframe and now we can select this one in
the front press shift d then x and duplicate it on the other side like this now this is what we
have here um we'll adjust this a little bit later maybe we'll need some in between keyframes as well
and this is probably too hectic so let's select this frame press shift d and duplicate that
right here and let's move this one out a little bit like this so now we have some space where
turret stops and we are able to shoot from those cannons we can even make this a little bit longer
like this and now let's select this cannon bone and on the frame 10 it will start shooting so
now i'll go ahead and create single keyframe on y-axis and move like five frames and let's
modify the value here it will go back here like this right click and insert single keyframe
and then let's do the same thing like before let's select the first one press shift d and duplicate
it here so this is the movement we get now before i transfer this to the second one let's refine our
animation so first of all let's select this turret bone again and ctrl tab here to view
the animation graph and we can press a to select all and period on a numpad to focus on our
animation or you can use that ctrl and middle mouse button scroll and now let's make this steeper
so in the beginning i want this to rotate you know um with a little bit more energy in the beginning
like this and then it shouldn't just stop in place it should be like more fluid so
so we can try to move this around like this for example and maybe a little bit away
okay maybe bring it closer here and now let's do the same thing here let's focus on our animation
and again we'll make this steeper here and this can go out a little bit longer and do something
like this and now let's go back to the timeline view and let's just select all of these keyframes
press ctrl c and now select this bone right here go to the frame 10 and now let's create an empty
keyframe here so right click and insert single keyframe on y-axis and now let's press ctrl and v
to paste our animation so now both of these are doing the same thing but we can now press g and
just move this fine frame so there will be an offset for these so this is the final animation
now before we move on and export this i want to put some texture on it because this is not as
straightforward as texturing in blender where you can use you know multiple material slots
and complex node setups because most of the time you will need to bake your texture effort
to something more simple that you can be exported into the game engine and i want to show you how
to do that so i will first do some quick texturing using procedural add-on fluent materializer this
is a paid add-on and i use it a lot and i'm in no way affiliated with the add-on maker i just use
it a lot and it will be much quicker to show you how to quickly create that kind of texture
and of course then you can decide whether you want to go for the add-on or you want to use
some different means of creating your textures whether it's procedural or from different texture
maps but the lesson here will be about baking the texture and exporting it along with the fbx to the
game engine so um let's just select our tank and let's create a new material here and i will call
this tank and i will switch this to node editor the shader editor like this and then the fluent
materializer you can see on the bookmark right here it has some library um you might need to
switch it back and forth a little bit you can see there's a library of different grunge maps here
and these are procedurally generated by the add-on but you can just go ahead and basically
download any grunge maps out there whether they're free or paid and use that black and white texture
to do the same thing that i will be doing right here so first of all let me just add it here
and of course we can use the result and plug it into the surface so we can see the preview
and i will go ahead and switch this to material preview and now you can see how the texture looks
like and then i have some values that i can tweak to make this look better so i will reduce the
scale so we get something like this really strong grungy effect and then there's another thing that
i use quite often with the add-on and that's when you press f you get this pie menu and they have
this perfect worn out wizard that basically allows you to quickly you know mask out edges
and then maybe adjust them a little bit like this and now let's press shift a here and i will add
a mix color node and let's plug this back and let's find some suitable color for the tank
something like this you know some desert camo will look great and then i will just press ctrl c
hovering here and paste it into the a color and into the b color as well and then the b color i
will modify and make it a little bit darker and maybe shift on the hue a little bit and then you
can just plug this result of the grunge into the factor and here you plug this into the color and
basically mask it out with this grunge so no matter if you have this procedural grunge or you
are using the black and white image with some pre-made grunge when you connect it here into
the factor the effect would be the same of course with the image texture you might need to unwrap
the tank a little bit which we'll need to do anyway so i will just select it here tab into
the edit mode and we can expand one window here and show the uvs and let's just press u here and
choose smart uv project they'll be the fastest way maybe not the most precise but for this kind
of tutorial definitely the fastest and then if you you know slap your black and white texture on this
this should work in a very similar way and yeah that's for the grunge and now i want to create
those worn out edges so i will basically create another mix color node so let's press shift a and
again color and mix color and i want to plug this here and our worn out edges mask right here
into the factor and if you want to know how to create similar kind of edges i did a tutorial
on procedural texturing and you will find the link in the description so if you want to make this
material setup yourself without any kind of add-on there's a tutorial for that as well so let me just
plug this here into the color let me type out of the edit mode let's wait for the shader to compile
and you can see now we have something like this here and now basically we can adjust the color
a little bit there and basically that's all i wanted to do maybe let's give it a little bit
of a hue like this okay so we have some worn out effects there and then i want to make this bottom
part black so i will need another material slot there with new material and i will just make it
black with full roughness tap into the edit mode click away and then press l to select these parts
that i want to make black basically that's it probably and then assign this material and we'll
bake all of this into a single texture so these material slots are only temporary so now in the
tank texture let's create a new image texture let's press shift a let's go texture and image
i will create a new one and i think 2k will be fine so let's do 248 2048 here
and with the black color let's hit new image and this is now blank texture and you can see the uv
map overlay on it so now we'll be just baking this result on our image so let's go to the render
settings and let's switch this to cycles i will switch gpu and i will enable the noising and now
down here if i scroll down there's a bake section and you can see you can bake combined channels or
you can separately bake roughness and normals but what i really want is just the color information
from this texture so i will switch the combined to diffuse and then disable the light contributions
and just leave the color on and now i should be able to just click bake make sure this is selected
you need to have this white frame around your node so the blender knows which texture slot
it should be baking in and now i will just hit bake and now you can see the result right here
all this procedural stuff that we made with the add-on is now baked in into the texture
so again this was not about how to create this particular effect with this grunge whether it's
with using the add-on or not this is about this process where you create a texture slot
and whatever you have here you uv map it and then you bake your color results or whatever channel
you want to bake into the texture if you want the full pbr setup so now the next thing because you
can see there are some empty spaces for the tracks because when baking i did this with this
tank material so now i will just select this press ctrl c select the other material and just press
ctrl v and paste it here so we have the same image loaded right there and now let me go back to those
bake settings and let me hit this again and you will see now additionally we baked in some black
color on those tracks so you can have multiple material slots on multiple parts of your vehicle
and then gradually you can go on and basically bake in whatever details you want and now when
you're finished with your texture you just hover here press alt s to save your texture i will call
this tank and save and now basically we need to remove those materials but if you want to
repeat this process later i suggest you hit fake user icon here so the material doesn't get deleted
when you remove it from your vehicle so let's just remove all of those and let's press ctrl c again
to copy this image and let's remove all the materials and create a new one let's call this
tank bake and i'll just press ctrl v here and plug the color and now we're using just
the baked image texture here i will increase the roughness to full and now we're basically
finished with our model if you play back it's still animated it still uses the armature animation
and now we can export this as fbx so let's just select all and now if armature is orange and the
is highlighted in yellow we need to do this in the opposite way so hold shift and select the armature
this needs to be highlighted yellow so it's active and now let's go file export and fbx and here i
will do a fun thing i will switch the pad mode to copy and click this icon right here you can see
we can embed texture into the fbx binary file so let's do that and let's limit this to selected
objects only and we of course want to include the animation we don't need the strips we want
to bake all actions now i'll just name my file here and hit export fbx and now if you open this
file in the windows 3d viewer you can see we have the full 3d model exported with the animation
even with the embed texture right from that one file and you can even go ahead and basically switch
your animation so this is the basic game asset workflow this is how you create your animation
this is how you bake your textures and this is how you get everything into a single fbx file
and export it for game engines and you can not only preview it windows like this but you can
just drag and drop it into any game engine or any online real-time engine such as spline where i can
just take the fbx file drop it right here and i have the tank of course not all engines will
import your textures right away so you will probably need to do your own and you can see
in the material we have this image so i can just load it up here and then of course you have your
animation slots here and you can click through them and preview them and this is right here
in your online spline editor right from the blender works like a charm and this is the way
how it would work both in unity unreal engine godot whatever have you though the material
creation might be different for each of those software so that's it from me a quick game asset
tutorial and i really hope you enjoyed this one and if you did please leave a like leave a comment
and if you want to learn more like this in the future hit that subscribe thank you all for
watching and have a wonderful day
