Hello my name is Petter Henriksson and I am programmer here. This devblog will be relatively short, we have a lot of stuff on our plates this close to release. Last week I and David Birgersson (Talented 3D artist) spent some time overlooking the metallic effect of Birds weapon, the magnet gun. The magnet gun is made of metal but we felt that the model was not reflecting a metallic look. The magnet guns shader was combining Parallax, Specular, Bump and Diffuse maps which isn’t enough for a solid metallic look.


The magnet gun at the beginning

We have just finished our glass shader using cube reflections to make it look realistic. Therefore we thought we would give cube mapping a shot to see what it could do for the metallic look. I threw together a quick shader that simply mapped a cube to the guns surface, distorting the sampling points with the guns normal map.



The effect of applying a cube map onto the gun.

It is hard to demonstrate a modern shaders look with only pictures since so much depends on the angle and surrounding lighting. Although the effect of the simple shader was weird looking, it was clearly metal and the direction we wanted to go. I combined the Magnet Guns old shader with the weird looking one and after a lot of tweaking we arrived at this result.



Combining the two shaders

What cube map we used made a world of a difference. We didn’t want anything to be clearly reflected in the gun but rather just little changes in the look when the magnet gun was moved. This is of course hard to show in pictures. We came to the conclusion that we wanted the cube map to be largely black with some unidentifiable spots in it. We ended up with the texture below mapped on each side of the cube map. This can of course be optimized but I’ll leave the details out of this blog.


Textures used in the cube map to achieve the metallic look (Credits to Carlbert Carlbert.deviantart.com)

Finally we applied a Fresnel rim effect which enhanced the look even further. The Rim light is however not affected by the lighting in the room which makes it look unrealistic in dark lit rooms.


Fresnel rim light makes the shinier parts look even shinier

During the process we tweaked a lot with some of the standard and physically correct ways of the shader techniques. We focused on what actually look good instead of how things are supposed to be done.

Progress 140708

Progress summary