PDA

View Full Version : How does ID do that??????



dabeav
07-26-2002, 08:47 AM
Ok, I am currious. ID builds there models to ULTRA high resolutions. Then they rebuild them to Low Poly, but some how retain the Detail, and quality of the original model??? HOW??? All I can figure is that they some how use the normals of the original model, to "fake" a layer on top of there low poly model. Once again HOW??? Anyone have any idea as to how they do this??

Julien Cayzac
07-26-2002, 09:06 AM
Like everybody else, by using displacement maps...

Julien.

V-man
07-26-2002, 09:20 AM
That would seem to be the key idea. I think that they use some plugin or some specialized software for generating their normals maps.

I think that you would have to combine this method with an algorithm that intelligently simplifies the model (involves finding the gradient)

Doing this right is an art, since they manipulate the model to fine tune everything. Remember that the model will be animated as well.

V-man

BlackJack
07-26-2002, 09:22 AM
Displacement maps? Nah, there you're a "bit" wrong informed deepmind. Displacement mapping is only supported by the new Matrox Perhelia and even on that card it will NOT be supported in the Doom 3 engine, because it's incompatible to volumetric shadows. Same about ATI's TruForm, because both modify the polygons flushed.

They use a similar form to PolyBump. Go to http://www.crytek.com/ there you can download a demo of Polybump (needs GeForce3+ or Radeon 8500 or higher).

In general it works about following way:
-they check, which polygons are not that important and calculate a low resolution mesh first of all, but remember, which of the polygons taken away were connected to which ones remaining at the end. Demos for calculating a mesh down you can find everywhere through the internet
-then they create a dot 3 bumpmap and fill it with the polygons taken away (theirs normal vectors)

And if you display it then with DOT3 bumpmapping the result model looks very similar to the original, because the shading is looking so terrible equal, even if you move the light. Of course it looks far worser than the object with 100 times as many polygons, but nevertheless it is really impressing which similarity they still reach nevertheless, no compare to an unbumped low poly model. The only limtation they have is that deep structures are not bumpable. But all things like cables, pores and so on you can totally replace with bumpmaps... and save a bunch of polygons this way.

BlackJack

[This message has been edited by BlackJack (edited 07-26-2002).]

davepermen
07-26-2002, 09:30 AM
blackjack. while they not use the displacementmaps as displacementmap in the engine, they actually generate the displacementmap. thats the same as a bumpmap. for generation. so what? (okay, they should have said bumpmap..)

dabeav
07-26-2002, 10:11 AM
I thought that using Dot3 was the method, too bad its not supported by all cards on the market. I am currently using an emboss method to calculate my bump maps. (looks descent) But I hope as the technology changes, so does the ability to use bump maps.

AdrianD
07-26-2002, 10:21 AM
davepermen, you are wrong.
A displacement map stores a height-information. A normalmap stores the direction.

A bumpmap is usually a heightmap, which must be converted to a normalmap which is then converted into objectspace (if you want to make dot3-bumps)...ok, i know, i could also convert my lightvectors into tangentspace, but that's not the point. the point is that you have to do some 3d-space-conversion.

so a bumpmap has 1 heightvalue.(from which you have to evaluate the normal-value. in a preprocess step or at runtime)
and a normalmap has 3 values with the(normalized) direction vector. And in the special normalmapping-case in doom3(unique mapping for every face) you can also store the normals in objectspace, so you don't need to do any 3d-space-conversions, you don't have to interpolate/normalize the facenormals... just take them, and DOT them with the lightvector(in objectspace of course).

so normalmaps have nothing to do with displacementmaps. the techniques are completely different and the sourcedata is also not the same.

davepermen
07-26-2002, 10:37 AM
no one talks about normalmaps. bumpmaps are the same as displacementmaps. that you need for dot3bumpmapping the normalmaps, i know very well. and i know all the rest to do todays perpixellighting. i know as well that its not needed to store normalmaps at all, if you don't want.. for dot3bumpmapping, yes! so your statement is wrong in fact..

