Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would really like to get the same metallic reflection look as in CSR Racing for my game in the simplest way possible. It doesn't have to be top-notch, but right now my rendering looks horrible and is in need of some serious improvement. Metallic reflection rendering seems pretty complex (for instance looking at this), so I need some advice on what to try.

I realize CSR Racing renders using some type of environment mapping. Can I cheat using spherical env maps, or do I need cube maps? (Nonetheless I will use static images, it's too much work to generate on the fly, and I'll keep each level in the same "tone" so I think it will work well enough.) How should I map my UVs for the env map? Or should I use the normals? If so how to tranform 3D-normals to 2D? What texture transformation to use? I tried to use the camera transformation with the same UVs I'd have used for a diffuse texture (and using glEnable(GL_TEXTURE_GEN_S)), and there was some... result, but I think that's on the wrong track?

Do I need to use specular maps, even for a shiny, clean metallic surface? When I look at what specular maps are used for it seems like they hold information of what is matte and what is shiny. Any tips and tricks highly appreciated!

share|improve this question
Possible duplicate of… – msell Apr 1 '13 at 19:10
@msell: possibly, but I want to know if (and perhaps why) sphere mapping is out of the question. – Jonas Byström Apr 1 '13 at 22:20
Can you provide a screenshot of your current rendering? That would make it easier to give suggestions. – msell Apr 2 '13 at 4:53

The first thing you need to get into is that phong is not going to cut it. Phong looks nice on mostly matte objects, but once the shininess approaches perfect reflection it starts to look odd. One good model is for example Heidrich–Seidel shading equations.

The next bit is of course environment mapping. Either you build the env map on the fly or you use a canned cube map, but there must be something that reflects off the surface or it will look odd.

If you need specular maps depends on the object you want to model. If you object is uniformly "painted" you don't need a secular map. If your object contains other bits, such as rubber you may want specular maps. But in that case you want to use a totaly different material; one that uses for example oren-noyar shading.

share|improve this answer
I'm sure you're right about phong's shortcomings, but an example "before/after image" would really help to give some understanding. The wikipedia article you're referring to says Heidrich-Seidel is "phong based"; would I really be able to tell the difference, or is it just gfx-hifi-guru masturbation? – Jonas Byström Apr 1 '13 at 17:54
Actually no. As an example see the this image. The left is only only oren-nayar, the middle phong, and the right phong for diffuse and ward iso for specular. They use all the same env texture and same color. This was only a quick example in blender, but the shading does matter. – rioki Apr 1 '13 at 18:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.