Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
9. September 2013

 

First, let me start by saying this step is completely optional!  Blender has integrated texture painting functionality, but if you prefer to work entirely in a 2D application like GIMP or Photoshop, that is completely your option.  That said, Blender’s painting abilities are pretty solid and are a great way to block in colours rapidly. 

 

You enter Texture Painting mode the same way you enter Object or Edit mode, in 3D view.  Just pull down the mode dropdown and select Texture Paint.

image

 

Once in Texture Paint mode, hit T to open up the Tools panel.

 

Clicking the Brush icon allows you to select between the various brushes:

image

 

While the controls right below the brush allow you to select the active color, set the brush strength, radius and blending mode ( as in colour blending ):

image

 

 

There is a ton more functionality in there, such as painting with a texture pattern, changing brush stroke styles, etc… but we will just be using the painting tools to block in our basic colours.  Most jets have a grey on grey camouflage colour and that’s what we are going to go with here. 

 

Let’s start with our base color, from the colour picker, select a light grey colour.  Then set the radius to a large value and keep strength at 1 ( full ).  Like so:

image

 

Now you should see a very large circle over the cursor in 3D View.  This represents the radius of the brush.  Left clicking will paint with the current brush:

image

 

Now, let’s look at something rather cool.  As you paint in the 3D View, it will automatically update in the UV window:

image

 

Even cooler, you can paint in the UV window and it will update in the 3D view.  To paint in 2D in the UV window, simply click the Mode dropdown at the bottom of the UV/Image Editor window and select Paint.

image

 

Now you can paint in the UV window!  Keep in mind though, colour and brush selections are still done from the Tools panel of the 3D view.

 

Now I am just going to paint the entire Jet in our light grey colour.  Keep in mind you will have to rotate and zoom the camera around to get in every nook and cranny while painting.  Fortunately you can easily see from the UV windows if you missed a spot.  You of course could just paint in the 2D layer, but then you don’t get nice crisp edges in the texture map.

 

Here is the fully painted jet:

image

 

Next I simply vary the grey-ness of the brush and randomly layer colours to get a gray on gray camo pattern.  I then pick a slightly darker gray and colour in the cockpit area.

 

image

 

That’s it for painting in Blender.  Next up we will finish the details of our texture in an external 2D graphics package.


Click here for the Next Part

 

Art


6. September 2013

 

This one is short and sweet.  Until this point, we haven't actually applied a texture to our model, we’ve instead been using a reference grid image.  We can re-use the same image file as our texture.

First in the Properties window, we click the Textures tab:

image

 

Next we create a new texture, simply click New

image

 

Now we drop down the Type dialog and select Image or Movie:

image

 

Now click the Browse Image button:

image

 

Now select our reference image:

image

 

Now scroll down to the mapping section and select Coordinates, then pick UV

image

 

Pull down Map and select our UVMap:

image

 

Your texture is now applied.  If you render (F12), you should see:

image


Click here for the Next Part

 

Art


6. September 2013

 

As I mentioned in the prior tutorial section creating a UVMap is basically like wielding a pair of virtual scissors to cut your 3D object up so it can be smushed flat.  As we saw earlier, the default unwrap map is pretty, subpar:

 

Default unwrap:

default

 

Let’s start cutting things up.  First we will default the wings.  In 3D view, make sure you are in Edit mode and Edge selection, then select the edges at the base of the wing, like so:

image

 

Now we want to mark the selected as a seam.  Press CTRL + E to bring up the Edge menu, and select Mark Seam.

image

 

Or you could use the button in the Tools panel of 3D View:

image

 

Both options do exactly the same thing.  Once the seem is marked it will appear as red:

image

 

Now you can see the result of marking a seam.  In 3D view, select all edges ( A ) and take a look at the UV window:

image

 

We now have a completely separate collection of UVs ( called a UV island ).  I still wouldn’t want to paint over these UVs yet, so we have a bit more work to do.  In order to be able to flatten the wing even more, lets mark another set of seams, like below:

