PDA

View Full Version : What should a reflection map look like ?


maurice2
06-29-2005, 06:44 AM
I have read in many places that specular lighting is really a cheat and that the correct method is with reflection maps. From lack of experience, I'm not clear as to what a reflection map should look like and wonder if a kind soul could set me straight.

For arguments sake, suppose my scene is a cube and a sphere separated by a comfortable distance; the camera is on top of the cube with its target at the centre of the sphere, so we have a picture of a sphere. Intuitively, the reflection map of the sphere is a picture of the cube (the sphere's view of the world looking back towards the camera). Is this correct? Is it a BW image? If so, contrasted or grey-scale?

Thanks in advance

leigh
06-29-2005, 06:55 AM
A reflection map generally looks like a specular map, except usually darker (or lighter, depending on how the software you use interprets the values).

You're confusing reflection mapping with an environment map :) The reflection map is a map that defines the amount of reflectivity that the surface has, not what the surface reflects. Raytracing takes care of what the surface is reflecting :)

maurice2
06-29-2005, 07:10 AM
Thanks for the super-quick reply.

Yes, I haven't got all these maps figured out. Damn. Now my problem is: what should a specular map look like?

I think I'm going to have difficulty grasping this concept without an example. Is there a well-done scene somewhere, with all the map slots correctly filled out, to understand how the all the pieces fit together? Surely somebody must have done a simple cube+sphere scene and textured+lit it professionally?

leigh
06-29-2005, 07:31 AM
I used to have an example of all the maps on my website, but those pages are currently offline. Here is a pic from an article I did for 3D World magazine that shows the different maps for the rendered sphere shown (from top to bottom: colour, bump, reflectivity). The small texture swatches applied to the sphere were simple examples of the maps created for the entire car shown.

http://leigh.cgcommunity.com/temp/carmaps.jpg

As you can see, with specular/reflection maps, the shades of gray determine the strength of the reflectivity. With some renderers, white means 100% reflectivity and black is 0%, while other renderers switch that around. But the fundamental concept still applies - the varying shades of gray define which areas are more reflective, and which aren't. In this image, the reflection map has no reflectivity in the areas that are rusted (since rust isn't really reflective), with the scratches having a slightly lower level of reflectivity compared to the rest of the paint.

Does this help to explain it? :)

maurice2
06-29-2005, 02:46 PM
Wow, that's breathtakingly realistic, more than I had bargained for, a picture is worth a 1000 words and I had to study it for a while.

Let me see if I've understood how you did that (I'll use 3DS+MR terminology, it's all I know):
1. The black on the bump map 'lowers' the rusty scratch into the surface, the corresponding area in the reflection map makes the rust less reflective (and more colourful).
2. Your diffuse colour map is (let's say) 80% and the reflection map is 20% (or some such combination which adds up roughly to 100%).
3. You have no specular highlighting at all (in sense of turning up the specular/glossiness controls), the gentle speculars at the strong curves in the bodywork are simply the lights reflecting in the smooth-grey part of the reflection map.
4. There is a roof-light above the car and to its right. This is implemented either by being really modelled or by a global environment map which is a fish-eye picture of such a roof as seen from below.
5. Because of 4 there is no (need for) environment maps in your materials.

6. Thus, if I'm modelling an unblemished material, the reflection map initially just needs to be a certain % of smooth grey. I add scratches etc. by drawing dark areas, they'll usually need to be added in the bump map too.
7. It's sometimes acceptable to use the same picture for bump and reflection, with appropriate changes in their respective %?
8. Pushing that further, is using the diffuse map for bump and reflection, at least in a first iteration, an acceptable practice?

Sorry for all these dumb questions, I really appreciate your help :thumbsup:

bjorke
06-29-2005, 05:35 PM
I have read in many places that specular lighting is really a cheat and that the correct method is with reflection maps.Yes, just like the real world, which is surrounded by a giant skybox :)

There is no "correct" method, they are all cheats. That's an important point to remember, & often forgotten by over-zealous TD's. But whatever gets your shot approved today: that is the correct method...

Environment maps are usually drawn as six square faces of a cube, but may sometimes look like a super-fisheye distortion (there are tools that can convert between the two forms).

leigh
06-29-2005, 06:01 PM
Let me see if I've understood how you did that (I'll use 3DS+MR terminology, it's all I know):
1. The black on the bump map 'lowers' the rusty scratch into the surface, the corresponding area in the reflection map makes the rust less reflective (and more colourful).

Yes, exactly :) It is important that your textures in your different surface attributes correspond to one another in this fashion.

2. Your diffuse colour map is (let's say) 80% and the reflection map is 20% (or some such combination which adds up roughly to 100%).

Yes, this prevents the surface from becoming overblown. Basically you can simply invert your reflection map for this purpose.

3. You have no specular highlighting at all (in sense of turning up the specular/glossiness controls), the gentle speculars at the strong curves in the bodywork are simply the lights reflecting in the smooth-grey part of the reflection map.

Yep! This is all reflectivity, no specular whatsoever.


4. There is a roof-light above the car and to its right. This is implemented either by being really modelled or by a global environment map which is a fish-eye picture of such a roof as seen from below.

I think this render had a pure HDRI-based environment for the lighting, which had a strong hotspot in one area.

5. Because of 4 there is no (need for) environment maps in your materials.

Yes, the environment map was applied to the entire scene.

6. Thus, if I'm modelling an unblemished material, the reflection map initially just needs to be a certain % of smooth grey. I add scratches etc. by drawing dark areas, they'll usually need to be added in the bump map too.

Sometimes scratches actually increase reflectivity - it depends on the surface. But you have the right concept - when creating my Photoshop files, I usually create all those different details on different layers, so that I can adjust them independently and carry them over to each of the appropriate attribute textures. A scratch also affects the bump map as well, yes. But sometimes a detail, for example fingerprints, will only really affect the reflectivity and not really anything else. It really depends on the type of detail and the type of surface :)

7. It's sometimes acceptable to use the same picture for bump and reflection, with appropriate changes in their respective %?

It really depends.

8. Pushing that further, is using the diffuse map for bump and reflection, at least in a first iteration, an acceptable practice?

Again, that really depends on the surface at hand.

Sorry for all these dumb questions, I really appreciate your help :thumbsup:[/QUOTE]

Anytime, that's what I am here for :)

Bjorke does bring up a good point though - just because specularity is a cheat, that doesn't mean that it shouldn't be used. It certainly has its uses. I just wouldn't use it for "hero" objects and such in my work, when the object will be seen right up close and needs absolute realism :)

maurice2
06-30-2005, 03:05 PM
*bows respectfully*

Many thanks to you both, I have a much better understanding now.

Leigh: I found & read your materials tutorial, a delight which I shall be re-reading until it all sinks in.

Bjorke: A valid point, compromises have to be made when you have deadlines or money to earn. (Un?)fortunately I earn my money elsewhere and 3D is just for fun; I also a bit of a purist, so I now can enjoy the luxury of ignoring specular lights forever (I am long past the age of learning more than is strictly necessary to achieve my ends :wise:).

An excellent weekend to you both :thumbsup:

CGTalk Moderation
06-30-2005, 03:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.