Modeling a Gun With ZBrush, Maya and Toolbag

Modeling a Gun With ZBrush, Maya and Toolbag

Sahir Irfan talked about his nice Springfield XDM modeled within CGMA course Weapons & Props for Games.


Hey everyone, my name is Sahir Irfan.  I’m an Environment Artist currently working at Northrop Grumman under the title of a Multimedia Designer, supporting different projects with 3D environments, vehicles, and equipment.  Prior to this, I worked as a QA for ArtTools at NetherRealm Studios for Injustice 2. In between, I did some freelance environment art for a VR defense company and a Kickstarter game called Epitasis. I took the Vegetation and Plants for Games course and had a great time making a forest scene in an amazing learning environment.  I was getting feedback from Josh Dina on the project, and he pointed out that a way for me to break out more is to create weapons. Thus, when I saw that Ethan Hiley was teaching a class, I knew that I would be getting the best learning experience online while working full-time so I enrolled in Weapons & Props for Games.


Having several isometric views helps a lot by showing transitions between regions of the gun.  Researching a gun before doing the block out phase of the weapon definitely helps the animators when they get the mesh. Most importantly, I needed to be establishing different elements the animators would be animating.

An example is when a player fires the gun.  You have the slide coming back, with the chamber opening up and the empty shell ejecting.  Furthermore, there’s a slide stop that indicates when all ammo is used. For this weapon, there was no need to get into all those springs and components invisible to the player.  I knew the grip and front barrel area would be challenging shapes, so I made sure to get plenty of images for that. I also took note of the materials I wanted to have, including the different finishes of the Springfield XDM.

Working on the Block Out

When beginning the block out, it’s very important to capture as much detail as you can while not over-doing it. This isn’t going to be a high-poly asset, but it should be a place-holder that can be handed over to an animator or another individual to work with until the gun is finished.

I’ll keep my references open in PureRef to look at. While I’m in Maya, I’ll keep an image plane that holds a side view of the gun.  That way, I have an easy and quick reference to look at. To get the basic shape of the Springfield XDM, time and effort were spent understanding the shapes before crafting them. I would start with primitive shapes in a side view to capture the silhouettes before fleshing them out. I went ahead and modeled the inside of the slide where the bullet ejects, as well as having the barrel’s inside modeled.

After getting the gun block out completed, I moved onto blocking out the Reflex Sight.  Same process here: gather good references, set up the scene, and model while looking at the references. Studying my reference and modeling from those images yielded positive weekly feedback and necessary adjustments.

Achieving a High-Poly Look

The transition to a 3D high-poly look happens in ZBrush, with preparations being done in Maya. When modeling, I keep a copy of any Boolean shapes on a separate layer. This helps later on when constructing the high-poly.  I leave text and labels for Substance Painter instead of baking it in ZBrush.

Once the block out is done being modeled, I’ll go back and remove certain detail geo from the gun mesh. Below, you can see those indents and the iron sight hole removed, along with some other details.

Once I’m done patching up the base mesh of the gun, I’ll export it as one object and the Booleans in another object. In ZBrush, I import the files and split all the objects into their own Subtools. Then I’ll merge Subtools of the gun together and organize the Booleans accordingly.

For the high poly, the process can be quick if everything is laid out correctly in Maya.  Since I organized all my Subtools and I had the body of the gun set, all I have to do is just click “Live Boolean,” and the results are there.

From here, I’ll look at the reference and change things if needed.  When I’m happy with all Subtools, I use “Make Boolean Mesh”, following that with a high-resolution Dynamesh pass. Doing so retains a lot of my details and gives me more than enough resolution for the Polish pass.

The Polish pass is using the sliders in the Deformation section in the Tools.  These Polishing options give that nice 3D high-poly feeling to the bake while giving smooth transitions between surfaces and edges.

Once the Polishing pass is completed, I’ll use Decimation Master to get a medium res mesh that I’ll move back into Maya to build the low-poly.

Having these decimated versions will help determine what details need to be modeled in and what can be left to the textures.

It didn’t take long to crank out the low-poly.  Since I have a medium detailed block out, I could use that as a starting point.  I’d add or remove geo if needed and clean up any loose ends.

