Sunday, 14 December 2014

Specialist 3D - Tank Uv'ing, Baking and Texturing

The Uv'ing Process

When it came to the uv'ing section of the project, i greatly underestimated the amount of props contained in the 36,000 triangle model and their general complexity. This meant that my uv'ing timetable set out within the gant chart was thrown entirely out. I imagined that the entire Uv'ing process could be finished within no more than three days but ended up spending at least a week straight simply projecting and attaching each face.





Every single modular component was planar mapped separately; projecting each viewable face at any given time e.g. projecting the front and back faces at the same time. Once these projections were done, the backwards faces could be flipped and the projection scaling within the channel editor could be set tothe same value throughout. This ensured that every component of the tank was uv'ed to perfect scale. For the most part i had to attach each face and sew every edge manually but the "Smooth Uv" tool came to the rescue in certain circumstances, entirely unfolding both simple and complex geometry with very little to no extra effort.

I found it to be much easier to simply project and construct each of these components before even considering organizing them within the uv square as i had very little to no idea just how many projections and components i would be left with. After projecting these surfaces and constructing the basic uvs, i could experiment with shaping, moving components with simple box shapes to provide me with a decent idea on the final uv outcome.




With all the uv's fully set out, i could check closely for stretching on any crucial component, ensuring that stretching was only present in areas that could be hidden quite easily through the use of weld marks within the texturing process. This stage felt quite rewarding as i could finally organize the uv sheet in preparation for the baking process. I attempted to place all texture seems across major welding marks in an attempt to make them reasonably easy to hide.





    The actual organization of the Uv's ended up being a fairly fast and effective process. Due to all the projection scaling, all i had to do was place the major components in a tetris style before adding the smaller components at as large a scale as possible. After each successful organization, i enlarged each of the key components before attempting to compress the uv sheet more and more. Eventually i was left with almost no wasted uv space and could begin the baking process.

Baking

Going in to the baking process, i expecting a very quick and effective process, baking out entire components before combining both the normals and ambient occlusion maps within Photoshop. I couldn't have been anymore wrong. Due to the complexity of the geometry within my scene, i was forced to export every tiny piece of geometry, one by one until there was no possibility of baking issues occurring and alongside this, i couldn't export any component as an obj as this became an unrecognized format within Xnormals which i decided to use for the baking process after Maya began "Fatal Error"ing each time i attempted an ambient occlusion bake.

 



I had to set the FBX export settings to "smooth mesh" and "triangulate" to even allow the objects to bake within the first place. On top of this, to export each object, i had to convert each piece of the high poly tank to "smooth mesh to polygon" separately before overlaying them perfectly with the low poly counterpart, making for a very messy and stressful process, especially with the hundreds of individual FBX exports that each needed baking. Without a fully fledged out file structure, this task would have been impossible.




When loading each low and high poly component in to Xnormals, i had to set the scaling to 100 times as i forgot to change the Maya grid scale before beginning the project, meaning that my tank by default was only the size of bread crumb. Although it is not essential, i decided to run the ray distance calculator on each low poly component to provide the best possible bake but this did increase the baking time and effort substantially. On top of this, i was forced to run a test bake on each component to look for issues before running the full 4k bake as these took upwards of a half hour each to complete, especially with the 4x anti aliasing.




After exporting each of these components, a lot of caffeine and almost overheating my computer in the process, i put the files in to a simple file structure with a folder for each key tank area and could then begin combining them within Photoshop.





The only way i could accurately combine each of these maps within Photoshop was to import each set of normals and ambient occlusion maps before tracing each component area wit the polygonal lasso tool. As i wished for this entire baking stage to be over and done with it, i completed the baking and map combining after a 20 hour straight work session although this did give me a fair bit of breathing room when it came down to deadlines.




Texturing
              
Texturing was the very final step to the tank asset's creation and became by far the most relaxing step as i could see the finalized product slowly coming together with each completed component. Going in to the texturing stage, i usually abandon all methodology and combine hundreds of base textures in different style,s turning the entire project in to a learning experience but due to the scale of a fully fledged 4k texture sheet, i was forced to develop a feasible and effective pipeline to carry me from start to finish.

With a little more research in to already existing pipelines such as the one used by "World of Tanks" and with a fair bit of trial and error, i found that i could create a nice, rusted/ damaged and spot welded surface using four layers on each component;

The first layer should contain only the base material/ the actual material you would expect to see on the materials surface before any wear and tear. For the most part, this was either metal tubing for pipes, heavily scratched metal blocks for tool heads or even corroded metal for areas such as the track pieces that need to reflect a horrifying amount of damage.

The second layer should contain the highlights such as paint splatters, surface damage, mould or even very slight rusting. This when set to an overlay should provide a nice result although as i found, due to the brightness of my ambient occlusion map, i had to tweak a lot of the hue/ saturation and lightness/ darkness values across both layers until a nice end product was created.

The third layer should contain extreme rust/ damage information, be placed over the first and second layers but using the eraser tool, the rust/ damage should be entirely removed from anything beyond sharp corners to provide a realistic rusting effect. Setting this layer to 70 percent opacity and altering its style to "soft light"provides the perfect rusting effect although the saturation and light/ darkness values need to be heavily tweaked depending on the base materials to prevent the rust from becoming overpowering.

The fourth and final layer will be the physical weld/ damage highlights. This is incredibly simple as all it consists of is an "inner bevel" layer style. Trace any hard edges, lower the fill to 40 percent and opacity to at least 60 percent and it'll really bring out each component. For more of a cartoon look, just adjust the opacity and fill values until you find a fitting result.

Using this four step system and a fully structured filing system, i managed to remove most if not all the stress and confusion from the texturing process.

     
 As you can see the system in action, i started with the largest components, tested a wide variety of base materials and then renamed them according to their most fitting use. To then prevent myself from losing these, i created copies and placed this within a "Base Texture" folder at the very top of my layers to make them easily accessible.





I played around a lot with different base textures for components such as the hatches and barrel components and found that a combination of paint chippings and a polished base metal could really make these features stick out with very minimal change to the work flow. After creating each of these components, i payed special care to the folder structures for each component so i could re-visit these in the future for either reference or to change texture/ lighting values.

    
By this stage, i had managed to create the vast majority of the materials excluding the track pieces using just a combination of eight textures, all with different lighting and saturation values, overlayed in the four step program as before but as components such a the tracks would be far rustier than anything else on the tank, i had to find a few new base materials to really make the corrosion stick out.




For the track and wheels, i found that the best combination came from a mixture of shiny base metals combined with metals corroded heavily by salt water to add a fair bit of noise and to really add some scratching to components such as the spiked cog, i could re-use the scratched tool metal to simulate heavy use. The only issues here is that due to the noise and darkness of the rust, it bleached out a huge amount of the track normals, ruining one of the best bakes of the entire model.


 
I found that applying two sharpen filters to almost every layer within the Photoshop file made up greatly for the lack of texture resolution on some components. This also made it near impossible to see even a single texture seem, making the entire model practically seamless. The final stage was the create a copy of the Photoshop file, flatten it and then to apply the Xnormals "Heigh to normal" option to turn all the noise in to a physical normal map. I could then overlay this with the original normal map and apply it to the final model.

All in all with all these maps applied to the model, im extremely pleased with the end result. I know it looks very bleak and probably requires a lot more colour but its probably the best end product i could have hoped to achieve with the time constraints.

I will need to tone down the Xnormals "height to normals" map before its portfolio ready and as i couldn't actually model the rest of the assets for the project i cant call the overall project a success. I have learnt a huge set of high and low poly modelling skills, increased my uving speed greatly, been given a greater understanding of baking techniques and developed an effective texturing work flow but these were only supposed to be side results. Without showcasing emotion or even dipping in to PBR texturing, the original project was derailed from the start.         

No comments:

Post a Comment