Friday, November 19, 2010

Texturing a Medieval House






UPDATE: Video Added.
Direct Youtube link (it's a full screen sized video): Texturing A Medieval House Video
The audio seems to lag. I don't know why. It's ok in the beginning, and then it's like watching a KungFu movie. 




 I apologize for the long delay. The audio seems to lag behind the video for some reason. Please post specific questions I have not answered. Thanks!

I have written this tutorial primarily for Blender 3d, but the principles are the same for all 3d packages. It assumes some basic knowledge of 3d modeling & texturing.

In this tutorial, I'll be discussing the techniques I used to model the house shown above. I won't be going into the actual modeling of the house, but I will kick the tut off with a discussion of good modeling practices, the lack of which will make texturing a lot harder, if not impossible.



video
Modeling
Good texturing starts with clean modeling. Some fundamentals to consider:

  • Avoid overlapping faces - that is, co-planer faces which occupy any part of the same space.
  • Remove unnecessary faces - the bottom of table legs or the back of a cabinet that stands against a wall for example. Not only does this ease the strain on the game engine, there are simply fewer faces to be concerned with in the UV editor. Also look out for extra faces - faces you can see, but that are not necessary to describe the form - a flat plane subdivided a few times for example.
  • Remove any internal faces - These play havoc with normals. 
  • Make sure your normals are all outward facing - In Blender, pressing Ctrl-N will yield Blender's best guess, but if you've got internal faces, or faces that are only one plane thick (like a window in a building), blender won't know which way is out. Turn on draw normals and be certain.
  • Keep objects separate as you model, then join objects of the same material before you unwrap. I like to do this even if I'm going to unwrap the model to one diffuse map. It helps to keep things organized. The wood beams on the house pictured above are separate from the plaster & stone walls for example.


    UV Unwrapping
    I can't overstress the importance of a clean, organized UV map. Let's start with the stone foundation, steps and chimney, which are one object. There are lots of ways to unwrap a model, but for architecture, I like to use project from view. I started out selecting these faces. You can speed this up by selecting one face, then pressing Shift-G  then "Co-Planer". As you add faces, remember to hold down shift, so that the others don't go away.

    Select These Faces


    Next, enter front view (assuming your house faces front - if it doesn't make your life easier by making it face forward) by pressing numpad 1. Get into orthographic mode by pressing numpad 5, if you aren't there already. You should be looking at something like this:

    Ready to Project From View
    Now, press "U" unwrap, then "Project from view". Enter the UV editor by pressing Shift-F5 (if you don't have split screen set up), and your walls will be projected on the UV map for the most part undistorted. I say that because the 45 degree corners will end up a little thinner. That's ok, you can ignore the small stretch or fix it on the UV map. Now, back in 3d mode, without changing your zoom factor (don't scroll in or out), rotate around the building using numpad 4 & 6, and project the rest of  your walls. It's important that you maintain the same zoom factor, so that all of the faces will be scaled correctly in proportion to each other. I don't know about you, but I usually end up having to do this part a few times - I somehow always forget not to zoom in, or I forget which faces I've already projected. As you project each new face, go into the UV editor and move it a bit so that it is separate from the other faces. Don't worry, you don't have to position everything perfectly now. Just imagine it's a paper house. You have cut the walls out, and you are just laying them out roughly so that they are not stacked on top of each other. Once you've got all the walls projected, go back and unwrap the other pieces - window frames, steps etc. It's ok to select everything that hasn't been projected and unwrap them using smart projections.

    This tut is in progress....
     

    • Whatever your unwrap method is, the resulting UV map should be clean and organized, and constrained to the size of your texture.


    Texturing