Having that block out from the start really helps out by letting you focus on the more important shapes. Even though the mesh is in a single layer, the animated parts are still kept separate, just like they were from the block out.


UVing a mesh like this involves thinking about how it will be seen in-game, planning what UVs to be mirrored, and UV Shell sizes. Stacking is important here since the gun will be seen in a First-Person View.  I needed to get the most out of my UVs to capture micro details and the lettering on the gun.

I never used Nightshade before, so unwrapping a complex object like this using Nightshade was recommended by Ethan.  It was a great time learning how it helps with the UV process. Orientating shells, establishing texel density, and adjusting normals were handled very quickly with the tools Nightshade comes with.

To make the most of the UV space, I moved identical parts on top of their respective shells.  I selected those overlayed UVs and moved them over to -1,1 space so they wouldn’t interrupt the baking process.  For the grip region, I kept the flat side without safety and slide stop-holes in the main UV space. That way later on, I could move the other shell on top of it and not lose any texture information in the holes.

Baking the Texture Maps with Toolbag

For baking the texture maps, the tool of choice was Marmoset Toolbag.  I didn’t know how great Marmoset Toolbag’s baker works! Ethan dropped a bombshell on me with this.  Using the Bake icon, you create a New Bake Group and use the Quick Loader to load in your high-poly and low-poly meshes.  If you have objects named properly, they’ll automatically be grouped up and put into sections for baking.

Once the assets are loaded in, I explode the parts and adjust the cages.  The control over these cages made me fall in love with the process. The control and working with the cage is easy and gives results quickly that you can preview with.

I set up my baking output maps and then quickly did a test of the mesh at half the resolution. After fixing things up, I went ahead and did a full bake. Below is an AO+Normal pass.

I spent lots of time and effort on getting the grip area right. Having those references and isometric images really helped me out.  I hit some bumps with the safety/slide stop, but Ethan would help me via email on my shapes and keep me on the right path with the individual feedbacks.

I wanted to texture this gun with a nickel slide and black body.  To make the gun more realistic, I spent lots of time in the roughness map.  This was something I often overlooked when making materials. Spend time on it!  Seriously, it makes a big difference.

Working with the roughness, I would take grunge/scratch maps via projection paint and add in details. I used different textures to add scuffs, holster wear, firing wear, fingerprint oils and lubricant around the gun. This was my favorite part of working on this piece. Just giving the texture depth.

I had some tiling and non-tiling stencils to use, so I just made it a habit to scan and clean up projection paints after every use.

I repeated the same process with the Reflex Sight.  The lens was done with a quick transparency material in Marmoset Toolbag before the renders.

Using Decals

For the details, I created a decal sheet from text and logos on the gun.  To apply, I turned on projection painting and used this decal sheet as an alpha.  Once the texts, patterns, and emblems were in, I would adjust the parameters in the layer to get something that felt appropriate to the references.

Taking Animation Into Account

I establish the parts that are needed for the animation from the research I did early on.  Because of animation plans, I also consider what will be visible during animations. With this knowledge, I keep those objects separate from other meshes. I’m also mindful of texture sizes, material counts, polycounts, and how all the moving parts are seen.


In the lighting process, I wanted to emphasize the roughness of the details. I started with a standard 3-point lighting setup, but it wasn’t delivering what I wanted.  I set up lights around the areas that held details and tuned the lights to make the details visible. Then I would jump to my render cameras to check the results, and tweak as necessary.  AO and Global Illumination were toggled on, with tweaking to other values.

I also used some DOF to draw focus to the areas I wanted the viewer to study. I kept the color schemes not too saturated but still containing tints of blue and light yellow. I took different renders and arranged all the images in Photoshop.

I tend to sit on my final images for a couple of days.  I do this so that I can study them for anything I would miss, or even if I like the renders at all. I took my time to do the same with the project, and after about a week, I published it to ArtStation.


Ethan Hiley has a teaching style that hits the ground running and I loved that.  His structure of the class was challenging and eye-opening. There were other students in the class who created beautiful weapons and watching them work motivated me to do better.  The confidence I got from this class was the biggest win for me. Weapons are such a tough subject, but with everything you learn from the workflow in the class, you can walk away with insightful knowledge on how to tackle complex assets in AAA studios.