image

 

Now look what happened to the UVs

image

 

That is certainly much easier to paint over!  Of course, you could have split the wing top and bottom easy enough but each additional seam makes painting a bit trickier.

 

Remember the textured view of our jet from the previous tutorial:

badUVs

Instead of a checkerboard texture on the wing, you just got a white blotch.  Now that we marked the wing seams, look at the result:

image

 

MUCH better!  Ultimately our goal is to make the entire jet have a checkered texture like that.  The process is exactly the same, just keep marking seems in the model until the UV layout makes sense.  Let’s repeat the same process on the back wing and then the tail.  If you make a mistake, you can simply Clear Seam on the selected seam.  To completely undo your changes, select all edges and do CTRL+E –> Clear Seam and you are back to default.

 

I marked the following seams on the back tail and wing:

image

 

 

Resulting in this UV layout:

image

 

And in our rendered view:

image

 

Next lets cut the jet in half vertically.  Select the continuous loop all the way around the jet, it will meet up with the wing cut:

Front:

image

 

Back:

image

 

Highlighted:

image

 

You want a continous edge around the entire jet that will cut it between top and bottom.  Once selected, mark the seam.

image

 

Now mark the area surrounding the air intake:

image

 

This however results in an unwanted seam, shown below marked in green:

image

 

Select those edges and then select Clear Seam.

 

Now we have:

image

 

And the following UV layout:

image

 

Keep in mind, Blender automatically sets the positions, so yours might be a bit different layout wise.

 

Finally, lets seperate the cockpit away from the fusalage:

image

 

The cockpit:

image

 

And finally, the tail:

image

 

And now our fully UV mapped model:

image

As you can see, the texture pattern flows pretty well over our image.  There are portions where we might get into a bit of trouble but they aren't areas where we are going to need details, so we should be good to go!

 

 

Well, that sucked, there has to be an easier way!

 

Yeah, actually, there is.  Blender has something called a Smart UV Project.  To use it, in 3D View, in edit mode, select all, then press U.  In the resulting menu select Smart UV Project:

 

image

 

Then a dialog will appear:

image

 

As I understand it, Smart UV looks at your model and separates UVs based on the angle between shapes.  So for example, since the wing essentially meets the fusalage at 90 degrees, it will easily be split into it’s own UV group.  Play around with the angle limit until you get a grouping you like.  Here is the result at 66 degrees.

 

image

 

Not ideal, but certainly a hell of a lot easier!

 

 

We only touched on a very small bit of what you can do with UVmaps.  Just keep in mind, if you add another seam ( and thus generate another Unwrap ), the positions will be reset.  Otherwise you can scale, turn, relocated, etc… UV coordinates to your hearts content.  If you don't want them to be scaled again, you can Pin (p) a UV in place.

 

Selection Options

 

You may find that you want to select Polygons from the UV layout screen.  By default it’s setup that what you select in the 3D view will be selected in the UV view, but it’s possible to do the opposite.

You need to click the “Keep UV and edit mode mesh selection in sync” button.

image

 

Now making a selection ( such as using the B)ox select mode ) in the UV window:

image

 

Will select the corresponding polygons in the 3D view:

image


Click here for the Next Part

 

Art


6. September 2013

 

Now we are going to start the process of texturing ( drawing an image on the surface of ) our jet.

 

This first step may not need to be performed.  We need to verify that our model has a material applied.  By default one will be created for you, but if you are following along using my Blend file, for some reason in the past I deleted it. ( I had applied a quicky wireframe material to make a beauty shot earlier )  No matter, its a simple enough process to create a material.

 

In 3D View, make sure your jet is selected.  In the Properties window locate the Materials tab:

image

 

Check to see if there are any materials applied, if there aren't, create one:

image

 

When done, it should look like this:

image

 

If it already looks like that, you don't have to do any of this.

 

Texturing

Before getting too far into this you need to understand the concept of a texture.  Simply put, this is a 2D image that is pasted on a 3D object.  We have many cases of textured object in the real world, such as wallpaper or a globe.  Here for example is the image that would be glued on a sphere to create a globe:

