I have been dwelling on this question for about a month and I wanted to get your insight polycount. Why use a specular map when a reflection cubemap or realtime reflection with a map to blur certain areas based on value (white to dark) would possibly create a more realistic feel to the asset? Because I know that objects dont just shine with 'specularity', it reflects the lights and objects and colors around them and determines the shiny-ness by blurring that reflection based on material and surface. Is it just because of performance? Just wondering.
Replies
If a given engine uses cubemaps for reflections, you'd need two sets if you wanted to do both mirror-like reflections and "specular" reflections; one that's sharp and in focus, and another that's blurred to simulate reflections you'd get on a rough material. This means you have to either render two sets of cubemaps for every location in the game, or you need to render one cubemap for every location in the game and then duplicate it and apply some sort of post-processing to blur it.
On top of having to render two separate cubemaps, you'd need a shader robust enough to look up two separate cubemaps on the same material if it's on an object with two different material types, such as glass and brushed metal like you might see on a car. This means a larger number of texture lookups and draw calls, slowing performance. In addition, if you have a single object looking up two separate cubemaps, you also run the risk of having them interfere with one another and rendering badly.
Basically, it's a big ol' can of worms that isn't worth the effort.
in fact most deferred engines do this. it looks really nice and is better than the old school blinn spec. you dont have to render out separate cube maps because cubemaps have mips, if you want a rougher reflection force the shader to use a lower mip.
In older engines this could be a problem, but arshlevon's right. I was kind of spacing out about deferred rendering solutions and just generally having a rather derpy moment.
ME =
"actually i have worked on many games that use cube maps reflections for spec,and duffuse cubemaps for bounce lighting."
How would that be achieved in UDK? So I can try figure this all out .
http://zellersamuel.wordpress.com/2010/03/06/cubemaps/
Diffuse cube lighting is basically a quick hack to get soft ambient-style lighting, but it's very static, you need a new cubemap when your character goes inside for example.
UDK now has better more-accurate methods.
Commonly games do a planar kind of real-time reflection for stuff like water, and that's just one additional render.
If you look at 3 Point Shader, Toolbag, Xoliul's shader etc, this is how they work.
Using IBL isn't generally that much more memory, as ambient cubes are generally very small, like no larger than 32x32x6, and specular is generally fine no larger than 128x128x6, unless you need really sharp reflections for some reason. Generally, every shader in the game will share these textures, and the textures will be streamed in as you move about the level, so really do not have much of a memory overhead to use them.