• Advertisement
  • entries
    64
  • comments
    178
  • views
    110201

Playing around with environment/reflection maps

Sign in to follow this  

1296 views

Well, after struggling with environment/reflection map artifacts for some time now, I have found a solution. At least I'm quite happy with the results in my game.

The issue with environment maps is, that you need more or less exact probes of the surrounding in dark areas, which is quite difficult in my game due to its dynamic nature. Env-maps simulate the reflection of the surrounding, similar to the specular highlights of close light sources. The problem occurs when the environment is dark, while the env-map displays a lit environment and acts as a light source (especially when using HDR), in this case the env-map immediately catch your eyes.

gnoblins_env_comparision.png

You can take a look at the screenshot. On the left side the environment map on the test sphere and the bands of the barrels is clearly visible. My new approach is displayed at the right side, where it looks similar when the environment is lit and is more or less turned off when the environment is dark.

I'm using a deferred render engine, therefor I blend the environment only in when it is close to a light source. Additionally I modify the factor by the angle between the light source and surface normal to dim the effect on unlit surfaces.float normal_factor = dot(light_direction, surface_normal) * 0.5 + 0.5;float distance_factor = smoothstep(max_light_radius,min_light_radius, distance(light_position, pixel_position));final_light += env_color.rgb * normal_factor * distance_factor;
Sign in to follow this  


1 Comment


Recommended Comments

This looks great, We just fixed point lights for our system today. This could be good information for when we start the environment mapping part.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement