• Register

Magnetic: Cage Closed is a physics based puzzle game with infinite possibiliteis

Post news Report RSS Magnetic Development Blog Five - Magnet Gun goes Metal

It's time for our fifth development blog! Sorry for the delay, but we've had a million things to do with the game and therefore the development blog was pushed aside. Anyway, this time, one of our programmers will talk about his work with making the primary tool in Magnetic: The Magnet Gun to look more metallic with the use of shaders and different maps from our 3D-Artists.

Posted by on

Hello my name is Petter Henriksson and I am a programmer here at Guru Games. This devblog will be relatively short, we have a lot of stuff on our plates this close to release. Last week me 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 weirdlooking 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.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: