Important Message: The CG Student Awards is now officially The Rookies.

To find out more about this exciting news please visit our new website.

How to make a Photo-Realistic Nail Gun

Posted by on in Artists

My name is Christian Peck and I am an American texture painter and modeler. This is a breakdown for the first asset I did for my demo reel at Think Tank Training Centre in Vancouver, Canada. I will try to detail the most important parts of my workflow for the piece from beginning to end. The nail gun was a fun and challenging learning experience for me. It wouldn’t have been possible without my mentor Justin Holt and my fellow mentorship student Paul H. Paulino.

 

Concept

 

b2ap3_thumbnail_image10.jpg

 

 

After meeting with Justin, we decided that recreating an asset that I could physically handle and observe in reality would be the most successful choice. So I began hunting around thrift shops and antique stores around town looking for something that spoke to me. Eventually I found the nail gun buried underneath countless other tools in a tiny local pawn shop. The nail gun immediately resonated with me, its age and industrial design language drew me to it and it had a good variety of materials to replicate digitally.

 

Modeling

 

b2ap3_thumbnail_image11.jpg

 

Since I have the nail gun I planned to model on hand, I was able to use the schools 3D scanner to capture the guns forms and proportions.

 

b2ap3_thumbnail_image12.jpg

 

 

 As you can see from the images of the raw scan data, the geometry was very noisy and full of holes, making it impossible for me to do a simple retopo over. The scan was still very useful for me to fully understand the shapes of the gun and their relationship to one another. The greatest challenge of the model was to make the topology work across all the different pieces, since most of them are all cast as one piece. With some help from a very knowledgeable classmate, Matias Trinchero, I was able to make it all work as it does in real life. For the nails themselves, I modeled and UVed a single nail, then instanced it along a curve.

 

  • Texturing is by far my favorite part of the process and is what gets me the most excited.

 

UVs

 

b2ap3_thumbnail_image13.jpg

 

Once I was happy with the model, it was time to unwrap it. From the perspective of a texture painter, proper UVs are essential to produce photo-real results. In order to get proper UVs, I needed to determine how close the camera will ever get to the model. This is so I have adequate texture resolution in the various maps I'll be painting. The general rule for film work is that there should be double the output resolution of the piece in texture resolution. It's also important that there is uniform texture resolution across the entire model, except for very small pieces such as screws.

 

RELATED: Making of "The Beast" by Javier Blanco

 

Another important factor I had to consider was making sure I didn’t get any stretching.  A texture will stretch around a hard edge if that seam edge isn't reinforced properly. Preventing this took a combination of adding extra support edges around certain seams, and choosing my seam edges wisely.

 

After all was said and done, I wounded up with 39 4k tiles. This may seem like overkill, but it was necessary to maintain texture fidelity at the camera distance I wanted for some of the shots. Since I textured the gun in MARI, seams weren’t an issue. Even so, that much data was a lot for me to contend with.

  

Texturing

 

All of the texture work for the gun was done in MARI. I love to texture in MARI. It allows for such creativity to build up complexity in the textures. Texturing is by far my favorite part of the process and is what gets me the most excited.

 

  • I believe the glossiness map is what can take a piece from very good to photo-real.

 

 

a1sx2_Thumbnail1_image00.jpg

a1sx2_Thumbnail1_image02.jpg

 

I also took a lot of reference photography to see what I would be able to project onto the model. When taking photos for projection, it’s important to try and keep the f-stop and shutter speed as high as possible for flat images that project easily. For those of you who know basic photography, you’ll know that this requires a lot of light. I also used a polarized filter to get remove some of the specularity.

I also projected all the lettering and labels on the gun from hi-res photos I took.

 

Edge Mask

The first thing I did before jumping into MARI was to bake out an edge mask in ZBrush. I generated the mask using ZBrush’s mask by smoothness function. I used the edge mask throughout most of the maps for the gun. Darkening the edges of metal objects in the diffuse and specular maps really adds to the overall realism, it’s something our eye perceives as authentic. I also used the mask to begin generating the dust in the smaller nooks and crannies.

 

a1sx2_Thumbnail1_image01a.jpg

Paint Mask

I wound up using most of the projection photos as references and built up the textures from tileables and projections of some of the textures in the library I’m building. I was, however, able to use the photos to get most of the mask for the gun’s yellow paint. I projected the parts of the paint that I could get a clean photo of and used MARI’s Color to Mask adjustment to create the mask. For the parts that I couldn’t project, I hand painted to emulate the way they look on the real gun.

 

