best method of bumpmapping?

3dcgi

Veteran
Supporter
I'm curious about everyone's opinion concerning the best bumpmapping method. I know Matrox's environmental bumpmapping was the best when it first came out (better than emboss), but what about new methods made possible with newer cards like dot3?

Matrox has an artist's tutorial for environmental bumpmapping.
http://developer.matrox.com/details.cfm?CFID=143824&CFTOKEN=8623750&s=docs&i=42

Can someone point out a good tutorial on dot3 or other methods?

edit: Does anyone know what method Doom III will use?
 
IMO, the best bump-mapping methods available in present-day hardware: dot3 for diffuse lighting, bump-reflection mapping (take the view vector, reflect it around a normal vector supplied by the bump map texture, then use the resulting vector to look up in a cubemap - the 'texm3x3vspec' instruction in pixel shaders v1.0+) for reflections and specular lighting. Both of these methods are based on standard lighting/geometric reflection models, unlike embossing and EMBM where you have to mostly rely on trial and error to get things to look 'right'.

You probably can't get much better bump-mapping than the methods above (except possibly for refraction effects); the natural next step is of course displacement mapping.
 
arjan de lumens said:
the natural next step is of course displacement mapping.

Which, of course, will not be sufficient without bump mapping. So dot3 is here to stay :)
 
Displacement mapping should not be used to replace bump-mapping at all IMO, bump-mapping was never really that good at showing off big bumps, which is what the displacement mapping should take care of. Dot3 should be used to get rid of the annoying everything-gloss-finished look in current games. At the moment, if light is reflecting off a surface in a 3D game it looks like some poor geezer has spent a week on it with his shammi-leather.

It should bring out the fibrous nature of cloth and the the roguh nature of stone - not the cobbles on a road or the lumps in a wall, thats displacement mappings job.

Dave
 
Dave B(TotalVR) said:
Displacement mapping should not be used to replace bump-mapping at all IMO, bump-mapping was never really that good at showing off big bumps, which is what the displacement mapping should take care of.
At the moment, fully replacing bump-mapping with displacement mapping will just result in far too many polygons. So for now, the optimal solution will be to combine them.
Dot3 should be used to get rid of the annoying everything-gloss-finished look in current games. At the moment, if light is reflecting off a surface in a 3D game it looks like some poor geezer has spent a week on it with his shammi-leather.
Sounds to me like the problem really is that specular lighting is applied to surfaces where it does not belong. Doesn't really have anything to do with dot3, except that the combination dot3+specular lighting (especially in the case where the bump-map is not applied to the specular highlights) just looks so glaringly wrong that developers will make an effort to avoid/fix it.
It should bring out the fibrous nature of cloth and the the roguh nature of stone - not the cobbles on a road or the lumps in a wall, thats displacement mappings job.

Dave
Agreed.
 
What kind of bumpmapping could be combined with displacement mapping?
And if yes, what would be ideal?
up
 
[snip]
Sounds to me like the problem really is that specular lighting is applied to surfaces where it does not belong.
[/snip]

No, that looks even worse, just look at a wall in any 3D game, its perfectly flat, perfect in every way in fact (though obviously not in 3D graphics terms). You just dont get walls like that anywhere in real life, I want random stains on it, missing chips out of it, I want that section of wall to look different to every other section of wall in the game.

That could be done with a ramdomly generated bump-map (say you have 16 256x256 b-maps for a brick wall, randomly combine them into a 1024x1024 b-map) and an extra texture layer depicting stains and what not.
 
"What kind of bumpmapping could be combined with displacement mapping?"

All methods.

"And if yes, what would be ideal?"

Depends on the surface, on water displacement mapping and EMBM could be very nice. Typically on non-reflective surfaces though it would be used best with dot3.
 
Dot3 and EMBM are just different. They are both called Bump mapping, but work completely differently. Dot3 does what it's name is, a dot product. EMBM does a basic dependant texture read. Nothing prevents a title from using both methods.

DOT3 is used for bumpy lighting calculation.
EMBM is used for bumpy relfection mapping.

However, as stated above, getting EMBM to work well would be difficult. An additional problem is that you can't use Cubemaps with EMBM. Dx8 Pixel Shaders 1.2 and above can be used to get around this limitation which should make it easier to create decent looking effects with EMBM.
 
EMBM has uses where bumpy cube reflection mapping (i.e. texm3x3vspec) isn't suitable. That method reflects from a point in the centre of a cube. Each cube face can be dynamically rendered, but the problem comes when you need to change the point of view along the same surface.

EMBM is almost necessary for water, unless it is infinite water like the pixel shader test in 3DM2K1. You need to render the world as seen from below the water, and make displacements due to the surface waves. With cube environment mapping, objects on the coastline would be all screwed up.

DOT3 is mathematically correct for an ideal surface, and can be altered a bit to match rough surfaces. However, you don't use it for reflections of the environment. Its just for shading due to lights. The dot product can also be used to texture lookup for other materials with different lighting characteristics.

In the end, there is no real best method. They all do different things, and are meant for different situations. EMBM for a ripple effect on a flat reflection, like water or a shiny, bumpy floor; DOT3 for shading due lights; and bumpy cubic reflections for reflecting the environment in arbitrary ways, provided the environment is far from the object reflecting it.
 
Dave B(TotalVR) said:
Dot3 should be used to get rid of the annoying everything-gloss-finished look in current games. At the moment, if light is reflecting off a surface in a 3D game it looks like some poor geezer has spent a week on it with his shammi-leather.
Ahh that'll be what the new DX9 Pixel shader "Chamois" instruction's for. Lops a week off the rendering time!