i know its just nitpicking. but a displacementmap and a bumpmap is used for the same thing. displacementmapPING and bumpmapPING are different things. one does displace with the HEIGHTMAP of the mesh, the other one does shade with the help of the HEIGHTMAP. (and in most cases today you first convert the HEIGHTMAP into a more proper format: a NORMALMAP http://www.opengl.org/discussion_boards/ubb/smile.gif)

but to store, a heightmap/displacementmap/bumpmap is less memory-eating. so they use that for sure

AdrianD
07-26-2002, 11:06 AM
yeah, ok i understand what you mean.

at the end of the last year i did some tests with my new gf3 and one of the tests was to create normalmaps of hiresmeshes and map them
on a lowres-mesh. I figured out, that using normalmaps (read: reusing the surface direction-information for lighting) is much more accurate than using bumpmaps.
that is so because a bumpmap must first be converted into a normalmap. and in this process you have to take the neighbours of a given pixel into account which blurrs your final normalmap down.
a 256x256 bumpmap results in a blurry normalmap. a bumpmap is also usualy 8 bit, which gives you a really poor precision, when creating the normalmaps.(i assume you know how...based on the differences from the neighbours)

a 128x128 normalmap don't need to be blurred and contains allready the correct normalinformation which looks in most cases better than a 256x256 heighmap.(and is smaller than a hieghtmap of the double size)

that's my own expiriences with this method, and because of them i still say, they are using normalmaps and not heightmaps.

Nutty
07-26-2002, 11:53 AM
Interesting Adrian. So computing the normal map directly you prevent blurring, and improve precision dramatically.

I'm pretty sure that must be the way they're doing it.

Cheers for that! http://www.opengl.org/discussion_boards/ubb/smile.gif

Nutty

davepermen
07-26-2002, 12:20 PM
improving precision:
use 16bit xy components only for bumpmaps.
blurring? not really, i've currently doing some pixelscreen bumpmapping (means a simple 2d effect) and there i can see it does NOT blur at all http://www.opengl.org/discussion_boards/ubb/smile.gif
thats my expirience.. your's can be different..

Funes
07-26-2002, 08:15 PM
The technique used to recover detail for simplified meshes as normal map (used by id in doom 3) is not new at all. We are using it in our lab since 1997. It was presented 4/5 years ago at ieee visualization conference.
look at http://vcg.iei.pi.cnr.it/colorByTexture.html
for a detailed explanation of how to do it (some downloadable papers too).

BlackJack
07-26-2002, 10:55 PM
Davepermen: No, they don't use displacement maps at all, not at least as any step between. Why should they, it's senseless and also more unexact.

What's theirs input?
-the highres polygon taken away
-the lowres polygon to which the highres one is bound

With this they can relative easily calculate the region in the normalmap representing the highres polygon. They just need to cycle it back so that the highres polygons' normal is 0,0,1 and can then straightly store it's interpolated normal values of the vertices in that map. I don't see any point for using displacement maps for PolyBump at all...
But I guess that FarCry as well as DOOM 3 will calculate displacement maps as well to support hardware which doesn't support DOT3 bumpmapping. (offset bumpmapping)

BlackJack

AdrianD
07-27-2002, 05:42 AM
i think i can remember, they don't using any geometry-deforming LOD-methods(truform,HOS or Displacementmaps) because this would screw up their stencil volumes...

BlackJack
07-27-2002, 07:01 AM
That's what I already said in my first post Adrian http://www.opengl.org/discussion_boards/ubb/wink.gif.

AdrianD
07-27-2002, 09:11 AM
you are right, shame on me. http://www.opengl.org/discussion_boards/ubb/wink.gif

jwatte
07-27-2002, 02:30 PM
davepermen,

While your usage of "bump map" for the grayscale height map is the traditional CG usage, these days real-time graphics people actually more often mean "normal maps" than "height maps" when they say "bump map". It's all because of "DOT3 bump mapping" (which uses normal maps).

Sometimes, it's amazing how well humans can communicate, despite the continual confusion caused by human language :-)

V-man
07-28-2002, 06:09 AM
Isn't normal mapping also called "normal perturbation" and "dot3 lighting". There are a lot of terms I see and seems like they all mean the same thing. How else are you gone do basic bumpmapping?

It surprises me that Doom3 is running so fast with stencil shadows on top of all the other effects. It's got to be movie sequences, right?
There are other modern games that don't have half the special effects of Doom3 and they don't run too fast on my machine. Try Serious Sam 2 to see what I mean. Damn thing uses 100MB of RAM and it doesn't look much better than the first version.

V-man

BlackJack
07-28-2002, 06:28 AM
it's amazing how well humans can communicate, despite the continual confusion caused by human language


Hm..... jwatte... you anyway sound for me like any Alien battle ship commander speaking the way "let's destroy this mental underdeveloped human beings" http://www.opengl.org/discussion_boards/ubb/smile.gif, hehe. But yes, you are right, many words have many meanings... arghl... you make me nightmares again about my old Latin studying times http://www.opengl.org/discussion_boards/ubb/wink.gif.

BlackJack

knackered
07-28-2002, 07:50 AM
Originally posted by V-man:
Isn't normal mapping also called "normal perturbation" and "dot3 lighting".

Eh? To perturbate means to 'offset'. That's a different trick.
Bump mapping to me is dot products with a normal map. Why are people still talking about the offset trick in this day and age, and on this forum? It looks crap - forget it. On hardware incapable of dot3, don't even bother trying to emulate it.

jwatte
07-28-2002, 08:19 AM
BJ> Alien battle ship commander

I think it's time I got new business cards :-)

k> Bump mapping to me is dot products with a normal map.

Yes. Unfortunately, to any artist, or anyone involved in offline CG/rendering, bump mapping means a grayscale height field. Most artists (even technically studly ones!) would not know what a normal map was if they opened it in Photoshop.

Thence, the language confusion.

"Projected light textures," anyone? :-)

knackered
07-28-2002, 08:33 AM
Mmm, well I read my normal maps in as heightfields anyway, and convert them to normal maps internally - I can't understand why people bother with those photoshop plugins etc. You're left with limited precision options, and storage options if you import them pre-cooked, in my opinion. If your clients hardware has to have them range compressed, then that's no problem...etc.