a1sx2_Thumbnail1_image03a.jpg

 

 

Diffuse Map

The first texture map I painted was the diffuse. My philosophy for the entire project was to take it one piece at a time. I started with the base metal. First, I found a tileable metal texture that I felt had similar broad color break up to that of my nail gun. Then, I built up complexity by blending in textures witch scratches and scuffs that fit the look of the actual gun. I repeated this process for each material until I had built up the entire diffuse map.

 

a1sx2_Thumbnail1_image04.jpg

Specular Map

Once the diffuse map was finished, I duplicated it and began to convert it into a Specular Map. The first thing I had to do was to delete any color correction layers and add a luminance layer on top of the layer stack. Then I went through layer by layer to bring out the best range in value that I could. Once I applied the Spec map to the model in Maya, I had to make some final adjustments to the map.

 

a1sx2_Thumbnail1_image05.jpg

 

 

Bump Map

The first step I took when I started the bump map is to change the background to flat 50% grey in the display properties. The 50% grey background allowed me to very quickly see how far my details are bumping in or out by how much darker or lighter they are relative to the background. I broke my bump layers up into 2 categories, macro bump and micro bump. The macro bump consisted of details that are clearly observable; deep scratches, dings etc. Building up the macro bump details was a matter of finding textures that I could adjust to create the same look and feel of what I can see on the gun. The micro layers consisted of textures that barely deviate from 50% grey and are very hard to capture. In my opinion, this kind of micro bump helps the specular highlights look more believable.

a1sx2_Thumbnail1_image06.jpg

Glossiness Map

The last map I painted was the glossiness map. I believe the glossiness map is what can take a piece from very good to photo-real. Our eyes are very good at spotting variances in the specular highlight of objects, and having a robust glossiness map can help to ensure your work is believable. I kept my glossiness map very broad and didn’t recycle any of the textures from my specular map. This breakup goes a long way to break the “CG look” renders would otherwise have.

a1sx2_Thumbnail1_image07.jpg

 

 

Lighting 

Initially, I used simple studio HDR images to do the preliminary look dev. After I was happy with the shaders, I moved on to create my own studio light set up using the open-source sIBL LightSmith from HDRlabs. These lights have target locators on them making positioning a breeze. The lights are also textured which gave me more believable reflections in my shaders.

 

a1sx2_Thumbnail1_image14.jpg

  

  • The general rule for film work is that there should be double the output resolution of the piece in texture resolution.

 

Nails

 

For the nails, I created 5 nail shader variants for each of the texture map variants. When I was doing the initial assignment, I put easily distinguishable flat colors in the diffuse channel. This made it very clear to what nails each shader was assigned. Then using a simple MEL script I assigned a random nail shader to each nail. After I ran the script I went in and reassigned any nails sharing a shader that were adjacent. After I was happy with how each material looked separately, I brought them all together and made slight changes so they sat together believably. It took a lot of trial and error, but eventually I got a result I was happy with.

 

a1sx2_Thumbnail2_image09.jpg

 

 

Rendering

 

I rendered the nail gun using Chaos Group’s V-Ray. When I started the look dev, I tackled each material separately. I found that even though it can be time consuming, it’s important to try and limit the changes you make between each render. If you make too many, it can get difficult to tell which changed caused the change you see in the render. I was able to take advantage of the addition of the GGX BDRF type in V-Ray 3.0 for the metal materials of the gun.

 

b2ap3_thumbnail_image16.png 

 b2ap3_thumbnail_image15.png

Closing

 

That wraps up the major landmarks of my workflow to create the nail gun. I tried to focus the bulk of this breakdown on the areas where I had to spend the most time and I hope you find it helpful. I want to thank Justin Holt and my friends here at Think Tank, without whom this project would have been impossible.

I also want to thank the CGSA for the opportunity to share my process!

 


Christian Peck

 

Javier Blanco has created an incredibly detailed breakdown of the creation process for his very first demo reel piece at Think Tank Training Centre, with Chris Nichols as my mentor. Javier tells us it...
Adrien has created a detailed breakdown of the creation process for one of the environments for a short film called Initium, Adrien was one of a team of students from ArtFX in France to complete ...
My name is Tuna Unalan and I am a CG Generalist with a concentration in lighting, rendering and look development. I am a recent graduate from Savannah College of Art and Design. I will be explaining m...
blog comments powered by Disqus