PDA

View Full Version : bumpmapping in the darkness

zed
06-09-2004, 06:33 PM
Q/ a while ago on this forum was mentioned a method when the bumped surface is not exposed to the light ie dot(light,normalmap) is less than zero, so instead of looking dark and flat this surface still retains some bumpiness, if i recall there was a picture of the stanford rabbit with a bluish hue (on the dark side) does anyone have any links/info cheers
(i hope this makes sense)

Pentagram
06-10-2004, 02:28 AM
You probably mean "ambient cubemaps" or some variant (interpolating two colors, or two textures or whatever)
For cubemaps it works very simple, just do lookup in the cubemap based on the per pixel normal.
If you use a blurred or low-res cubemap this should give you some bumpy ambient color.

Charles

Lars
06-11-2004, 03:30 AM
You can also do a dot between the surface normal and the bumpmap in your ambient pass and multiply that with the ambient color. This is just a fake but gives you some bumpy detail in unlit regions.

Lars
(Edit: added the other side of the dot)

Tom Nuydens
06-11-2004, 04:17 AM
Originally posted by Lars:
You can also do a dot with the surface normal in your ambient pass and multiply that with the ambient color.Dot the surface normal with what?

-- Tom

dorbie
06-11-2004, 11:08 AM
:-)

Christian SchÃ¼ler
06-11-2004, 02:25 PM
Since most light comes from above, you might lerp between two colors based on the y component of the normal alone.

ambient_color = 0.5 * ( above_color + below_color ) + normal.y * 0.5 * ( above_color - below_color );

Humus
06-11-2004, 06:20 PM
Originally posted by Tom Nuydens:
Dot the surface normal with what?I assume he means dot(bumpmap, faceNormal);

Tomas
06-12-2004, 08:18 AM
Another way to go is to assign the ambient light a "pseudo direction". A suitable choice would be the direction of the sun since it is the main contributer of ambient light anyway. On backfacing fragments you then subtract the bumpmap dot the direction (or add, since this will of course be negative) times some constant (suitable values are about 0.4). This retains the creasiness of the backfacing surface pretty well. The technique can also be extended to work with shadows.

JustHanging
06-13-2004, 05:30 AM
Yes, only I suggest you use the negative sun direction, that that's where the most of the indirect light is coming from (unless it's cloudy), and it'll give you the nice backlight effect commonly used by traditional artists.

-Ilkka

mikeman
06-13-2004, 06:37 AM
I'm wondering why anyone hasn't mentioned parallax mapping yet.After all,it was invented by some guy who frequents these forums.

V-man
06-13-2004, 08:31 AM
You could just as easily reverse the light vector, reverse the half angle vector, do the dot product and scale it to a "low value".

You could divide by 10, for example.

vincoof
06-13-2004, 09:53 AM
parallax mapping works pretty good on textured objects, because polygons not facing the light still get rasterized with a distortion algorithm.
Problems :
- works best on 2D-textured objects, not to mention it works almost exclusively with 2D textures (not a big deal considering today's modeling techniques),
- needs texture-dependant read hardware (GF3/4Ti or higher, Radeon8500 or higher) for simple parallax mapping (only decal and lighting) and needs better hardware (GFFX, Radeon9500 and higher) for advanced effects (cubemap reflection, etc).