Hi again people! We're again in need of a little help deciding on something!
This time is about
reflection maps:
What is you experience with them, How do you use them?
What type of reflection map do you use the most? (there are dozens of types)
How do yo usually mix the reflection map with other shader components (ie: diffuse)?
Basically any info you want to share would be helpful!
Thanks in advance
Daniel S
p3d.in (
View in 3D)
Replies
As for mixing it, cubemaps can generally be set as an emissive texture. For metalic/conductive objects the usual tricks apply; you tint the reflection by the diffuse like you would the specular (so if the diffuse is red, then the reflection should be tinted red). For non-conductive objects, the opposite is true, and you tint it by the opposite colour of the diffuse.
Also, disabling Mips is a bad idea, since many people will rely on using the lods of the cube to fake the 'blurry' reflections you come to accept out of certain materials, if your cubemap has seams, it's due to lack of padding or engine issues which you need to manually fix, such as those of UDK for example.
You don't set your cubemap as emissive since it will override all diffuse and specular information, the very few times you do set your cube as emissive are when you're displaying an outside scene, especially if you're using your traditional cubemap method which extends to infinity, and the material in question doesn't require any type of diffuse or specular information and you're trying to fake radiosity, but that will require an SSAO solution ontop of it.
Most of the time, the reflection will be additive ontop of the diffuse alongside the specular (especially in anisotropic cases where highlights are different to the reflection in question), especially in cases such as box-reflection, where it doesn't extend to infinity.
As for the tinting of color, you need to take care, since Gamma correction should be taken into consideration as that will affect the final outcome and what kind of material you're making (especially if the material is multi-layered, stuff like skin is white or pure reflection color since you both have conductive and non-conductive layers on your skin which negate themselves hence why adding solves alot of these issues for physically correct shadowing from the lambert term).
In most cases however, reflections shouldn't be even tinted if the material is setup properly, alot of cars for example have fresnel doing all the magic, and what seems like lack of reflection being overpowered by the diffuse color is simply a simple reflection which is losing it's definition infront of you, but having a high glancing or directional glare back at you from an angle, or if you have the extra space and are using an RGB specular map, marry that with your reflection instead.
How much variety do you think there is between different cubic map formats? At least being actively used by artists?
Cheers!
Fresnel is a function that describes how reflective is a surface based on it's incidence angle. It will be used in this case to multiply the reflection map before it is added to the shader
Or if I look at cars and metals in general, it also does that. I can't find an example where you'd want the reflection to be masked by a fresnel.
I would like to ask to keep this thread on-topic please. We really need feedback about this from people who actively use reflection maps in real time engines. In my line of work i use reflection maps a lot but offline renders are quite different (and more flexible). In my case I use equirectangular, spherical and mirrorball maps the most. I've never used a cube map in my life!
Thanks all for the help, please keep it coming. As usual I'm looking into the most useful situation to solve first, while looking to expand into more possibilities in the future.
Daniel
p3d.in
There's a lot of things if you look at it at extreme angles its reflective, even things you wouldn't expect like roads and bricks, sadly this is the best example I can find right now
http://www.carlespiles.com/artwork/431-2/