Jump to content
  • Advertisement
Sign in to follow this  
Gammastrahler

Simulating Metal?

This topic is 5122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i want to simulate metal material in my FPS engine. Until now, it looks very good with specular fragment lighting, but the metallish look should be more convincing. so i have to add reflection. but environment mapping is not an option, since i want to apply the reflection to planar surfaces. using a reflection texture or stencil reflection does not make sense as they provide only static reflections which change with the eye position. but i want dynamic reflection. is there another way i could realize that? thanks for any help in advance! Gammastrahler

Share this post


Link to post
Share on other sites
Advertisement
I saw one technique where a render to texture was used from the position of the reflector and very wide FoV in order to create a dynamic reflection texture which you then applied to the metal. I don't know how well it would work in this case. I believe this particular technique suffered from problems of low resolution in the final map, so it might not be appropriate for large surfaces.

(P.S. I hate the JHU network.)

Share this post


Link to post
Share on other sites
Quote:
using a reflection texture or stencil reflection does not make sense as they provide only static reflections which change with the eye position


that's not true, if for you, dynamic means that moving geometry or shaders will be correctly reflected.
both can handle perfectly dynamic scenes...

Share this post


Link to post
Share on other sites
I tried reflection in my engine, but because I have so many flat surfaces, it really didn't look good at all, so I decided to change the specular bump mapping effect instead to represent metal.

One of the things metal does differently than plastic is that it reflects its own color, not just the light color itself ( as phong lighting does by default ).

What I do to get this effect is something like

specular = ( normal dot half_angle )^1.5 * light_color * specular_factor * 4.0;

The x4 is sort of a color shift. The idea is if you want blue metal, you make your specular_factor color 0.25, 0.25, 1.0. This way it takes any blue in the light color and amplifies it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!