arjan de lumens said:
Sounds to me like the problem really is that specular lighting is applied to surfaces where it does not belong
Interestingly enough, even surfaces that you would think have no specular component can behave like mirrors when the angle gets fine enough (something to do with optics etc that I've forgotten since my Uni' days). For example a sheet of paper (or the skin of a banana! (yes, I just tried it)) will have mirror properties if you look along it with a grazing angle.
Of course, the simple optical models used for realtime graphics don't usually take this into account.
MintMaster said:
DOT3 is mathematically correct for an ideal surface, and can be altered a bit to match rough surfaces. However, you don't use it for reflections of the environment. Its just for shading due to lights.
...but you can use it to build the reflected viewing direction which could then be used for the specular component.
 
Simon F said:
Interestingly enough, even surfaces that you would think have no specular component can behave like mirrors when the angle gets fine enough

It's called the Fresnel Effect, and it takes place whenever light passes from one medium to another (e.g. Air->Glass). A proportion (which is dependant on the incident angle) of the light gets reflected which causes the mirror effect you describe. If the angle is grazing, then the proportion of reflected light is quite high.

Simon F said:
For example a sheet of paper (or the skin of a banana! (yes, I just tried it)) will have mirror properties if you look along it with a grazing angle.

I think (I could be remembering it wrong) that the material has to be a di-electric (glass, plastic, air, etc...) for this to happen. Conductors (metals) tend not to show this.
 
Simon F said:
MintMaster said:
DOT3 is mathematically correct for an ideal surface, and can be altered a bit to match rough surfaces. However, you don't use it for reflections of the environment. Its just for shading due to lights.
...but you can use it to build the reflected viewing direction which could then be used for the specular component.
When I said shading, I meant diffuse and specular. But its still shading, and the specular is only reflecting the light, not the environment. The other methods do a texture lookup to represent the environment.

Simon F said:
Of course, the simple optical models used for realtime graphics don't usually take this into account.

Actually, its quite easy to do this in real time. Even the Radeon's Ark demo has an example of doing this for the original Radeon. However, you may be right in saying developers usually don't do anything about this. Curse their lazy asses.
 
It's called the Fresnel Effect, and it takes place whenever light passes from one medium to another (e.g. Air->Glass). A proportion (which is dependant on the incident angle) of the light gets reflected which causes the mirror effect you describe. If the angle is grazing, then the proportion of reflected light is quite high.

Sounds more like total internal reflection to me, where the sin of the angle in question is the ratio of the refractive indices. At or above this angle the reflection will be 100%.


I think (I could be remembering it wrong) that the material has to be a di-electric (glass, plastic, air, etc...) for this to happen. Conductors (metals) tend not to show this.

It has to be transparent for TIR to happen and it can only happen at the boundary of high RI to low RI, so it will TIR when it goes from glass to air, never air to glass.
 
PSarge said:
Simon F said:
Interestingly enough, even surfaces that you would think have no specular component can behave like mirrors when the angle gets fine enough...For example a sheet of paper (or the skin of a banana! (yes, I just tried it)) will have mirror properties if you look along it with a grazing angle.

It's called the Fresnel Effect, and it takes place whenever light passes from one medium to another (e.g. Air->Glass). A proportion (which is dependant on the incident angle) of the light gets reflected which causes the mirror effect you describe. If the angle is grazing, then the proportion of reflected light is quite high.


I think (I could be remembering it wrong) that the material has to be a di-electric (glass, plastic, air, etc...) for this to happen. Conductors (metals) tend not to show this.
Ahh, now that does sound familiar. I think it's described in some old Siggraph "ray tracing" course notes I have at home. If I remember, I'll take a look at them.
 
AFAIK, the effect Simon F observed with the banana is something altogether different from the Fresnel Effect. As mentioned elsewhere, the Fresnel Effect occurs wherever there is a sharp transition between two transparent materials (It is basically the phenomenon that the ratio of light refracted to light reflected is dependent on the angle between the incoming light direction and the interface between the two materials).

I don't remember offhand the name of the phenomenon Simon F observed, but the theory goes something as follows: a matte surface (like paper, banana skin, rubber, etc) consists of large numbers of microscopic facets, each of which reflects light in a specular manner. When viewed from most angles, most of the facets will receive and reflect light, in sum scattering light (approximately) equally in every direction, thus producing diffuse reflection. When viewed from a very sharp angle, only the highest-placed facets will reflect light, and out of them, the ones oriented parallel with the surface at large will reflect the most light, thus giving a result that looks similar to specular reflection.

The effect can be modelled mathematically, and the resulting formula is simple enough to e.g. be put into a vertex shader program.
 
Dave B(TotalVR) said:
Sounds more like total internal reflection to me, where the sin of the angle in question is the ratio of the refractive indices. At or above this angle the reflection will be 100%.
That's another way. I think TIR stems from snell's law which describes the amount a ray is refracted when it moves from medium a to medium b. above a certain angle the ray doesn't make it into the second medium and just get reflected instead, much as you said. It's a sharp on/off thing.

Fresnels equations also use the refractive indices, but say that at each interface some of the ray makes it through and some is reflected. That ratio is dependant on the angle. more of a smooth transition. If you have it there's a good colour plate in the Advanced RenderMan book of two clay pots next to each other. One has fresnel based reflections on it and I think it looks a lot more "right".

I'm not really up on my optics but I think TIR can only happen when moving from a high refractive index to a low one (i.e. water -> air) (Edit: Oops, you already said that)
Anyway, both are effects should be reasonably easy to take into account.
arjan de lumens said:
I don't remember offhand the name of the phenomenon Simon F observed, but the theory goes something as follows:...
Hadn't come across that one. Sounds plausable though.
 
Back
Top