Skip to main content
GameDev.net gamedev.net
🔒 Locked

doom3 models

Started by Magnus Wootton Dec 25, 2004 at 10:59 AM 3 replies 600+ views
Original Post
Magnus Wootton
Magnus Wootton
am i correct in saying they are low poly models that have a bump map applied to make them appear high poly? heres a way i think this works, its not certain at all i just came up with it. take a high poly model which you have crafted. split it up into octangular partitions. groups of 0.785f 3d radians, or some dot product value from the octangular normals. then you planar wrap each part separately towards the normal of the partition, generating the normal map for each sector, thereby granting it a bump map of the triangles in each partition. you get rid of all the central vertices in the partion but the bump map should retain the detail. so you sorta get left with this skeleton of vertices with all the central vertices taken out, that get taken care of by the bump map. and it needent stop there, thats just the baby version. [Edited by - Magnus Wootton on December 25, 2004 12:02:16 PM]
stop picking your nose
Promit
Promit
I...didn't really understand what you described, so I'll just give a brief description of what Doom 3 does.

Basically, the artists produce high poly and low poly versions of the same model. The low poly one is the one you see in game. The high poly one is used to generate normal maps, which hold per pixel normals for the triangle. Using texture mapping and some clever shader magic, you can compute lighting based on the per-pixel normals that are encoded in the normal map (which is a texture). A fairly good method for doing this is dot3 bump mapping, which doesn't look amazing, but it doesn't require pixel shaders and it manages to look pretty damn good.

I think the actual level, though, simply uses bump mapping, though I'm not sure of the exact algorithm.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Magnus Wootton
Magnus Wootton
if it doesnt work with dot3, im stuffed.
i gathered what you said, even though it was only a guess :), how do you apply
normals from the big one to the little one. its pretty much impossible.
my idea was to this:
you sorta have to know what triangles in the little one stand for groups of
triangles in the big one.
i meant to grab parts of the big model and kill them and create the
normal map from the lost triangles, pointing directly towards the face.
you give them uv coordinates as you go. (so you can give them the normal sampling space) you sorta convert bubbled space into flat space.
creating the normals as you destroy the model (making it lower count)
all the normals are stored as world coordinates, this seemed to be the best way
to go, much easier to think about.
you convert em to tbn once you have done the whole thing, and wrapped it over
again so you can put the texture on it. converting to tbn is just putting it
through the tbn matrix right?

i know, its a crazy idea.
i really need a way to do it thats possible without insane calculation, cause
im a pig at maths.
i can make the models now, i just need to be able to put em in the game, im
actually quite good.

when i first saw bump mapping i was like "i gotta have it", you the same?
stop picking your nose
Promit
Promit
Ok, so we have a low poly model and a high poly model. Imagine what happens if you overlay them. The simplest overlay might look something like this:

[EDIT] My ASCII diagram is being scrambled. Just imagine an isosceles triangle.

The two sides of this triangle are on the high poly mesh, and the bottom line is the low poly mesh. So the normal for the low poly points straight up. But, as in the high poly mesh, we want the normals on the left half of the low poly triangle to point to the up and left, and we want them to the up and right for the right side. So we create a texture with these normals coded in (R=X, G=Y, B=Z, do some shifting and scaling to make it work). Then we can use dot3 with this texture to give the illusion of the high poly mesh when the model is struck by light. Note that the only thing our high poly mesh affects is the normal map. All of the TBN stuff, normals, etc. are exactly the same as they've always been; we're just using the high poly mesh as a guide for how the normal map looks.

Unfortunately, I don't actually know much about creating the normal map from high and low poly meshes. Perhaps this thread will help.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Magnus Wootton
Magnus Wootton
howabout this then.
you wrap the model full when its got tonnes of vertices.
then you remove all the vertices and if its wrapped it works.
you just cant remove side vertices.
thats easy to understand, would that work?

[Edited by - Magnus Wootton on December 25, 2004 2:16:11 PM]
stop picking your nose

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.