Monday, January 14, 2013

01_14_13

A few weeks ago I ran a crossed some awesome work by Greg Rassam a weapon and prop artist that worked on Far Cry 3.  In his art dump he shared some tips and tricks used to create great textures with-in tight constraints.  There are several ways to improve texture resolution without increasing texture size.  I'll just quote Greg, as he hit all the major techniques.

"Hey no problem
512 for fps weapons is small. As a result, the weapons have mirrored details 90% of the area, only key items are fully unwrapped. Lots of instancing here and there, for example, baking and texturing a single Picatinny rail notch and instancing it in the low res, and so on. 
Some barrels have quarter unwraps as another example. 

I could not afford too much of the adaptive UV shell size technique (closer polys have bigger uv shells), because of our dynamic cover system which shows the left, top, right sides of the weapon frequently.

The text on the bow is alpha floaters 

To help maintain sharpness on console I asked for a tiling spec mask that breaks up the main mask, among other material features but thats the most important. 

Speed up in low res creation not something mindblowing, just small tricks for really quick uv mapping, with the help of textools in the end. The instancing and mirroring ties into this. 
Also using viewport canvas to greatly speed up texturing, as well as setting up a max base mesh that would require the least amount of cleanup between your HR and LR, and learning to love (pro)boolean to create complex HR shapes."

Link to original post: Polycount Far Cry 3 Art Dump

On past projects: I've used instances on my models where it made sense and wasn't extremely obvious that it was duplicated.  Where appropriate, I would also, allocate more UV space to the most important parts of my models.  More UV spaces means more pixels!  However, One thing that I never did much of was mirroring UVs or quarter unwraps... so I decided to run some test to gain a better understanding of how this works.  Here are the results from my tests!


Cylinder baking test.  From the left: high poly, mirrored, quarter unwrap.  The low poly is an 8 sided cylinder-- hence the slight waviness at the bottom.


The UVs before being mirrored.  You do not have to move any UVs before baking in Maya, as long as you turn on 'ignore mirrored faces' in the transfer map manu.  The blue UVs are shaded showing they are facing the front direction.


Here's the same cylinder with a quarter unwrap.  Bake only this part... followed by duping the geometry and rotating it 90 degrees three times.  All the UVs will remain blue, as no geometry was instanced in a negative value.  Lastly combine your mesh and merge your vertices.  You could unwrap only an eighth if you wanted to with this technique.

Note:  You can not do a quarter unwrap and mirror in two axis-es before you bake.  Even if you turn on 'ignore mirrored faces' in the transfer map menu-- you will get undesired results-- they'll be the same as baking with multiple faces (stacked UVs) on top of each other.


So why would you ever mirror anything then?  This handle is a great example.  This test was mirrored before baking with 'ignore mirrored faces' on.  Notice the color of the shaded UVs... Half are blue and half are red.


If  you prefer, you could bake half of the model and mirror it after.  The results are the same.


However, if you bake half your model and rotate it and stitch it back together... you get something like this above.  From far away everything looks ok, BUT...


Upon closer examination you can see that the normals on the duplicated part are backwards.  The clue to this problem is in the UV editor.  The shaded UVs are all facing the same direction (blue), but geometry has been reversed.

You can quarter unwrap any geometry that has 2 lines of symmetry.  For example, this handle has one line of symmetry running along the z axis and one along the x axis.  To do this, only model and unwrap a quarter of the model-- then bake!


After baking, go to mirror polygon and select the appropriate axis and value.  You should notice in the UV editor that your shaded UVs are purple, half are blue and half are red.  Now select the mesh again and mirror the polygon along the second line of symmetry.  The UVs are now a darker purple in the UV editor.  There are four sets of faces stacked on top of each other, two blue and two red.


Anyways, this was a fun little exercise that help me better understand UV space and how normals work with duplicated geometry.  Hopefully I'll be able to create even more effective textures in the future.  Thanks Greg for sharing your work and helpful insights.