Soulburned@Posted: Sat Jun 14, 2008 12:27 am :
I'm pretty new so forgive me. I'm trying to find out information about all the texture types. The ones in question are in all the newer games like Quake 4, Prey, and ETQW etc...

First: I know about _d = Diffuse, _local = normal, _s = specular
the issue is when I run into _h. Is this used for displacement or simply an additional bump? I've been studying the models and their textures in particular and have run into the issue of getting proper displacement in 3ds max to mimic the same displacement the game engine does.

Example: Officer model in quake 4 has the following
officer2_d.tga
officer2_h.tga
officer2_local.tga
officer2_s.tga
officer2_g.tga
officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds

The other thing is I can't get anything to read or load that dds file that contains a possible height map.

That dds file came from a seperate folder that was named DDS i believe, and was under height map sub-folder.

So far in max I've been able to use the normalbump material function in the bump map section of the material, and then I applied the local map to the normal, and the _h as an additional bump. However there is no actual displacement taking place as this is just a bump material, when I load _h into the displacement section I usually keep the value at 1-2% but still renders the model the same way it looks in the viewport with maps.



rich_is_bored@Posted: Sat Jun 14, 2008 2:00 am :
The filenames of images aren't important dispite how suggestive the names are. In most cases you'll be correct in assuming that "_d" is diffuse, "_local" is normal, "_s" is specular, and "_h" is height. The problem however is that not all images adhere to this naming convention.

And while in those cases you could just view the image and guess, a better indication is in the material shaders. It's through those declarations that the game determines what images should be used and how they should be applied.

