View previous topic :: View next topic |
Author |
Topic : "[DooM 3 Texture Creation]: How?" |
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Fri Jul 19, 2002 5:27 pm |
|
 |
Anyone have a good understanding of how textures are created and used in DooM 3? In a few interviews, id talks about using 5-6 images/textures just to make one in-game texture work. |
|
Back to top |
|
Sumaleth Administrator
Member # Joined: 30 Oct 1999 Posts: 2898 Location: Australia
|
Posted: Fri Jul 19, 2002 9:34 pm |
|
 |
Can you give a link to where they talk about it?
It might just be like Quake3's texture engine which uses "shaders". So textures were no longer always just a simple texture image - a shader could be made up of lots of textures all overlayed to produce glows, animation, and other special effects. |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Sat Jul 20, 2002 4:44 am |
|
 |
You always use multiple textures in any serious 3D work. You have:
diffuse color - the matte, non-shiny color.
specular color - the effect of the object on the color of reflected light
bump map - the 'normal' map - this affects the lighting of the object to give a perceived raised texture. It doesn't actually modify the surface shape, just the light effect. |
|
Back to top |
|
c member
Member # Joined: 23 Oct 2000 Posts: 230 Location: norwalk, ca
|
Posted: Sun Jul 21, 2002 3:14 pm |
|
 |
actually what they do is build everything out of geometry, like a 200k+ model, and then created a bump map off of that. the actual in-game models are about 2000 polys or so but it looks like a lot more because of the bump mapping.
looks like the boys over on the polycount forums will have their work cut out for them  |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Mon Jul 22, 2002 11:02 pm |
|
 |
c: For characters, yes, but the actual world geometry will probably have a specific set of texture stage sets for bump, specularity, etc., plus whatever is called for as special effects layers.
As c mentionned, the character models' textures are created from the high-res version of the mesh. It will pre-combine all textures/materials of the high-detail/non-realtime mesh into a single set of diffuse map, normal map, specular map, etc.
If you're interested in playing with Doom3-like lighting technology, check out PolyBump from Crytek ( www.polybump.com )... this is NOT the Doom3 toolset, but is very similar for generating normal maps [The doom3 engine one should also generate diffuse and specmasks, etc.]. |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Tue Jul 23, 2002 7:30 am |
|
 |
IIRC, they're using the same process for architectural textures as well: they'll create a prefab section of wall in Maya, complete with 3D bricks, scratches, and holes, then use their texture tools to generate the bump map data.
It's an odd way of doing things. I can see it being useful only in certain cases - like generating an apparently smoothly curving surface (eg muscle curvature), while keeping the actual surface flat & low poly.
For other cases - bump mapped wounds, gashes, stubble, dirt, and so on, I much prefer to do it by hand in Photoshop. I've always found it a lot easier to do this than go and precisely model it all out in Maya. |
|
Back to top |
|
The Magic Pen member
Member # Joined: 05 Dec 2001 Posts: 321
|
Posted: Tue Jul 23, 2002 8:19 am |
|
 |
They have a special way of capturing normal maps , it is a special in house tool , but you can use high poly maps to create normal maps the same way , the just wont look as good as ID's models |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Tue Jul 23, 2002 8:58 am |
|
 |
Uhhh...AFAIK, normal map = bump map.
A bump map is used to affect the normal of the surface during lighting calculations. |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Tue Jul 23, 2002 12:50 pm |
|
 |
Are they working with textures at 256x256 and up? Or are they much larger textures now?
Could someone post an example of the 4 or 5 textures that would make a model look like what they are doing? Something simple. I'm not sure I understand what each of these will look like: Diffuse color, specular color, and bump map as Catfish listed. Or how each of these are made, what program is used to make them...
[ July 23, 2002: Message edited by: jHof ] |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Tue Jul 23, 2002 3:09 pm |
|
 |