Nutty
07-28-2002, 01:08 PM
It surprises me that Doom3 is running so fast with stencil shadows on top of all the other effects. It's got to be movie sequences, right?

It was running on an R300 board, thats why it was running nice and smooth.

ToolChest
07-28-2002, 03:37 PM
There are plugins for Max and Maya to take a high detail object, optimize it and generate normal maps for it. Iím assuming that is what they are doing, why waste time doing the same thing in the engine.

My $0.02

John.

V-man
07-28-2002, 09:09 PM
Originally posted by knackered:
Eh? To perturbate means to 'offset'. That's a different trick.
Bump mapping to me is dot products with a normal map. Why are people still talking about the offset trick in this day and age, and on this forum? It looks crap - forget it. On hardware incapable of dot3, don't even bother trying to emulate it.



It was a siggraph paper (2001 I beleive). It wasn't just about that, but sort of an introduction to their research. Something about using the vertex normals and perturb them. Is that it?

V-man

knackered
07-28-2002, 11:15 PM
Originally posted by john_at_kbs_is:
There are plugins for Max and Maya to take a high detail object, optimize it and generate normal maps for it. Iím assuming that is what they are doing, why waste time doing the same thing in the engine.

My $0.02

John.

I wasn't talking about geometry reduction using normal maps - just general bump mapping.

davepermen
07-29-2002, 01:23 AM
bumpmapping is not doing a dotproduct with a normal map. its mapping some bumpiness onto a surface and use some technique to let the bumpiness get visible. the most loved way today is simple dot3 on a normalmap, but there are plenty others. in fact, it just depends on the lightingequation/solution you use, and as todays hw is not very programable yet all we can use is some dot3 and some dot3^x for specular.. that'll change.. and you don't need a normalmap. what you need are normals. these you can get from a heightmap as well.. and the actual bumps are represented in a heightmap. the surfacenormals of the bumpmap are in the normalmap..

don't be that restricted or you will not see that much use in the upcomming shader hardware..

dorbie
07-29-2002, 04:07 AM
Here is the original related paper for this detail reconstruction using a bump map:
http://www.cs.unc.edu/~olano/papers/aps/APSlossy.pdf

I'm surprised it hasn't been posted already.

On the stencil volumes vs displacement mapped geometry, they all use the simplified mesh (no displacement). It's been posted already (by me and I assume others) that the visible silhouette of an object is already defined by the simplified geometry, and the shadow volume as projected onto a surface would be no worse than the appearance of the object silhouette in the scene.

Carmack said in a .plan (I think the latest one) that, displacement mapping would screw up the stencil volumes. I described this problem at the start of the massive doom3 thread some time ago and it upset someone ;-).

[This message has been edited by dorbie (edited 07-29-2002).]

knackered
07-29-2002, 05:09 AM
Originally posted by davepermen:
bumpmapping is not doing a dotproduct with a normal map. its mapping some bumpiness onto a surface and use some technique to let the bumpiness get visible. the most loved way today is simple dot3 on a normalmap, but there are plenty others. in fact, it just depends on the lightingequation/solution you use, and as todays hw is not very programable yet all we can use is some dot3 and some dot3^x for specular.. that'll change.. and you don't need a normalmap. what you need are normals. these you can get from a heightmap as well.. and the actual bumps are represented in a heightmap. the surfacenormals of the bumpmap are in the normalmap..

don't be that restricted or you will not see that much use in the upcomming shader hardware..

You speak with such authority, dave. I said bump mapping TO ME is .... etc. etc.
I don't really care what it means to you - I only care that my fellow programmers and artists in my team know what I mean http://www.opengl.org/discussion_boards/ubb/wink.gif (psst! we use dot3)

knackered
07-29-2002, 05:22 AM
There's also a really good demo of geometry simplification with normal maps...go to here:-
http://research.microsoft.com/downloads/

and click on the "Texture Mapping Progressive Meshes" link.

ToolChest
07-29-2002, 12:55 PM
knackered,

I was trying to answer dabeav's original question on making the low res mods look like the ultra high res mods...

John.

WhatEver
07-29-2002, 06:35 PM
I think of a normalmap as being a texture that contains rgb values that represent the xyz values of a normal. Each normal from each triangle is interpolated onto the texture to their corrisponding places(UVmap data). You can think of it as pre-calculating the normals accross a polygons face. Doing this with a highres model increases the normalmaps detail. With this method the normals can point in all directions that could resemble a sphere.

A heightmap as far as I'm conserned is a black and white image where white is the highest point and black is the lowest. Before you can use a heightmap with the DOT3 bumpmapping method you have to convert it to a normalmap. The problem with this method of bumpmapping is that your normals can only create a sort of half dome.

Anyway, that's how I've interpreted everything I've read on this subject.

[This message has been edited by WhatEver (edited 07-29-2002).]

Arath
07-30-2002, 02:00 AM
http://www.research.microsoft.com/~hoppe/