Saturday 10 March 2012

3D Modelling Reminders - UV Unwrap

I spend most of my time writing XNA code so when I return to modelling I have to remember the best techniques from the last time I created a 3D model.

I am sure I have put a few other reminders on this blog but while I'm creating what I hope will become the rocket launcher for Diabolical: The Shooter I am going to write down a list of key points as reminders for next time.

This is not a tutorial it is a list mainly for my own benefit that may point others in a useful direction

I tend to use a trackball for modelling rather than a mouse.  I find it more precise.  I use a cordless Logitech one and reassign the middle mouse button to both of the extra keys on the mouse.  This makes moving about in Blender much more reliable as my thumb is used to push on the buttons.  Works for both mice and trackballs.

There are some design choices that I make that may not be applicable to everyone.  These models are used in game so draw performance is important.  To maximise that I am trying to produce the models with the minimum number of draw calls which means using the minimum number of separate texture files.  For nearly all models I want to only use one texture no larger than 1024x1024.  For some I might use 2048x2048 and for small objects I go as small as possible without spoiling the result.  512x512 or 256x256.

The basic list of things to do:

1.  Create each part of the model as a separate object in Blender.
This is helpful when UV Unwrapping the model to be able to do it in small chunks.

2.  Just before UV Unwrapping create a vertex group for each object which contains all the vertices for that object.
This is useful because at some point it is easier if all the objects are merged in to one mesh.  Having a vertex group for the previous separate parts makes minor adjustments easier.


3.  Carefully mark the seam for UV Unwrapping.
Think about how the 3D shape can unwrap to be flat with the minimum of stretches.  Remember how you want the material to flow and try to put the joins out of sight.


4.  Select the same uv texture as the other objects.
Typically each object reverts to new.  Just change the drop down in the UV Image Editor window.

5.  I tend to find I am working in edge select mode for uv unwrapping.


6. Use the basic UV Unwrap option from the Mesh menu.


7. I am rarely happy with the immediate result so change the options from the context menu.
This is where Blender's interface becomes a little confusing.  The required menu only appears AFTER the Unwrap function has been completed and it tends to appear hidden at the bottom of one of the side menu bars.
The first time I use it I have to open the properties window and scroll down until I find it.  From then on it is where I want it.


The default settings are likely to have produced a twisted result which may be better in some ways but which I find difficult to texture.


8.  Before doing anything else change the Unwrap Method to Conformal and see if the result is going to be easier to texture.
Sometimes it is and sometimes it isn't pick whichever looks best.


I've already written a separate post just on that bit:
http://blog.diabolicalgame.co.uk/2011/10/uv-unwrap-in-blender.html


9.  Resize the UV so that everything will fit on the texture without overlapping.
Difficult to do at this stage because you can only see the individual object.  Make a guess and later on merge all the objects in to one object so the UV map can be arranged properly.

I find swapping between keeping the UV map and edit mode in sync or not in sync is useful for manipulating the UV.


In UV Sync mode use 'L' in a 3D view window to selected linked sections of the model.  They will highlight in the UV edit window making them easy to find, scale and move about.



You can temporarily move stuff off the texture to keep it out of the way while you manually reposition maps to get the best fit.



Including typing this blog it has taken me nearly 6 hours to UV unwrap the model and manually lay that out on the texture.  That's it for now.  I need to get on with creating the texture image.

1 comment:

Nici75 said...

Re: this post and the one you linked--

You are a god.

That is all.

I think it's enough :)