OK...let's try these. These are from some crappy little project I'm in the middle of.
You're looking at the diffuse texture for a finger. It's basically a cylindrical wrap - you can more or less wrap that texture round a vertical cylinder to give you your finger. The three red blobs at the bottom are three wounds in the finger.
The diffuse color is what everyone thinks about when you're talking about 'color'. It's the color that is radiated out when white light hits the surface.
.
.
.
This is the specular map. This controls how shiny the object is. White areas (the fingernail, and the blood) are shiny, black areas (most of the skin) are matte.
.
.
.
Here's the bump map. Black areas appear as valleys, white areas as raised ridges. This gives the final image much more depth & texture, as it appears to produce the correct light shadowing, without having to model every single wrinkle of skin.
To give you an idea of what you've been looking at:
...it's something like that. Except that's a really poor example - you can't see any evidence of bump mapping, and the lighting isn't strong enough to give you any idea of the specularity. And that's an old version of the render - for example, there's no blood on the fingernail in that image. Oh well...
And yes, I'm still working on stitching all my texture sources together, which is why it's all so messy.
All these maps can just be made in good ol' Photoshop.
Where you're talking about Doom bump mapping, they're using an interesting Maya plugin...
Bump mapping is essentially a height map of your model. So they create an extremely high-res model in Maya, including every scratch and pore in the skin. They then run their plugin. This analyses the model, reducing as much as possible to a bump map - for example, a scratch in the skin can be reduced to a black mark on the bump map - and the appropriate detail can be removed from the model, resulting in a lower-resolution model.
[ July 23, 2002: Message edited by: Catfish ] |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Wed Jul 24, 2002 1:22 pm |
|
 |
Wow, very cool Catfish...
How did you make that bump-map for the thumb? Did you scan your own thumb for the detail, then just turn the image into black and white? |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Wed Jul 24, 2002 1:55 pm |
|
 |
Unfortunately, just turning a photo to black and white doesn't work for bump maps.
Excuse the 30 second Photoshop hack-job, and imagine that this is a satellite photo of a hill:
The sun is coming from the north-west, illuminating the top left, and shadowing the bottom-right.
Now, if you just converted this to black and white for a bump map, you'd get a rather strange image.
Instead, your bump map must be recreated to properly give the effect of high-areas=white and low-areas=black. Your bump map should look like this:
So for my finger bump map, I took the original scan, then repainted over all the main wrinkles, removing the lighting effects, and trying to paint in dark lines for the crevices, and white lines for the ridges.
In this case, given the wrinkles are so fine, it's difficult to tell the difference between the original effect & the intended result, so I can get away with leaving a lot of it as it was.
Hmmm...this reminds me - I've really got to clean that fingerprint up.
[ July 24, 2002: Message edited by: Catfish ] |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Wed Jul 24, 2002 7:40 pm |
|
 |
Wouldn't that bump map for the hill make the dark side shiny with the dark values mixed in though? Or is that the intended effect? Say I light were to pass from left to right over top... Would the shinny orignal lighted side get dark but with greener hues of color than the dark side? |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Thu Jul 25, 2002 1:11 am |
|
 |
Sorry - my bad. The first shot I posted would be the final result of diffuse map combined with bump map. In this case, the diffuse map would be pure green.
But yeah, I think you get the idea. If you were given the perfect renderer, you'd want to strip out all the crevices and shadows from the diffuse color map, and rely on your bump map to recreate them. However, relying on the bump map in this way is a little excessive - you tend to include some of the finer, less noticeable shadow work in the diffuse map. |
|
Back to top |
|
c member
Member # Joined: 23 Oct 2000 Posts: 230 Location: norwalk, ca
|
Posted: Thu Jul 25, 2002 9:09 pm |
|
 |
i think they use the same method for the walls and stuff because like say, if you had a rough brick surface, drawing the ridges and stuff would be kinda difficult. you'd have to draw in 3d, essentially, and that'd be a pain in the ass if you truly want to simulate 3d.
it'd be easier to set up something in a 3d app and 'renderbump' that instead. |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Fri Jul 26, 2002 12:55 am |
|
 |
^ Maybe it's just me, but I've always found it far easier to go into Photoshop, slap some noise down, distort it, add some scratches, add an offset grid for the mortar work...
If you do all that in Maya you need a high resolution mesh, and go through endless tweaking of teeny little vertices. |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Fri Jul 26, 2002 12:02 pm |
|
 |