Another thing to note is that there is a difference between height maps and displacement maps. Height maps are used to add small details and subtle texture to a surface while it's the normal map that conveys large features. To yeild a more accurate displacement map for the models used in various id Tech 4 games, you'd have to convert the corresponding normal map to a height map (I've heard CrazyBump can do this) and average it with any existing height map.

It's also important to note the purpose of TGA and DDS files in relation to the game. TGA images are lossless high quality images while DDS images are compressed versions of their TGA counterparts. For every TGA image there should be a cooresponding DDS image and vice versa. They are stored in relative locations from the base directory and can be referenced interchangably. Which of the two images is loaded and used is dependant on the video quality settings used in the game.

You can learn more on http://www.modwiki.net.



Soulburned@Posted: Sat Jun 14, 2008 2:21 am :
I understand. The local_heightmap has no corresponding TGA file and i'm guessing is either rendered by the engine when the game is running and the file itself is simply a placeholder?

Yes I've still got the free beta version. Thanks for your help!

I do know about the TGA and DDS specifications. I'll have to figure out if there really is anything useful in those local_heightmap files, they're pretty large for DDS files

officer2_d.tga = 3,073 kB
officer2_d.dds = 684 kB

while the naming of the files is different they may be the same but there are 2 things I question about this:
officer2_local.tga = 4,097 kB
officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds = 1,366 kB

when I load the local.tga file into Photoshop and save it as DDS (DXT1 just like all the other DDS files) the resulting is:
officer2_local.dds = 683 kB

So I'm wondering what the extra data is in that local_heightmap file? I just opened it in notepad and while the first part of the header is normal DDS the 2nd part that describes the format (normally DXT1) read: RXGB.



_-----------------------_

I googled DDS rxgb after i posted this, and I found this neat little tool. http://www.amnoid.de/ddsview/download.html
What's interesting is the dds heightmap file is still a normal map but looks different from the regular _local.tga and .dds version.



6th Venom@Posted: Sat Jun 14, 2008 10:07 am :
Some DDS include alphas (DXT5).
Maybe ETQW _h alphas are used for real Displacement maps, or were supposed to.
You got to know that every Id tech 4 games have been optimized/changed to fit the needs of the game, on a common base of Doom3 engine.
Basicly they are the same core, but shaders handling, and materials propieties are more and more powerfull with released games.

Ex:
- Doom3 don't have any Displacement.
- Quake 4 can handle different sound collision with a special map (down of this page)
- ETQW use megatextures, displacements, and more.



Soulburned@Posted: Sat Jun 14, 2008 2:46 pm :
Yea. the color-coding scheme used to make hitmaps for collision materials tells the game how the impact should be handled.. whether it metal, flesh, etc... But I think this was introduced in Quake 4.
Most all of the assets in Quake 4 that end in .dds are either DXT1 or RXGB for those local_heightmap files.

Same goes for most of the assets in Prey as well.
example:
\dds\heightmap\models\mapobjects\harvester_wall\walljuice_h 9.dds = 11kB with RXGB

same for all the other DDS files under the heightmap folder.

so far the only places I've seen a DXT5 DDS file is in Prey's assets that look like this:
dds\makealpha
dds\makeintensity

TGA versions of these assets exist already in the regular texture directories.

I just wanted to double check that there were no unique DDS assets that didn't correspond to TGA files, althought those local_heightmaps confuse me as to why they look so different from the local map's tga version.

I guess most of what I'm trying to do is up-res the assets in 3dsmax and I've gotten a decent method so far when it comes to characters, but geometric assets like ships, mechanical objects etc.. I'm still working on.



6th Venom@Posted: Sat Jun 14, 2008 11:00 pm :
Soulburned wrote:
...althought those local_heightmaps confuse me as to why they look so different from the local map's tga version.

heightmaps (_h) are not the same as normalmaps (_local), normalmaps are used for the general form and bumps, heightmaps are fine details that are added to the normalmap:
Code:
   {
      blend   bumpmap
      map   addnormals(textures/researchoutpost/adam_ice1a_local.tga,heightmap(textures/researchoutpost/adam_ice1a_h.tga,8))
   }

Also, the game automaticly generate DDS versions of a TGA, except if this one already physicly exist, cause sometimes temp generated DDS are not really good looking, so you better make your own to control the final DDS quality of a texture.



Soulburned@Posted: Sun Jun 15, 2008 1:08 am :
Correct, in the addnormals folder there are DDS versions of the _local but their naming convention is _local_heightmap and then a longer string of the filename like I posted above. These are different than the tga _local maps for some reasonm either a channel was inverted or something I'm not sure what it is but the colors are different than in the TGA version of the local map. I'm not trying to use them as a heightmap. I've been able to render some decent displacement maps in crazybump to at least smooth out the meshes for organic models, but it'll take more work on geometric models like the ships and mapobjects etc...



6th Venom@Posted: Sun Jun 15, 2008 9:51 am :
Could you show it? (or a part)
I know about a Displacement way that use the blue channel to stock depth informations, in normalmaps. Usually this blue channel is nearly totally white, that's why normalmaps look blue dominant.
When this technique is used, the normalmap can be green and/or red.



Soulburned@Posted: Sun Jun 15, 2008 4:53 pm :
Sure.

First: the DDS file can be found in pak009.pk4\progimg\addnormals\models\characters\marine_officer
the full filename: officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds

now here's the differences, first picture is the TGA file:
http://i9.photobucket.com/albums/a52/Ha ... alcopy.jpg

Second picture is the DDS file in the progimg:
http://i9.photobucket.com/albums/a52/Ha ... ghtmap.jpg

I've circled the difference in yellow highlight. It seems the DDS version includes the _h detail, but that's not the biggest difference. the color values in the DDS are different and seem to be deeper than the TGA version. Plus there is a wierd alpha channel in the TGA file which is a small white distorted rectangle, and the rest of the space is black. Possibly for the decal image. When I use the DDS version I get a completely different look in the render versus the TGA version.



rich_is_bored@Posted: Mon Jun 16, 2008 12:11 am :
There's little difference between those two normal maps. "local_height" is the result of adding two normal maps together, one of which was "local".



Soulburned@Posted: Mon Jun 16, 2008 12:15 am :
I figured as much, but when applying these normal maps to the models in a rendering engine there's completely different lighting results between the two. The DDS version seems a bit... well, off I guess. Not really sure what's going on.



rich_is_bored@Posted: Mon Jun 16, 2008 3:50 am :
Have you considered making copies of the images and then stripping unnessicary data. Case in point, you don't need the alpha channel. I don't know what purpose it serves in Doom 3 but you certainly aren't using it doing what your doing.



Soulburned@Posted: Mon Jun 16, 2008 5:25 am :
Yea I have, but I was trying to determine if that was even necessary. As for that alpha channel data, most of the cases where I've found something in the alpha channel is usually for a model that has a decal on it, in which case, aren't necessary to use the alpha channel. The TGA version of the normal map seems to be doing okay, i'm still playing around with the settings in Max because when left to "tangent", the lighting inside of max causes seems to show up on the surface, as in noticeable change in light value, not the diffuse textures... the other DDS normal doesn't seem to cause that problem but using that one is almost as if i'm not utilizing a normal map in the first place.



lowdragon@Posted: Mon Jun 16, 2008 5:26 am :
"a renderengine" - beside objectspace and tangentspace, localmaps are prepared to work within different conventions. It is very possible that outside d3 the localmaps aint looking that good or not good at all. Orb (open render bump)`s using d3/nvidia style localmaps, is able to merge a heigthmap with a localmap but is using very early tech conventions iirc - would need a closer look if it still works.

D3 can do that too (build in, see iddevnet.com - materials) but one has to keep the two texturemaps - which eats more HDD space/ processingtime. The localADDheightmap thing is also good to add detail later on while the renderbump is allready done - pretty easy to give the imp a snake skin etc + fine detail is sometimes very difficult to add to the highpoly model e.g. causes aliasing edges in the localmap which would be washed out anyway if using AA withing renderbump i guess.

Arb_programs i used are saving the depthmap :idea: into the alpha channel of the spec maps to do reliefmapping.
Dont know what you mean with "smoothing out the meshes" - please describe further :D.
Oh, "the compressonator" by ATI/AMD converts to DDS - see
Code:
http://www.katsbits.com/htm/tools_utilities.htm#misc
since you may need an older version.



Soulburned@Posted: Mon Jun 16, 2008 5:33 am :
Thanks! I've already got the version of it, DDS files with the RXGB header are handled in a format that Photoshop plugin can't read (Nvidia's) and the DDS viewer I linked above let's you view the RXGB DDS files perfectly, as well as exporting into different files. The TGA versions seem to work fine except for that lighting tweak I've been experimenting with. I've also got Xnormal to take a look at the materials.



rich_is_bored@Posted: Tue Jun 17, 2008 8:25 am :
Does 3DSMAX use ATI style normal maps? Perhaps you need to invert the green channel?



lowdragon@Posted: Tue Jun 17, 2008 9:08 am :
Hmmm, the one with added detail looks quit dark - he could try "map addnormals(<map_1>, <map_2>)" insteed ?



6th Venom@Posted: Tue Jun 17, 2008 6:38 pm :
rich_is_bored wrote:
Does 3DSMAX use ATI style normal maps? Perhaps you need to invert the green channel?

No it doesn't.

It just look like the DDS one was just a "forgetten" temp file, did you found the material that use it?
Cause, technically, it just look like the TGA normalbump multiplied by the detail/heightmap (converted into normalmap first), like the final result after an "addnormal" operation.
Still don't know what the alpha does.



Soulburned@Posted: Tue Jun 17, 2008 7:56 pm :
the alpha was for a decal who's diffuse map was in a separate texture file. it's just a mask.

It's not just this material, all the DDS versions in the addnormals look the same way, completely different from the TGA versions.



Soulburned@Posted: Sat Jun 14, 2008 12:27 am :
I'm pretty new so forgive me. I'm trying to find out information about all the texture types. The ones in question are in all the newer games like Quake 4, Prey, and ETQW etc...

First: I know about _d = Diffuse, _local = normal, _s = specular
the issue is when I run into _h. Is this used for displacement or simply an additional bump? I've been studying the models and their textures in particular and have run into the issue of getting proper displacement in 3ds max to mimic the same displacement the game engine does.

Example: Officer model in quake 4 has the following
officer2_d.tga
officer2_h.tga
officer2_local.tga
officer2_s.tga
officer2_g.tga
officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds

The other thing is I can't get anything to read or load that dds file that contains a possible height map.

That dds file came from a seperate folder that was named DDS i believe, and was under height map sub-folder.

So far in max I've been able to use the normalbump material function in the bump map section of the material, and then I applied the local map to the normal, and the _h as an additional bump. However there is no actual displacement taking place as this is just a bump material, when I load _h into the displacement section I usually keep the value at 1-2% but still renders the model the same way it looks in the viewport with maps.



rich_is_bored@Posted: Sat Jun 14, 2008 2:00 am :
The filenames of images aren't important dispite how suggestive the names are. In most cases you'll be correct in assuming that "_d" is diffuse, "_local" is normal, "_s" is specular, and "_h" is height. The problem however is that not all images adhere to this naming convention.

And while in those cases you could just view the image and guess, a better indication is in the material shaders. It's through those declarations that the game determines what images should be used and how they should be applied.

Another thing to note is that there is a difference between height maps and displacement maps. Height maps are used to add small details and subtle texture to a surface while it's the normal map that conveys large features. To yeild a more accurate displacement map for the models used in various id Tech 4 games, you'd have to convert the corresponding normal map to a height map (I've heard CrazyBump can do this) and average it with any existing height map.

It's also important to note the purpose of TGA and DDS files in relation to the game. TGA images are lossless high quality images while DDS images are compressed versions of their TGA counterparts. For every TGA image there should be a cooresponding DDS image and vice versa. They are stored in relative locations from the base directory and can be referenced interchangably. Which of the two images is loaded and used is dependant on the video quality settings used in the game.

You can learn more on http://www.modwiki.net.



Soulburned@Posted: Sat Jun 14, 2008 2:21 am :
I understand. The local_heightmap has no corresponding TGA file and i'm guessing is either rendered by the engine when the game is running and the file itself is simply a placeholder?

Yes I've still got the free beta version. Thanks for your help!

I do know about the TGA and DDS specifications. I'll have to figure out if there really is anything useful in those local_heightmap files, they're pretty large for DDS files

officer2_d.tga = 3,073 kB
officer2_d.dds = 684 kB

while the naming of the files is different they may be the same but there are 2 things I question about this:
officer2_local.tga = 4,097 kB
officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds = 1,366 kB

when I load the local.tga file into Photoshop and save it as DDS (DXT1 just like all the other DDS files) the resulting is:
officer2_local.dds = 683 kB

So I'm wondering what the extra data is in that local_heightmap file? I just opened it in notepad and while the first part of the header is normal DDS the 2nd part that describes the format (normally DXT1) read: RXGB.



_-----------------------_

I googled DDS rxgb after i posted this, and I found this neat little tool. http://www.amnoid.de/ddsview/download.html
What's interesting is the dds heightmap file is still a normal map but looks different from the regular _local.tga and .dds version.



6th Venom@Posted: Sat Jun 14, 2008 10:07 am :
Some DDS include alphas (DXT5).
Maybe ETQW _h alphas are used for real Displacement maps, or were supposed to.
You got to know that every Id tech 4 games have been optimized/changed to fit the needs of the game, on a common base of Doom3 engine.
Basicly they are the same core, but shaders handling, and materials propieties are more and more powerfull with released games.

Ex:
- Doom3 don't have any Displacement.
- Quake 4 can handle different sound collision with a special map (down of this page)
- ETQW use megatextures, displacements, and more.



Soulburned@Posted: Sat Jun 14, 2008 2:46 pm :
Yea. the color-coding scheme used to make hitmaps for collision materials tells the game how the impact should be handled.. whether it metal, flesh, etc... But I think this was introduced in Quake 4.
Most all of the assets in Quake 4 that end in .dds are either DXT1 or RXGB for those local_heightmap files.

Same goes for most of the assets in Prey as well.
example:
\dds\heightmap\models\mapobjects\harvester_wall\walljuice_h 9.dds = 11kB with RXGB

same for all the other DDS files under the heightmap folder.

so far the only places I've seen a DXT5 DDS file is in Prey's assets that look like this:
dds\makealpha
dds\makeintensity

TGA versions of these assets exist already in the regular texture directories.

I just wanted to double check that there were no unique DDS assets that didn't correspond to TGA files, althought those local_heightmaps confuse me as to why they look so different from the local map's tga version.

I guess most of what I'm trying to do is up-res the assets in 3dsmax and I've gotten a decent method so far when it comes to characters, but geometric assets like ships, mechanical objects etc.. I'm still working on.



6th Venom@Posted: Sat Jun 14, 2008 11:00 pm :
Soulburned wrote:
...althought those local_heightmaps confuse me as to why they look so different from the local map's tga version.

heightmaps (_h) are not the same as normalmaps (_local), normalmaps are used for the general form and bumps, heightmaps are fine details that are added to the normalmap:
Code:
   {
      blend   bumpmap
      map   addnormals(textures/researchoutpost/adam_ice1a_local.tga,heightmap(textures/researchoutpost/adam_ice1a_h.tga,8))
   }

Also, the game automaticly generate DDS versions of a TGA, except if this one already physicly exist, cause sometimes temp generated DDS are not really good looking, so you better make your own to control the final DDS quality of a texture.



Soulburned@Posted: Sun Jun 15, 2008 1:08 am :
Correct, in the addnormals folder there are DDS versions of the _local but their naming convention is _local_heightmap and then a longer string of the filename like I posted above. These are different than the tga _local maps for some reasonm either a channel was inverted or something I'm not sure what it is but the colors are different than in the TGA version of the local map. I'm not trying to use them as a heightmap. I've been able to render some decent displacement maps in crazybump to at least smooth out the meshes for organic models, but it'll take more work on geometric models like the ships and mapobjects etc...



6th Venom@Posted: Sun Jun 15, 2008 9:51 am :
Could you show it? (or a part)
I know about a Displacement way that use the blue channel to stock depth informations, in normalmaps. Usually this blue channel is nearly totally white, that's why normalmaps look blue dominant.
When this technique is used, the normalmap can be green and/or red.



Soulburned@Posted: Sun Jun 15, 2008 4:53 pm :
Sure.

First: the DDS file can be found in pak009.pk4\progimg\addnormals\models\characters\marine_officer
the full filename: officer2_local_heightmap__models_characters_marine_officer_officer2_h_2.dds

now here's the differences, first picture is the TGA file:
http://i9.photobucket.com/albums/a52/Ha ... alcopy.jpg

Second picture is the DDS file in the progimg:
http://i9.photobucket.com/albums/a52/Ha ... ghtmap.jpg

I've circled the difference in yellow highlight. It seems the DDS version includes the _h detail, but that's not the biggest difference. the color values in the DDS are different and seem to be deeper than the TGA version. Plus there is a wierd alpha channel in the TGA file which is a small white distorted rectangle, and the rest of the space is black. Possibly for the decal image. When I use the DDS version I get a completely different look in the render versus the TGA version.



rich_is_bored@Posted: Mon Jun 16, 2008 12:11 am :
There's little difference between those two normal maps. "local_height" is the result of adding two normal maps together, one of which was "local".



Soulburned@Posted: Mon Jun 16, 2008 12:15 am :
I figured as much, but when applying these normal maps to the models in a rendering engine there's completely different lighting results between the two. The DDS version seems a bit... well, off I guess. Not really sure what's going on.



rich_is_bored@Posted: Mon Jun 16, 2008 3:50 am :
Have you considered making copies of the images and then stripping unnessicary data. Case in point, you don't need the alpha channel. I don't know what purpose it serves in Doom 3 but you certainly aren't using it doing what your doing.



Soulburned@Posted: Mon Jun 16, 2008 5:25 am :
Yea I have, but I was trying to determine if that was even necessary. As for that alpha channel data, most of the cases where I've found something in the alpha channel is usually for a model that has a decal on it, in which case, aren't necessary to use the alpha channel. The TGA version of the normal map seems to be doing okay, i'm still playing around with the settings in Max because when left to "tangent", the lighting inside of max causes seems to show up on the surface, as in noticeable change in light value, not the diffuse textures... the other DDS normal doesn't seem to cause that problem but using that one is almost as if i'm not utilizing a normal map in the first place.



lowdragon@Posted: Mon Jun 16, 2008 5:26 am :
"a renderengine" - beside objectspace and tangentspace, localmaps are prepared to work within different conventions. It is very possible that outside d3 the localmaps aint looking that good or not good at all. Orb (open render bump)`s using d3/nvidia style localmaps, is able to merge a heigthmap with a localmap but is using very early tech conventions iirc - would need a closer look if it still works.

D3 can do that too (build in, see iddevnet.com - materials) but one has to keep the two texturemaps - which eats more HDD space/ processingtime. The localADDheightmap thing is also good to add detail later on while the renderbump is allready done - pretty easy to give the imp a snake skin etc + fine detail is sometimes very difficult to add to the highpoly model e.g. causes aliasing edges in the localmap which would be washed out anyway if using AA withing renderbump i guess.

Arb_programs i used are saving the depthmap :idea: into the alpha channel of the spec maps to do reliefmapping.
Dont know what you mean with "smoothing out the meshes" - please describe further :D.
Oh, "the compressonator" by ATI/AMD converts to DDS - see
Code:
http://www.katsbits.com/htm/tools_utilities.htm#misc
since you may need an older version.



Soulburned@Posted: Mon Jun 16, 2008 5:33 am :
Thanks! I've already got the version of it, DDS files with the RXGB header are handled in a format that Photoshop plugin can't read (Nvidia's) and the DDS viewer I linked above let's you view the RXGB DDS files perfectly, as well as exporting into different files. The TGA versions seem to work fine except for that lighting tweak I've been experimenting with. I've also got Xnormal to take a look at the materials.



rich_is_bored@Posted: Tue Jun 17, 2008 8:25 am :
Does 3DSMAX use ATI style normal maps? Perhaps you need to invert the green channel?



lowdragon@Posted: Tue Jun 17, 2008 9:08 am :
Hmmm, the one with added detail looks quit dark - he could try "map addnormals(<map_1>, <map_2>)" insteed ?



6th Venom@Posted: Tue Jun 17, 2008 6:38 pm :
rich_is_bored wrote:
Does 3DSMAX use ATI style normal maps? Perhaps you need to invert the green channel?

No it doesn't.

It just look like the DDS one was just a "forgetten" temp file, did you found the material that use it?
Cause, technically, it just look like the TGA normalbump multiplied by the detail/heightmap (converted into normalmap first), like the final result after an "addnormal" operation.
Still don't know what the alpha does.



Soulburned@Posted: Tue Jun 17, 2008 7:56 pm :
the alpha was for a decal who's diffuse map was in a separate texture file. it's just a mask.

It's not just this material, all the DDS versions in the addnormals look the same way, completely different from the TGA versions.