Simple BumpMapping Question

@vincoof : I guess I did not made myself clear. My point was to show that given this bump map resolution, to have an equivalent lightmap for the whole non-flat terrain would need a super high resolution.
As you can see on some of the earlier shots, there is no way to just tile a lightmap of the same resoluion as the bumpmap and hope to get the same effect.

@JanHH : I agree that specular lighting makes the difference between (static) lightmaps and (dynamic) bumpmaps. However, you’re not likely to generate a specular map for a whole terrain. It’s already a hard task to make a diffuse map for a large area.

@ZbuffeR : Because normals over a terrain are pretty similar, it is not a great loss to approximate overall lighting with some tiled texture built for an “average” normal direction. In essence, 3D objects like characters or vehicles can’t be reasonably approximated by such “overall normal” vectors, but terrains can (especially digital elevation models, i.e. terrains without overhangs).

I’d also choose detail color textures over bumpmaps for terrains. As it’s been pointed out, you can achieve almost the same result with them. You can also add color variations to your detail, which you can’t do with bump maps. Besides, while blending several color textures together is fast and easy, you can’t really say the same about bumpmaps.

It’s also worth noting, that while it’s easy to extract color textures from photographs, it’s very difficult to get bumpmaps from them. This will make a huge difference if you’re trying to create something realistic, creating realistic stuff with the current per-pixel lighting standard is a rare skill.

-Ilkka

As a last note, I can’t stand how http://de.geocities.com/westphj2003/b.jpg shows the efficiency of bump maps. This picture is a combination of two maps : a low-frequency map (colormap or lightmap) and a high-frequency map (the bump map). The same thing could just happen with detail map replacing the bump map.
Except for 2 things.

1: I don’t have to write any code to get sun movement to work perfectly.

2: If I later decide to add additional lights, I don’t have to do anything except use the bump map I already have to do more lighting computations.

The bump map approach is, not only the more physically correct solution, it is also the more general one. It works, 100% of the time, with no external hacks, for anything I want the terrain to do. Sure, I have to add a few more opcodes to the fragment program, but I can definately live with that.

I’d put a check in the bump mapping column as well. Why would you make the distinction between the terrain and a wall in a dungeon? They will both benefit from bump mapping, and for the same reasons. If you are limiting the the terrain to only one static directional light, it’s not going to be very interesting, IMHO.

It seems that this discussion became a little hair splitting (is this the correct word for it?)… I simply said “we added bump mapping and it looks much better than without”. I did not say that bump mapping is better or an alternative to a color detail map (in fact, my engine offers the possibility to add a second color map), it is simply a good thing to have. Even if it is in the engine, you still do not have to use it if you don’t like it, and it does not cost any performance at all (a little bit but as there are other things in the scene, such as buildings, trees and sky, it is negletable).

And I still think that it is a very easy way to get the terrain to look more realistically “rough” with such simple means (simply adding two textures, both of which were not taken very much care of, in fact both were automatically generated without much love and affection). Also, the way the bumps interact with the terrain at rather steep parts give a very interesting, quite realisticlook which can certainly not be acquired with a color detail map, at least not without a lot more work.

To make clear what I am talking about, I have drawn red boxes around the parts of the picture that show the effect that I am talking about. Pls have a look:

http://de.geocities.com/westphj2003/red1.jpg
http://de.geocities.com/westphj2003/red2.jpg
http://de.geocities.com/westphj2003/red3.jpg

Regards,
Jan

The bump map approach is, not only the more physically correct solution, it is also the more general one.
If you consider computing a real tiled lightmap for the decal texture, lighting model can be much more advanced that a simple dot product bump mapping provides.

Sure, I have to add a few more opcodes to the fragment program, but I can definately live with that.
Not to mention performance issues, you’re limited to the number of lights.
Actually it’s pretty easy to setup bump mapping for one light on almost every hardware since GeForce 1, but when it comes to deal with more lights things get much harder and slower, when it even works (you’ll hit the shader limits if you consider too many lights casting bump mapping).

Why would you make the distinction between the terrain and a wall in a dungeon?
Because you can approximate terrain lighting with a decal map with almost no loss. Dungeon can’t be approximated with such lighting because normals vary too much. And while you point that terrain lighting and dungeon lighting will differ too much, I invite you to test it by yourself.

It seems that this discussion became a little hair splitting (is this the correct word for it?)… I simply said “we added bump mapping and it looks much better than without”. I did not say that bump mapping is better or an alternative to a color detail map (in fact, my engine offers the possibility to add a second color map), it is simply a good thing to have.
couldn’t agree more about the ‘best solution’ debate.
I’m not telling you never to use bump mapping for terrains. As I stated above, there are some cases where bump mapping will be better. I just tend to recommend decals which IMHO look very similar to bump mapping (sometimes better, sometimes worse, depending on the desired effect) but are much easier to use and renders much faster than bump mapping.

If you consider computing a real tiled lightmap for the decal texture, lighting model can be much more advanced that a simple dot product bump mapping provides.
But, again, only for one light. I would prefer to have 2-3 dynamic lights possible than 1 light that looks better, but requires a lot of engine code in order to make the sun move.

Not to mention performance issues, you’re limited to the number of lights.
At least they are dynamic lights, rather than static ones.

Besides, generating a bump map is easy/trivial. Just do some fractal height generation on your terrain, and read back the normals.

Because you can approximate terrain lighting with a decal map with almost no loss.

Perhaps this is true with a single static light, but not for multiple dynamic lights, which was my complete thought. If you’re looking for a uniform lighting model, decals are not going to give you the most consistent results, IMO.

And while you point that terrain lighting and dungeon lighting will differ too much, I invite you to test it by yourself.

I’ve been using decals, and countless other hacks on my terrain for the last 4 years. Now that bump mapping is practical, I am going to use it. :cool:

But, again, only for one light. I would prefer to have 2-3 dynamic lights possible than 1 light that looks better, but requires a lot of engine code in order to make the sun move.
And, again, it’s just a matter of preference :slight_smile:
It depends on your willing/ability to integrate per-pixel lighting in your engine, on your willing/ability to render fast on every hardware, it also depends on the world context. Many games don’t move the sun for instance.

If you’re looking for a uniform lighting model, decals are not going to give you the most consistent results, IMO.
Do you know of any engine that ensures uniform lighting across terrain and objects ? Even the “I-can-do-everything” Unreal Engine 3.0 seems to use different rendering paths for objects and terrains.

I’ve been using decals, and countless other hacks on my terrain for the last 4 years
Not to start a troll, but please stop reasoning with “hacks”. Everything is a hack in computer graphics.

vincoof: If you want to use a light map with such a fine granularity as the bump map in my screenshots for a terrain with a size of 2000 x 2000 m, how large should that be?

I am NOT using a bump map which is computed from the terrain data in a sophisticated way, it is in fact a simple color texture showing grass converted to a bump map with the gimp plugin to make the ground look more rough. As I said, much gain for only a little work.

in terms of lighting models in general, I think neither bump mapping nor lightmaps are the best solution (again, lightmaps have to be very high resolution, or there have to be quite a lot of them), we decided to add perspective shadow mapping, I think this will be much better :wink: . Pixel perfect shadows that do not only appear on the ground, but offer a realistic shadows of all things in the scene on all other things in the scene.

Performance is not really an issue I think, as our current rendering engines run smooth on our current hardware, and next generation hardware is much faster, so we can add fancy things and it will still run fast enough.

The best I can imagine at the moment would be ppl/bump mapping implemented as deffered shading, combined with a perspective shadow map for each light source, although I don’t know if that is even possible on current hardware, but that’s what I am looking forward to for my engine.

Originally posted by JanHH:
vincoof: If you want to use a light map with such a fine granularity as the bump map in my screenshots for a terrain with a size of 2000 x 2000 m, how large should that be?
Something like 256x256 :slight_smile:
I mean tiled lightmap of course, that is a decal map. Sorry, I agree the ‘lightmap’ term is too confusing in this case.

Do you know of any engine that ensures uniform lighting across terrain and objects ?

Yeah, mine. :cool:

Not to start a troll, but please stop reasoning with “hacks”. Everything is a hack in computer graphics.

Thanks buddy, I’ll try to keep that in mind. But I think it was clear from the context that the term “hack” was in reference to the approximation of bump mapping.

Our old Opengl 1.1 1997 engine has uniform lighting for everything :wink: and among the more advanced things, doom3 comes to my mind, although it does not really display terrains.

just a little idea i (and certainly others) had just reading this thread… what about using 2 detail maps where the texture coordinates for one of them is perturbed (a little bit) by the vertex normal? this would certainly remove some of the repetition a simple detail map causes and wont be as expensive as bumpmapping… :slight_smile:

Originally posted by Chuck0:
just a little idea i (and certainly others) had just reading this thread… what about using 2 detail maps where the texture coordinates for one of them is perturbed (a little bit) by the vertex normal? this would certainly remove some of the repetition a simple detail map causes and wont be as expensive as bumpmapping… :slight_smile:
Please don’t tell us you want to introduce emboss bump mapping :slight_smile:

arg i knew that there was already a technique like that (just forgot the name :slight_smile: )