Catfish: It is _EXTEREMELY_ improbable that they would generate normal maps the same way they do to generate the characters. They will however generate some detail normal maps to be used all over using tiled UVWs on some specific texture stages per pass. They won't model the levels and then generate per-pixel normals maps for every inch of the level. The DOOM3 level editor works in the same way as previous level editors where they will apply a multitude of texure map layers to achieve the desired results. So normal detail maps can be added on top of base normal mapped lit surfaces, etc.
People, normal maps are not "bump maps". Bump Maps are greyscale maps that indicate elevation. Normal maps describe a surface normal per texel, and are composed a multiple color channels describing a vector in tangent (or object) space towards a light put in that same space. A per-pixel vector for lighting is stored in RGB channels giving the orientation of the pixel in 3D space so light can affect it properly.
A normal map looks like this:
PS: Normal maps are mostly used for real-time applications such as games. Offline renderers usually use bump maps to do this lighting, but because we want per-pixel lighting in real-time graphics, we preprocess the bump map data to generate a normal map, precalculating data to something more easily digestible by real-time rasterizers.
PPS - "This analyses the model, reducing as much as possible to a bump map - for example, a scratch in the skin can be reduced to a black mark on the bump map - and the appropriate detail can be removed from the model, resulting in a lower-resolution model." -- I don't think their tool AUTOMATICALLY reduces the high-res mesh to a low-res mesh. Automating such processes can cause some very bad mesh artifacts, especially when dealing with skinned (deformable) objects. I've seen DOOM3 up close, and the detail on the low-res meshes are too clean to be downscaled programatically.
[ July 26, 2002: Message edited by: Frost ] |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Fri Jul 26, 2002 3:50 pm |
|
 |
^ From what I've heard, the Doom3 tools do automatically handle the bumpmap generation and poly-simplification.
There was a guy on Flipcode a while ago, demonstrating the same technique on a high-poly horse model. Looked pretty good to me, although he could've done with a better way of smoothing the bump map from one poly-face to another. |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Fri Jul 26, 2002 4:24 pm |
|
 |
What is a texel? Sorry, still new to a lot of these terms. I know them, but I want to be sure I understand them better. |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Fri Jul 26, 2002 6:48 pm |
|
 |
Texel = Texture pixel. Fancy term that specifies that the pixel is in relationship to the texture and its properties. |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Tue Jul 30, 2002 2:36 pm |
|
 |
Thanks for the answer there Frost.
I'd like to get a head start on a mod project that would use the DooM 3 engine.
Are the days long gone where a wall texture includes a pipe laying across (Drawn in to look 3D.) it? Or is it just as easy/better to just be modeled out now by the mappers and slapped with a "pipe_1.jpg/tga" texture?
What is a rule of thumb to use bump-mapping verses modeling out the object instead?
I would be doing texture work, I need a better grasp at the process. If anyone has some more insight on this. I would sure appreciate the comments. Thanks a bunch!
[ July 30, 2002: Message edited by: jHof ] |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Wed Jul 31, 2002 1:38 am |
|
 |
You can't really use bump mapping to model features - only the texture of the object. Bump mapped surfaces appear flat when viewed from the side, so you wouldn't want to try and model (for instance) someones entire face purely using bump maps.
They're typically used to give rough texture to something - eg the surface of an orange.
As for the texture vs model argument...As always, it's a trade-off. In Doom3, they're actually using lower-poly environments than might be expected, because the shadowing work they're doing really chugs on high detail environment.
In fact, if you look at this shot, you can see some pipework on the left wall, that is done purely as texture work.
Also in that shot - note the texture of the scientist's lab coat. That's bump mapping, I suspect. It will also have been used to suggest the grooves in the soldier's helmet and googles. |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Wed Jul 31, 2002 7:51 am |
|
 |
What Catfish said.
And as a personal oppinion, I've been quite unimpressed with the last 2 shots shown. There's something really not right about the shadows, but, it's work in progress, and it's understandable. |
|
Back to top |
|
jHof member
Member # Joined: 23 Jun 2000 Posts: 252 Location: Chicago, IL
|
Posted: Wed Jul 31, 2002 12:49 pm |
|
 |
Ahh.. yes. Saw those shots last night at the Shack. Shadows are a bit dark. But in Shot #1 with the scientist. If you look back at the far soldier, he is casting a nice soft shadow upon the wall. The railing shadows appear to be soft as well.
I'd say id would rather not even release screen shots, but I'm sure Activision is bang at their door a lot. Plus, we don't even know what settings these shots were taken with. Also, the date of development progress on these shots. These could be ass old shots. FWIW.
None-the-less, work in progress indeed.
Thanks for your comments guys. Much-O-Granda'-Apreci-ota''n-stuff.
[ July 31, 2002: Message edited by: jHof ] |
|
Back to top |
|
|