Hi ! For almost a week now, I've been working on an assault rifle for a game concept I have. And I'm finally done !
BASE - The idea for this weapon is to make a realistic looking assault rifle in a near future (A.K.A in 10 years or so). At first, I tried to reproduce a SIG 556 Classic Swat as a base to build on. In the end, it looks a bit more like a SCAR-H (but less bulky).
FUTURISTIC - I wanted to use paint as the main way to get a futuristic look, combined with some accessories. I also wished to make the magazine special, so it would be welded or screwed to the rest of the gun and a bullet belt would have been plug into it.
MODELING - This year in school, we learned Autodesk MAYA for building our levels... But I'd rather stick with Blender, because I know this software better and it is a lot easier to use (for me).
I made the rifle into 7 parts : the main piece (magazine and handle), the stock (which is foldable), the screen (also foldable), the foregrip, the sights, the battery and the flashlight. It allows me to turn on and off the accessories and keep a good texel size for the whole rifle.
Here are some screenshots in Blender of the process :
UV - For the UVs, I grouped all the accessories together so that I only have 4 textures in total at 2K resolution. The center, foregrip and stock each having their own textures. I have no idea if this is optimized but it seems good to me. I also scaled down some of the parts the player has trouble to see (the inside of the foregrip and vents).
In addition to that, everything is scaled so when I put everything in Substance Painter 2, all the smart materials are scaling perfectly all across the rifle.
EVEN MORE FUTURISTIC - The idea with the screen on the left side is that it's displaying the heat of the gun... To make the rifle look even more futuristic, I added some ventilation ! (I could have made a water-cooled gun now that I think about it).
I put openings on the magazine, you can even see bullets through it (in the Unity video). A vent is also on the main piece, above the magazine. It has a little hatch so it opens only when it's overheating. Finally, there is a little nozzle on the bottom of the magazine to release pressure and heat.
TEXTURING - I used for the first time Substance Painter 2 to texture this. I was very excited to try it out ! I combined smart materials and masking to get this result. I choosed to make it in black and white because it's clean and look futuristic. I reduced a lot the wear and tear of the white paint to give this new rifle look.
It took me 3 days to get this look. At first, the stock and bottom of the main piece were white, turning them to black made a very big difference ! There are also some shiny and chrome parts for the ejection and the magazine's nozzle.
BEAUTY SHOTS - Here are some beauty shots from the Substance Painter 2 Iray render (it has some problems, for example you might see UV seams on the black parts ; the problem isn't in Unity fortunately).
UNITY - Then, I import everything into my unity project. I decided to animate it and add some VFXs. I did everything myself, from the muzzle flash (32 different randomly combined) to the bullets. It took me roughly a day.
Here you can see that the bullets in the magazine are moving as the gun is shooting, bullet sleeves and smoke are ejected on the right side of the gun, muzzle flashes and smoke is coming out of the barrel (I did a lot of work analyzing how other games made their VFX and I also used some short movies VFX techniques).
I was very happy that, when you aim, you can perfectly see the screen ! It wasn't expected. I made two shaders to make the text and the slider on the battery glow a bit (thanks to the new bloom post effect in Unity 5.6).
Finally, there's overheating. The more you shoot, the hotter the magazine and the rifle get (you can see that heat waves are getting out of the magazine progressively as the gun is getting hotter). When the rifle is overheating you, can't shoot : the vent is opening to let all the pressure and heat out, the magazine's nozzle and the ejection are basically doing the same things.
Here are a video and a slideshow in Unity :
CONCLUSION - Obviously I did a lot of iteration this week. Going from testing in Unity to making changes on Blender. I was also using a high poly version of the mesh (which is currently 1,1Gb), so when I had to remake the foregrip or the magazine, I had 2 time the work.
I had to model the screws and bolts to the low poly geometry, not just as floating geometry on the high poly, otherwise it was way too flat.
I'm proud of the result, considering it's the first time I used Substance Painter 2, high poly models and textured PBR on Unity.