Jump to content

[SOLVED] Full-bright reflection issue


photo

Recommended Posts

Hi All !

 

We've just noticed a strange behavior using the 'mesh_reflection_cube_base' material: the reflected parts are always full-bright and are not affected by the light. Well to be precise, the reflected parts are sensitive to the specular but they are not darkened when no light hit the surface.

 

Here is a screenshot showing the issue:

 

post-583-0-08666100-1343235045_thumb.jpg

 

As you can see, there is one face of the building receiving some light (on the right) and the other one receiving no light (on the left) and therefore should be completely dark.

 

In order to have reflection activated only on windows, we are using a reflection mask texture which is actually put into the specular texture slot (yeah, the shader works like that) which may be part of the problem actually.

 

Another screenshot, this one has been taken with all lights disabled:

 

post-583-0-05477700-1343235965_thumb.jpg

 

Does anyone have run into the same issue? I guess the solution is to put the hands into the shader code?

 

Thanks a lot guys for your feedback !

 

Aless

Link to comment

Hi aless,

 

If you are not using dynamic cubemaps you could tie the material's reflection scale into the tracker timeline. We did this with particle effects too, since they don't darken when it becomes night time. Hopefully that helps and doesn't add any confusion! :)

Link to comment

Thanks a lot for your feedback !

 

Using a tracker is a nice idea but we still have the problem in day time when the sun light does not hit the surface (see the image #1).

 

Did anyone try to re-write the shader to solve this problem?

Link to comment

Alessandro, Windows with cube-map reflections indeed will not be dark: reflections are rendered during an ambient pass and after that during light passes, hence the result with bright windows.

 

To bypass this limitation and create a nice picture with such approach, you need to:

  • Make the cubemap darker (for example, via decreasing Reflection -> Scale or creating a darker cubemap). This way lit windows will still be bright, while non-lit (only with ambient pass) - darker.
  • Add an environment cubemap to avoid such contrast.

I hope this helps :)

Link to comment

Hi Manguste, thanks for the feedback!

 

Yeah we've tried that already, but unfortunately the result is not that great: on day time the reflection is not bright enough, and on night time it's not dark enough...

 

I was thinking about modifying the shader to make it react to the light. What if I do the reflection work in the Deferred pass instead of the Ambient pass, at the end of the fragment_base_deferred shader ? That would do the trick, am I wright ?

Link to comment

Alessandro,

 

How calculating reflection in a deferred pass would help? I'm a bit at a loss here.

Shader modifications will be requited indeed. Right now reflection_cubemap_base only redefines ambient pass shaders. You will need to define custom shaders for light passes: fetch data from a cube map and calculate lighting from light sources.

Link to comment
×
×
  • Create New...