gores

 

This 2D imaged, combined with the 3D sphere would go together to create a globe.  This process can be handled in Blender using something called Spherical Projection.  On the other hand, when you have an arbitrary shape like your model, your mapping gets a great deal more tricky… and a map is required.

 

UV Unwrapping

So what exactly is UV mapping?  It’s actually very simple.  Meshes are 3D objects and textures are 2D images, so how then are you supposed to put a texture on a mesh?  That’s where UV coordinates come in.  There is nothing special to UV values, they are just numeric values describing the position of a texture on a face, just like normal XY values… except of course the values X and Y were taken, thus U and V.

Now that works wonderfully if your mesh is a single flat quad, but obviously that isn’t all that common.  Enter the UV Map, which is exactly what it’s name implies, its a mapping of UV coordinates to positions on a 3D model.  So how exactly do you pull this trick off?  Well simply put, you squash your 3D object into 2D.

Imagine that your 3D model was made out of construction paper and to paint it, you wanted to flatten it.  This is basically exactly what we are about to do.  We tell Blender where you would make scissor cuts in your model to enable it to flatten and Blender takes care of the rest.

You define these cuts ( or in Blender terms “Seams” ) in EDIT mode in 3D View.  Then they show up in the UV/Image panel.  UV coordinates are component based, so you apply them at the vertex/edge/face level.  To see them in the UV window, they need to be selected in the 3D view.

 

I am going to set up my Blender for UV editing.  What I generally do is set up a 3D view on one side of the screen and a UV/Image Editor pane on the other.

 

image

 

Like this:

image

 

Let’s start off creating a texture to help us with UV mapping.  At the bottom of the UV panel, select Image->New Image.  Note the contents of that menu may be slightly different, its dynamically populated based on context.

image

 

In the resulting dialog, give it a name so you can find it later ( we will be deleting this texture later ) and under Generated Type set it to UV Grid, like so:

image

 

Now in your UV panel you should see:

image

 

Congratulations, you’ve just created your first texture!  This grid pattern is handy for seeing if your UV unwrapping job needs work or not, you will understand shortly.

 

Now, let’s set up Blender to show unwrapping Live.  In the 3D View, open the tools (T) panel, locate and select Live Unwrap.

image 

 

Now Blender will automatically unwrap for you as you mark seams.  You need to also enable Live Unwrap in the UV panel.  Select the UV menu and click Live Unwrap.

image

 

You don’t need to do this step, instead you need to manually unwrap ( using U then Unwrap ) with every change you make otherwise.  It’s your call.

 

Now let’s apply the grid texture to your jet.  In 3D View, in edit mode, select All ( A ).  Then in UV view, select the image:

image

 

Now in the UV view, you will see the UV map over the grid texture:

image

If you dont see the wireframe, you probably don’t have anything selected in the 3D UV.  This view updates based on the selections in 3D View.  That is what your model looks like flattened.  Don’t worry, we will make it a bit more logical soon.

 

You will find the UV window uses almost the identical keys as the 3D view.  You can pan and zoom the exact same way, you can use box selection, G to move, R to rotate etc.  So, while Blender may have had a nasty user curve at first, it’s very consistent once you know it.

 

As you can see in the 3D viewport ( as long as you are in textured ), our texture layout isn’t exactly ideal!  With a good layout, the checker pattern will flow much more cleanly across the model.

image

 

If you don’t see the texture mapping, its probably your settings.  You can toggle between showing textures and not in the 3D view using the Viewport Shading selection:

image

 

Set it to Textured.  Rendered mode wont work, as the grid texture hasn’t actually been applied to our model ( this will make sense later when actually apply a texture ).

If your model still isn’t showing up with the grid texture, there is one other setting you have to configure.  In the 3D View, open up the properties ( N ) panel.

image

 

GLSL can show some more details than other modes, but it also has some limitations.  Most of the time I personally have mine set to Multitexture.

 

OK, this got pretty long so I will break it into another section.  Coming up we will start cutting up and laying out or UVmap into something a bit more useful!

 


Click here for the Next Part

 

Art


29. August 2013

 

In this post we are going to, for the most part, complete with the modelling portion.  In the end, I am going to stick with a relatively low polygon model so it can easily be used in a real-time 3D game, as well as for rendering a sprite.  Additionally, a lower polygon count makes texturing more straight forward.  That said, if you are rendering to sprites, the polygon count really doesn’t matter to you ( except of course for your PC being able to run Blender that is! ).  Later on I may take a look at adding more detail, as well as rendering a normal map to give the illusion of more detail on a low polygon model.  That said, I cant spend forever on this or we will never get to texturing!

 

So… back to our model.  In our last stage we ended here:

jet

 

Certainly more jet like than box like, but there are obviously some major exceptions.  First the cockpit is still basically just a box.  Second, the nose is about as aerodynamic as a toaster at this point.  Third, there is no engine yet, although you could argue that is just wasted polygons given the shape of the jet ( aka, you cant generally see the engine… ), so for now I am simply going to skip modelling an engine.  Finally we can do a bit of tweaking and movement in general.

 

The Cockpit

First we start off with our friend the loop cut.  Create one more loop cut along the edge of the cockpit like so:

image

 

Now move the outer edge of the cockpit down a bit, like so:

image

 

Now we are going to create out first triangle!  A few triangles here and there aren’t a bit deal, especially if they make sense.  What we want to do is basically change our edge loop so it loops around the cockpit.

 

To do this, we are going to make use of the Knife tool.  You use the knife tool by hitting K, then clicking here you want to start cutting from, then click where you want to cut to.  Finally click enter to complete the cut.  Hit K then click on the two locations marked.  Be sure you get the special square indicator that shows you are cutting to an existing vertices or you will create extra un-needed and un-wanted geometry.

image

 

 

Now repeat the process for the back of the cockpit and your new edge loop should look like:

image

 

Now shape the cockpit to suit.  I am not all that pleased with the initial results, so I will probably tweak later, but its at least a cockpit now instead of a box.

image

 

 

Modelling the nose

 

Now let’s do something about that nose.  We are going to collapse all of the vertices at the end into a single vertex.

 

Box select all of the vertices at the front of the jet, like so:

image

 

Then hit X and choose Edge Collapse

image

 

And Voila!

image

 

As you can see above though, our newly created uber vertex isn’t at the mirror point any more.  Make sure to move it back to 0 along the X axis:

image

 

 

Now we have one small problem… our plane is really really really boxy and we don’t want that!  You can spread the vertices out by hand but there is a much easier solution.

 

First make sure you don't have any interior geometry ( lines/vertices created along the X axis ) , like I do now.  You will need to be in Xray (Z key) mode to spot extra geometry.

image

 

If you do, select the edges and delete them ( X ). 

Now select the boxy edge loop making up the front of our nose:

image

 

And run the To Sphere tool.  ( Alt + Shift + S ) and:

image

 

Now move the selected edge loop back from the front of the nose:

image

 

Now repeat the same process with the next edge loop ( closer to the cockpit ).

image

 

Obviously we have a bit of cleaning up and tweaking to do now.  After a couple tweaks and moves we have:

render

 

 

At this point I turned off the background reference images and played around by hand and selectively set smoothing.  To set smoothing, simply select the face you want to be displayed smooth and click Smooth under Shading in the tools panel:

image

 

I made a number of small tweaks, such as extending the wings, shrinking the cockpit and main body and just smoothing things out.

 

So, this was our original design:

topSide

 

 

And this is where we ended up:

perspective

toprender

frontrender

rearrender

siderender

 

Pretty close to my original concept.  Not perfect by any means, but I’m happy. 

 

You can download a zip containing the blend file right here.

 

Time to move on to texturing!


Click here for the Next Part

 

Art


GFS On YouTube

See More Tutorials on DevGa.me!

Month List