Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!






Playing around with environment/reflection maps

Posted by Ashaman73, 18 January 2013 · 782 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.

Posted Image

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;





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.

December 2014 »

S M T W T F S
 123456
78910111213
14151617181920
21222324 25 2627
28293031   

Recent Entries

Recent Comments

Recent Entries

Recent Comments

PARTNERS