BNA!@Posted: Tue Dec 24, 2002 8:20 am :
Ok, this tutorial is from one of our fellow users - and trust when I say it's the best I've seen so far:


Greeting fellow Doom haxors. I've put together the first installment of a two part semi-exhuastive study of Doom 3 material creation. Enjoy...

Some housekeeping before we get started:

First of all, we will need to download NVidia's NormalMapFilter plug-in for Photoshop. The plug-in can be downloaded here:

http://developer.nvidia.com/docs/IO/117 ... Filter.8bf

This file needs to be placed in Photoshop's filter plug-ins directory. The plug-ins directory should contain other .8bf files. More information about the NVidia filter and its uses can be found here:
http://www.cyberloonies.com/bump-mapping.html

Create a new folder called "custom/" in "Doom_III/base/textures/". This is where we will save our new textures for our material stages.

=================

Now for the fun stuff. Open up Photoshop and let's draw the stages.

I. Draw a diffusemap texture

This stage will serve primarily as color information for the material. This is basically just a standard RGB texture with dimensions based on powers of 2. The image should contain color and value information. A simple flat brown texture would work fine, but I whipped up this seamlessly tiling example by playing around with the drawing tools.

Image

Save your diffusemap as Doom_III/base/textures/custom/rockwall_d.tga
By convention, diffusemap texture names are denoted with a "_d" suffix.

:!: Make sure to save all your material textures as Targas because the Doom3 alpha leak doesn't seem to like Jpegs. For this tutorial, save all targas as 24-bit as we will not be making use of an alpha channel.

II. Render a normalmap

A normalmap contains per-pixel dynamic lighting information. Essentially, it uses the color information for each pixel to determine the direction from which a light source would highlight the pixel. A normalmap can be generated from an elevation map through NVidia's wonderful little NormalMapFilter Photoshop plug-in.

1. Create new 512x512 RGB image as the NormalMapFilter only works on images with dimensions based on powers of 2.

2. Select White as foreground and black as background

3. From the pulldown menus select: Filter -> Render -> Clouds

Image

This cloud pattern serves as an elevation map for the NormalMapFilter plug-in. In the elevation map, white represents high spots on the texture and black represents low spots.

Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

4. Now apply NVidia's normalmap filter: Filter -> nvTools -> NormalMapFilter

You may get a warning message about channel selection and alphaheight. This is not a problem. Just click on OK.

Image

Use the settings depicted in the image above and then apply the normalmap color information to the image by by clicking OK.

5. Now resize your image to 256x256. A 512x512 normalmap is overkill in this instance.

Image

6. Save your normalmap as Doom_III/base/textures/custom/rockwall_local.tga

By convention, diffusemap texture names are denoted with a "_local" suffix. I have no idea why this is.

III. Render a specularmap

The specular map stage allows specular hightlights to be added to the material. Specular highlights give the surface a shiny, light-reflective look. In the case of our rock wall, it will give the rock a slightly wet look. Because the specularmap is an additive blend, light areas of the specularmap will create drastic specular highlights while dark areas will create none.

For now, lets just use simple fractal clouds to generate the specular map.

1. Create new 256x256 RGB image

2. Filter -> Render -> Clouds

3. Image -> Adjust -> Auto Contrast

Image

The lighter regions of the texture will translate to shiny areas (specular highlights) on the final material.

4. Save your specularmap as Doom_III/base/textures/custom/rockwall_s.tga

By convention, diffusemap texture names are denoted with a "_s" suffix.

IV. Create a DOOMEdit Preview image

This final image will serve as a material preview when working in DOOMEdit.

1. Open up your newly create rockwall_local.tga and rockwall_d.tga images.

2. Create a new 256x256 RGB image and call it "rockwall_ed"

3. Copy the entire contents of rockwall_d.tga and paste it as a new layer into your new "rockwall_ed" image.

4. Copy the entire contents of rockwall_local.tga and paste it as a new layer into "rockwall_ed", on top of the layer you just pasted from rockwall_d.

5. Apply the following functions to the top layer of "rockwall_ed" (the layer containing the normalmap source).

a. Image -> Adjust -> Desaturate
b. Image -> Adjust -> Auto Contrast

6. Now change the blending mode of the top layer from "Normal" to "Overlay". This is done from the "Layers" tab.

This should give you a shaded and colorized version of your material.

Image

7. Save your editor image as Doom_III/base/textures/custom/rockwall_ed.tga

By convention, editor preview texture names are denoted with a "_ed" suffix. However, I have seen this convention broken in the Doom3 alpha materials.

=================

That wraps up our image creation. Now lets create a quick material script to pull all of our images into a great looking Doom3 material.

Open up your favorite text editing program and let's add the following code to a blank text file:

Code:
textures/custom/rockwall
{
    qer_editorimage  textures/custom/rockwall_ed.tga       // custom DOOMEdit material preview image

    diffusemap       textures/custom/rockwall_d.tga        // color and value information for the material
    specularmap      textures/custom/rockwall_s.tga        // specular highlights
    bumpmap          textures/custom/rockwall_local.tga    // normalmap for bumpmapped appearance
}


Now save your text file as Doom_III/base/materials/custom.mtr.

=================

We're all done with the material creation process. Now fire up DOOMEdit and place the new material on some brush faces. The material can be accessed from the Media Browser (shortcut: 'M' key) under "materials/textures/custom/rockwall".

After assigning the material to some brushes, bring up the Doom console and use "testmap yourmapname" to compile and test the map.

See the shiny highlights ingame? Those are the specular highlights that give the rocky surface a slippery wet look.

Some final thoughts:

DoomEdit handles materials much better than Radiant handled shaders. No more 'shaderlist.txt' registrations (w00t! :grin: ). DoomEdit automatically makes accessable every valid material found in any file in the 'materials' folder.

:!: IMPORTANT :!:

For those of you working on image creation and modification, I HIGHLY recommend turning Doom3's texture caching off. Do this at the console by typing the following:

Code:
image_usePrecompressedTextures 0


By default, Doom3 is set up to create a cache of all images. This cache is generated the first time an image is used by the system. This cache doesn't automatically update if image modifications are made, therefore you will not see changes you make to images unless the cache is disabled. This really screwed with my head for quite some time. :evil: Having caching turned off will increase load times, but it appears to be the only (?) way for you to see image modifications reflected in the engine.



TheCray_nz@Posted: Sat Mar 01, 2003 2:13 pm :
I'm glad to see I'm not the only one using this approach, but a few things which I personally think make the end result better (and you might as well)
First, Use a scale of around 8 - 16 in the normal map filter.
Next, greyscale the final image, and run image->adjust->Auto Levels over it.
Then copy, paste and overlay the result into your diffuse texture. Finally, tinker with the opacity of the normalmap layer before flattening (I like 75% opacity).

This forum is the greatests :)



mohh@Posted: Sat Mar 01, 2003 7:22 pm :
Thanks for the tutorial!



BNA!@Posted: Sat Mar 01, 2003 9:37 pm :
TheCray_nz wrote:
This forum is the greatests :)


Good to hear that!

And thanks for you suggestions!



kat@Posted: Wed Jun 25, 2003 11:52 pm :
was looking thru this earlier and non of the images are showing up atm..?



TheCray_nz@Posted: Thu Jun 26, 2003 3:21 am :
well it is 6 months old, prolly been deleted. The text is quite good at describing what to do so it should be enough to go by.



kat@Posted: Thu Jun 26, 2003 3:32 am :
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:



BNA!@Posted: Thu Jun 26, 2003 8:21 am :
kat wrote:
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:


Eventually just a quick server downtime, but I should really host the images on my own server.

Thanks for looking.



IzNoGoOd@Posted: Tue Aug 12, 2003 9:02 am :
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.



BNA!@Posted: Tue Aug 12, 2003 10:28 am :
IzNoGoOd wrote:
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.


http://developer.nvidia.com/object/ps_n ... ilter.html



BNA!@Posted: Tue Aug 12, 2003 11:36 am :
AZ wrote:
II. Render a normalmap
2. Select White as foreground and black as background

Where can i set that?


In Photoshop take a look to the left bar - there are two colored squares intersecting each other combined with an arrow.

Quote:
Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

Layer menu have only 4 active action no flatten is available


Don't have photoshop here, but I think it's edit > flatten layer



Starbuck@Posted: Fri Aug 15, 2003 7:26 pm :
in photoshop, pressing d will set the foreground color to black and the background to white.

If you want them the other way round just click the <--> next to the foreground and background color swatches



rich_is_bored@Posted: Wed Sep 24, 2003 9:50 pm :
I'm not sure if this has been mentioned before but Nvidia apparently has updated the normal map plugin quite a few times since this tutorial was written.

Now you have the option to invert the X or Y axis.



kat@Posted: Wed Sep 24, 2003 10:50 pm :
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html



BNA!@Posted: Thu Sep 25, 2003 5:57 am :
kat wrote:
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html


Thanks kat - first they make a big deal out of it and then they hide it deep in their folder structure dungeons.



Yarik1@Posted: Fri Mar 05, 2004 5:27 pm :
When I try to add the normal map filter to my plugins folder, I get this message at start up of Photoshop 7
"Cannot locate file d3d9.dll"
Everytime I try to change folders to another, it keeps poping up. And I STILL dont see a nvtool plugin in my filter directory, some help?



rich_is_bored@Posted: Fri Mar 05, 2004 5:47 pm :
Google is great for that kinda stuff...

Quote:
d3d9 - d3d9.dll - DLL Information

DLL File: d3d9 or d3d9.dll
DLL Name: Microsoft Direct3D
Description: Part of Microsoft DirectX 9 and is usually necessary for all games and programs that use advanced graphics.
Part Of: DirectX
System DLL: No
Common Errors: File Not Found, Missing File, Exception Errors


My guess is the latest version of the photoshop plugin requires DX9.



Drin@Posted: Sat Oct 30, 2004 8:29 pm :
my texture isnt showing up in the material or the texture browser in doom3 editor. Ive placed my .mtr in materials/drin/carpet.mtr and my textures in textures/custom/carpet_....tga, and im sure the mtr text points it to the right directory, but it still wont show.



Argoon@Posted: Sun Feb 13, 2005 2:39 am :
You need to save you mtr as an MTR file if you look your mtr is a text file.


Like this ( in the your text editor save as "custom.mtr" with the parentheses, in your materials folder.



KoRnScythe@Posted: Thu Feb 17, 2005 4:46 am :
I'm reviving this when I really shouldn't, but I have a major problem.

It's either my computer sucks ass, which it doesn't... Or it's that somethings wrong.

I do the cloud thing, then I use the nvidia tools, when I got everything down and done, scaled 1000 and such, it gets all rigged and liney, then adobe photoshop drops saying I don't have enough RAM (or memory)

It's kind of bull, I don't see how it doesn't have enough... To even make a damn texture, now my whole computer is a bit messed up.

Help anyone???



rich_is_bored@Posted: Thu Feb 17, 2005 5:19 am :
I have some questions for you...

When you say "scaled 1000" are you refering to the scale textbox in the NV plugin?

What's the resolution of the image you're running through the plugin?

How much RAM is allocated for use by Photoshop? (Look in Edit > Preferences > Memory and Image Cache)

Are you using multiple scratch disks or just one and what would be the total amount of free space between all your scratch disks?

And finally are you using the latest version of the plugin?



xfxgeforced@Posted: Sun Feb 27, 2005 8:23 pm :
ok, i have a few problems, first off, after i put in that command that turns off the cacheing that he told everyone to do my game looked like this, notice the smoke that comes off when the bullet hits the groun is two squares
http://img149.exs.cx/img149/7620/doom3prob7ty.jpg

and also, when i bring down the command thing the text doesnt show, so i hav to blind type

and in photoshop when i am making the specular image, and i make the clouds, when i try and do the nvidia normal mapping thing it just turns it into an all purple image and i cannt preview it, the finished rockwall is in the screenshot above^ and it doesnt look right HELp



rich_is_bored@Posted: Mon Feb 28, 2005 4:52 am :
This tutorial was written back in 2002, prior to the release of the retail version of the game. It may not be nessicary anymore to set the CVAR image_usePrecompressedTextures to 0.

Try changing it back and see if that solves the problem.

Also, it would help to see what your material shader looks like.

Quote:
...in photoshop when i am making the specular image, and i make the clouds, when i try and do the nvidia normal mapping thing it just turns it into an all purple image and i cannt preview it


Maybe you're having trouble describing your problem but, why would you be using the normal map plugin during the creation of a specular map?



PaganRaven or BlondeOvine@Posted: Tue Jul 12, 2005 12:51 am :
even the newest link is broken now. I need that plug-in.... (and YES, I did try looking around on the nvidia site and cant find it)



rich_is_bored@Posted: Tue Jul 12, 2005 6:18 am :
This link should always be valid...

http://www.google.com/search?hl=en&q=NV ... ling+Lucky



zigzulquit@Posted: Wed Nov 30, 2005 8:15 am :
Well as usual... after I post my question... & after all night, I figure it out.
But I wouldn't have if it wasn't for this awesome site, thanks for existing.

Thanx to rich in particular, the test bump map link made the difference.
Now that this is working, I feel alot better about spending the 108.oo for
adobe photoshop, & all night carefully reading the 8 pages of this thread
like 8 times. :wink:

The problem for me was adding --> .mtr & .tga <-- at the end of my file
names. But I still have them in my MTR script.

I do have a question though, appearantly the nvidia plugin is some what
updated. The "Auto Contrast" is nolonger under "Image/Adjust", it's under
"Enhance" now. I never found an "unsaturate though". I assumed it was
less color so I made the image totally gray, via Enhance/Adjust Color/
Adjust Hue Saturation. Which brings me to my question. Is this wrong?

My texture did looked decent, & had the specular effect too.



Kathaarsis@Posted: Fri Dec 15, 2006 3:28 am :
I followed this tutorial, but instead of making a rockwall texture, I tried to make a wooden texture. Heh, it came out looking like sludge. I liked the tutorial, though.



BuddhaMaster@Posted: Fri Feb 16, 2007 10:02 am :
Hey i've read that tutorial and made everything as described. But always when i try to select my texture in the editor: Texture stays black & console gives message 'Warning: Could not load Image' !

I've made all textures, with ending _d _local _s and _ed, put them in my textures folder, made a new .mtr file, inside 'materials' folder (same name as my texture folder) and wrote everyting needed inside (same name as my texture). But still it doesnt work !

Textures are size: 1024x1024 ! Is this too big ? (anyway i tried it 512x512)
Also i put the same textures just in .dds format in same location inside 'dds' folder (in case it doesnt work trough anything with the texture-compression)
Is that ok ?

Why isnt it working at all ? :?:



rich_is_bored@Posted: Fri Feb 16, 2007 1:02 pm :
The names of the files are irrelevant so long as the image references in material shader are correct. The resolution of the images is irrelevant so long as they are a power of two. And a lack of DDS format images shouldn't cause a black material.

I'm pretty sure it's your material shader itself but I can't say since that's the one bit of information you didn't share with us.



LDAsh@Posted: Fri Feb 16, 2007 1:59 pm :
I think it's r_useprecompressedtextures 1 (or is it 0) you need to set, but I thought this was a Quake IV-only problem. I _think_ if you set r_useprecompressedtextures to 1 and you don't have a DDS file for your texture, it will show up black (at least on my setup it does) so either get a proper DDS or set that command.



rich_is_bored@Posted: Sat Feb 17, 2007 6:18 am :
That's a possibility aswell.



DoomAddict@Posted: Mon Apr 07, 2008 11:02 pm :
What if you can't afford photoshop?



rich_is_bored@Posted: Tue Apr 08, 2008 8:27 am :
You don't need Photoshop. There are plenty of open source alternatives. Infact, I've been meaning to switch for a while now. I just haven't had a need to do raster image work lately.

http://www.osalt.com/photoshop

And there are also lots of specialized tools (some of which are commerical software) listed on the wiki including two personal favorites of mine, Texture Maker and SkyPaint...

http://www.modwiki.net/wiki/Texturing#Texture_resources



Doomguy87@Posted: Sat Jun 28, 2008 10:59 pm :
wat if u dont have photoshop?



6th Venom@Posted: Sat Jun 28, 2008 11:17 pm :
Doomguy87 wrote:
wat if u dont have photoshop?

Gimp or another free program.



Doomguy87@Posted: Sat Jun 28, 2008 11:28 pm :
does anyone know how to use GIMP???



Douglas Quaid@Posted: Sun Jun 29, 2008 1:00 am :
Get out the Gimp :D ...and have a look at it!



BNA!@Posted: Tue Dec 24, 2002 8:20 am :
Ok, this tutorial is from one of our fellow users - and trust when I say it's the best I've seen so far:


Greeting fellow Doom haxors. I've put together the first installment of a two part semi-exhuastive study of Doom 3 material creation. Enjoy...

Some housekeeping before we get started:

First of all, we will need to download NVidia's NormalMapFilter plug-in for Photoshop. The plug-in can be downloaded here:

http://developer.nvidia.com/docs/IO/117 ... Filter.8bf

This file needs to be placed in Photoshop's filter plug-ins directory. The plug-ins directory should contain other .8bf files. More information about the NVidia filter and its uses can be found here:
http://www.cyberloonies.com/bump-mapping.html

Create a new folder called "custom/" in "Doom_III/base/textures/". This is where we will save our new textures for our material stages.

=================

Now for the fun stuff. Open up Photoshop and let's draw the stages.

I. Draw a diffusemap texture

This stage will serve primarily as color information for the material. This is basically just a standard RGB texture with dimensions based on powers of 2. The image should contain color and value information. A simple flat brown texture would work fine, but I whipped up this seamlessly tiling example by playing around with the drawing tools.

Image

Save your diffusemap as Doom_III/base/textures/custom/rockwall_d.tga
By convention, diffusemap texture names are denoted with a "_d" suffix.

:!: Make sure to save all your material textures as Targas because the Doom3 alpha leak doesn't seem to like Jpegs. For this tutorial, save all targas as 24-bit as we will not be making use of an alpha channel.

II. Render a normalmap

A normalmap contains per-pixel dynamic lighting information. Essentially, it uses the color information for each pixel to determine the direction from which a light source would highlight the pixel. A normalmap can be generated from an elevation map through NVidia's wonderful little NormalMapFilter Photoshop plug-in.

1. Create new 512x512 RGB image as the NormalMapFilter only works on images with dimensions based on powers of 2.

2. Select White as foreground and black as background

3. From the pulldown menus select: Filter -> Render -> Clouds

Image

This cloud pattern serves as an elevation map for the NormalMapFilter plug-in. In the elevation map, white represents high spots on the texture and black represents low spots.

Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

4. Now apply NVidia's normalmap filter: Filter -> nvTools -> NormalMapFilter

You may get a warning message about channel selection and alphaheight. This is not a problem. Just click on OK.

Image

Use the settings depicted in the image above and then apply the normalmap color information to the image by by clicking OK.

5. Now resize your image to 256x256. A 512x512 normalmap is overkill in this instance.

Image

6. Save your normalmap as Doom_III/base/textures/custom/rockwall_local.tga

By convention, diffusemap texture names are denoted with a "_local" suffix. I have no idea why this is.

III. Render a specularmap

The specular map stage allows specular hightlights to be added to the material. Specular highlights give the surface a shiny, light-reflective look. In the case of our rock wall, it will give the rock a slightly wet look. Because the specularmap is an additive blend, light areas of the specularmap will create drastic specular highlights while dark areas will create none.

For now, lets just use simple fractal clouds to generate the specular map.

1. Create new 256x256 RGB image

2. Filter -> Render -> Clouds

3. Image -> Adjust -> Auto Contrast

Image

The lighter regions of the texture will translate to shiny areas (specular highlights) on the final material.

4. Save your specularmap as Doom_III/base/textures/custom/rockwall_s.tga

By convention, diffusemap texture names are denoted with a "_s" suffix.

IV. Create a DOOMEdit Preview image

This final image will serve as a material preview when working in DOOMEdit.

1. Open up your newly create rockwall_local.tga and rockwall_d.tga images.

2. Create a new 256x256 RGB image and call it "rockwall_ed"

3. Copy the entire contents of rockwall_d.tga and paste it as a new layer into your new "rockwall_ed" image.

4. Copy the entire contents of rockwall_local.tga and paste it as a new layer into "rockwall_ed", on top of the layer you just pasted from rockwall_d.

5. Apply the following functions to the top layer of "rockwall_ed" (the layer containing the normalmap source).

a. Image -> Adjust -> Desaturate
b. Image -> Adjust -> Auto Contrast

6. Now change the blending mode of the top layer from "Normal" to "Overlay". This is done from the "Layers" tab.

This should give you a shaded and colorized version of your material.

Image

7. Save your editor image as Doom_III/base/textures/custom/rockwall_ed.tga

By convention, editor preview texture names are denoted with a "_ed" suffix. However, I have seen this convention broken in the Doom3 alpha materials.

=================

That wraps up our image creation. Now lets create a quick material script to pull all of our images into a great looking Doom3 material.

Open up your favorite text editing program and let's add the following code to a blank text file:

Code:
textures/custom/rockwall
{
    qer_editorimage  textures/custom/rockwall_ed.tga       // custom DOOMEdit material preview image

    diffusemap       textures/custom/rockwall_d.tga        // color and value information for the material
    specularmap      textures/custom/rockwall_s.tga        // specular highlights
    bumpmap          textures/custom/rockwall_local.tga    // normalmap for bumpmapped appearance
}


Now save your text file as Doom_III/base/materials/custom.mtr.

=================

We're all done with the material creation process. Now fire up DOOMEdit and place the new material on some brush faces. The material can be accessed from the Media Browser (shortcut: 'M' key) under "materials/textures/custom/rockwall".

After assigning the material to some brushes, bring up the Doom console and use "testmap yourmapname" to compile and test the map.

See the shiny highlights ingame? Those are the specular highlights that give the rocky surface a slippery wet look.

Some final thoughts:

DoomEdit handles materials much better than Radiant handled shaders. No more 'shaderlist.txt' registrations (w00t! :grin: ). DoomEdit automatically makes accessable every valid material found in any file in the 'materials' folder.

:!: IMPORTANT :!:

For those of you working on image creation and modification, I HIGHLY recommend turning Doom3's texture caching off. Do this at the console by typing the following:

Code:
image_usePrecompressedTextures 0


By default, Doom3 is set up to create a cache of all images. This cache is generated the first time an image is used by the system. This cache doesn't automatically update if image modifications are made, therefore you will not see changes you make to images unless the cache is disabled. This really screwed with my head for quite some time. :evil: Having caching turned off will increase load times, but it appears to be the only (?) way for you to see image modifications reflected in the engine.



TheCray_nz@Posted: Sat Mar 01, 2003 2:13 pm :
I'm glad to see I'm not the only one using this approach, but a few things which I personally think make the end result better (and you might as well)
First, Use a scale of around 8 - 16 in the normal map filter.
Next, greyscale the final image, and run image->adjust->Auto Levels over it.
Then copy, paste and overlay the result into your diffuse texture. Finally, tinker with the opacity of the normalmap layer before flattening (I like 75% opacity).

This forum is the greatests :)



mohh@Posted: Sat Mar 01, 2003 7:22 pm :
Thanks for the tutorial!



BNA!@Posted: Sat Mar 01, 2003 9:37 pm :
TheCray_nz wrote:
This forum is the greatests :)


Good to hear that!

And thanks for you suggestions!



kat@Posted: Wed Jun 25, 2003 11:52 pm :
was looking thru this earlier and non of the images are showing up atm..?



TheCray_nz@Posted: Thu Jun 26, 2003 3:21 am :
well it is 6 months old, prolly been deleted. The text is quite good at describing what to do so it should be enough to go by.



kat@Posted: Thu Jun 26, 2003 3:32 am :
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:



BNA!@Posted: Thu Jun 26, 2003 8:21 am :
kat wrote:
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:


Eventually just a quick server downtime, but I should really host the images on my own server.

Thanks for looking.



IzNoGoOd@Posted: Tue Aug 12, 2003 9:02 am :
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.



BNA!@Posted: Tue Aug 12, 2003 10:28 am :
IzNoGoOd wrote:
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.


http://developer.nvidia.com/object/ps_n ... ilter.html



BNA!@Posted: Tue Aug 12, 2003 11:36 am :
AZ wrote:
II. Render a normalmap
2. Select White as foreground and black as background

Where can i set that?


In Photoshop take a look to the left bar - there are two colored squares intersecting each other combined with an arrow.

Quote:
Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

Layer menu have only 4 active action no flatten is available


Don't have photoshop here, but I think it's edit > flatten layer



Starbuck@Posted: Fri Aug 15, 2003 7:26 pm :
in photoshop, pressing d will set the foreground color to black and the background to white.

If you want them the other way round just click the <--> next to the foreground and background color swatches



rich_is_bored@Posted: Wed Sep 24, 2003 9:50 pm :
I'm not sure if this has been mentioned before but Nvidia apparently has updated the normal map plugin quite a few times since this tutorial was written.

Now you have the option to invert the X or Y axis.



kat@Posted: Wed Sep 24, 2003 10:50 pm :
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html



BNA!@Posted: Thu Sep 25, 2003 5:57 am :
kat wrote:
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html


Thanks kat - first they make a big deal out of it and then they hide it deep in their folder structure dungeons.



Yarik1@Posted: Fri Mar 05, 2004 5:27 pm :
When I try to add the normal map filter to my plugins folder, I get this message at start up of Photoshop 7
"Cannot locate file d3d9.dll"
Everytime I try to change folders to another, it keeps poping up. And I STILL dont see a nvtool plugin in my filter directory, some help?



rich_is_bored@Posted: Fri Mar 05, 2004 5:47 pm :
Google is great for that kinda stuff...

Quote:
d3d9 - d3d9.dll - DLL Information

DLL File: d3d9 or d3d9.dll
DLL Name: Microsoft Direct3D
Description: Part of Microsoft DirectX 9 and is usually necessary for all games and programs that use advanced graphics.
Part Of: DirectX
System DLL: No
Common Errors: File Not Found, Missing File, Exception Errors


My guess is the latest version of the photoshop plugin requires DX9.



TheCray_nz@Posted: Fri Sep 03, 2004 4:22 am :
DaJuice wrote:
Stupid question maybe, but does using jpg images save on video memory when you're running the game, or will a 512x512 jpg image have the same memory footprint as a 512x512 tga image? I know of course that the jpg is smaller in file size, but I was under the impression that game engines don't utilize the compression, and memory usage is just dependent on image resolution.

The compressed and uncompressed images will take up the same amount of space in memory.



DaJuice@Posted: Fri Sep 03, 2004 5:31 am :
Thanks TheCray, that's what I figured.



Kuusi1@Posted: Fri Sep 03, 2004 2:24 pm :
rich the texture is not just there and i have no clue whats wrong!!



Kris-Tof@Posted: Fri Sep 03, 2004 6:58 pm :
The fact that the scale is 1000 in the snapshot from the tutorial is questionable and may induce many to think this is actually a valid value.

Something bigger than 200 (already outragious) is not realistic.

Maybe 10 would have been enough...

my 2cents



Lunaran@Posted: Fri Sep 03, 2004 7:21 pm :
The origin of the idea that Doom3 doesn't support JPeg I would guess comes from the alpha, which despite my best efforts wouldn't accept anything other than Targa.

Compression in memory is to save space on the card. Compression on disk makes your download smaller.
Although since pk3's compress also, it depends on the image whether a jpeg will be smaller than a zipped targa. The less color variation in an image, the smaller the jpeg gets - a black image will make for a jpeg of just a few KB regardless of dimensions.

Uh ... thus ends today's lesson. yeah.



eskimo roll@Posted: Fri Sep 03, 2004 7:32 pm :
Kris-Tof wrote:
The fact that the scale is 1000 in the snapshot from the tutorial is questionable and may induce many to think this is actually a valid value.

Something bigger than 200 (already outragious) is not realistic.

Maybe 10 would have been enough...

my 2cents


which tutorial are you talking about?

Kuusi1, all I can suggest is you zip everthing up with the filestructure you are using and upload them to see if you get a more educated view of the problem, sometimes it's better to get your hands dirty.



Cryect@Posted: Fri Sep 03, 2004 9:17 pm :
He's referring to the normal map generation. You have a scale of a 1000 for the heightmap which is huge. Heh, as he said prolly be better to give something a little more reasonable. I was wondering why the normal map shown in the pictures looked so strange and that explains it :P



eskimo roll@Posted: Fri Sep 03, 2004 10:27 pm :
Cryect wrote:
He's referring to the normal map generation. You have a scale of a 1000 for the heightmap which is huge. Heh, as he said prolly be better to give something a little more reasonable. I was wondering why the normal map shown in the pictures looked so strange and that explains it :P


Oh I see, yup 1000 may be a little on the high side, been using anything from 5 - 50



Ubiquitous@Posted: Fri Sep 03, 2004 11:20 pm :
Is it possible to create a reflection map so that you can define certain areas of a material to be reflective to create, for example, puddles of water on the floor.

Ubiquitous



kat@Posted: Fri Sep 03, 2004 11:37 pm :
Kind of, what you're asking sounds like the old Q3 'environment map' - basically a image of something that looks like an inside or outside area which was placed on the texture as an 'overlay' (just another layer in the shader file) an warped to look distorted and thus 'reflected'.

Best thing to do is find a part of the map (the bathrooms perhaps?) where they've used 'reflective' surfaces and then check the material files for that to see how they did it, it most likely won't be a 'real' reflection' but faked as per above.



Cryect@Posted: Sat Sep 04, 2004 2:18 am :
If you want a reflection cube, goto someplace in the level where you want it and then bring up the console and use envshot XRes YRes NumSamples



Ubiquitous@Posted: Sat Sep 04, 2004 11:39 am :
thanks guys, i'll give this a try


ubiquitous



Black Dog@Posted: Sat Sep 04, 2004 12:08 pm :
Quote:
Is it possible to create a reflection map so that you can define certain areas of a material to be reflective to create, for example, puddles of water on the floor.


Yep. Sounds like you want alpha channel blending.



Kuusi1@Posted: Sat Sep 04, 2004 12:38 pm :
can someone do me the local and other TGA images for me... and the code i cant do it rigth now myself :cry:
but i think i will learn it someday!! :)

so just email me if someone can do it my email is
Kuusi11@hotmail.com
and i have MSN messenger



rosier_ramirez@Posted: Mon Sep 06, 2004 11:58 pm :
I have a question about importing models with custom textures on them...for some reason the flashlight does not show up when u run it across them....is this the texture or what? Any help will be greatly appreciated!!!



rosier_ramirez@Posted: Tue Sep 07, 2004 12:14 am :
what about when u shoot your gun at it to...why doesnt it leave a black mark like other textures that come with the game do



rich_is_bored@Posted: Tue Sep 07, 2004 12:15 am :
Sounds like a material shader issue but then again I don't have any of your files to test.



rosier_ramirez@Posted: Tue Sep 07, 2004 6:38 am :
just have the mtr file that points to the textures...i was following one of those vid tuts

textures/custom/test
{
qer_editorimage textures/custom/test_ed.tga

diffusemap textures/custom/test_d.tga

specularmap textures/custom/test_s.tga
}



Black Dog@Posted: Tue Sep 07, 2004 7:35 am :
Hmm, that's a bit wierd. Try using this material instead:

textures/custom/test_forceoverlays
{
qer_editorimage textures/custom/test_ed.tga
forceOverlays

diffusemap textures/custom/test_d.tga

specularmap textures/custom/test_s.tga
}



rosier_ramirez@Posted: Tue Sep 07, 2004 8:24 am :
i had a mistype in the ase file...thanks for the help guys



abigserve@Posted: Wed Sep 22, 2004 7:23 am :
i don't have a 'textures' folder in my doom 3 base folder. Do i have to extract a PAK or something? If so were can i get the software for this :oops:



rich_is_bored@Posted: Wed Sep 22, 2004 7:33 am :
PK4's are nothing more than renamed zips. You can extract them with WinZip or WinRar.

I advise you to extract them outside your Doom 3 folder though to avoid conflicts.

BTW, this thread is a must read...

http://www.doom3world.org/phpbb2/viewtopic.php?t=3



abigserve@Posted: Wed Sep 22, 2004 7:40 am :
ok. So if i extract ???.PK4 i will get the texture folder?



rich_is_bored@Posted: Wed Sep 22, 2004 8:37 am :
Have you opened any of the PK4's yet?

If you opened pak004.pk4 you'd have seen that it contains a "textures" folder.

Don't be afraid to try things. You don't have to extract an archive to view it's contence. There's no harm done in viewing an archive.

I know this is just your second question, and in that respect, this isn't entirely aimed at you, but please try to understand that we get alot of redundant questions and not many people are going to be as patient as I have.

It's alot easier for people like myself to set aside the time to answer you if you prove that you're capable of doing a little bit of work yourself.



abigserve@Posted: Wed Sep 22, 2004 10:08 am :
ok i understand where ur coming from, so i'll just ask one more question about this ( i only asked to be sure i don't stuff up my game):

I have heard that if you put the files back into the doom3/base folder, it can create problems if you also have the pak there as well. Should i delete the original pak now that i have extracted the files?

Thank you for your patience in dealing with a total newb



phooka@Posted: Wed Sep 22, 2004 11:12 am :
NEVER delete the original pack. BTW, you don't need to put the textures and info you just unpacked INSIDE the base folder. The only thing you wanna put there are your MODIFIED textures and scripts.

Create another folder outside doom (i.e., C:/abigserve_fiddling_with_doom/workshop/

Put all your unpacked files inside that folder. Modify things without worrying about your base file...



rich_is_bored@Posted: Wed Sep 22, 2004 6:29 pm :
I mentioned the problem with extracting packs to the base directory in my first responce.

rich_is_bored wrote:
I advise you to extract them outside your Doom 3 folder though to avoid conflicts.



abigserve@Posted: Thu Sep 23, 2004 12:39 am :
Quote:
I advise you to extract them outside your Doom 3 folder though to avoid conflicts.


sry, about that man.
Heres what i've done:

1. I've extracted allmost all my paks into a folder named doom3test (c:/doom3test)
2. I placed my texture tga's into a new folder named 'custom' (c:/doom3test/pak001/dds/textures/custom/whitewall_d,s,local.tga)
3. I created a new text document in my 'materials' folder (c:/doom3test/pak000/materials/custom.mtr)
4 i used this code:
Code:
c:/doom3test/pak001/dds/textures/custom/whitewall
{
    qer_editorimage  c:/doom3test/pak001/dds/textures/custom/whitewall_d.tga
    diffusemap       c:/doom3test/pak001/dds/textures/custom/whitewall_d.tga       
    specularmap     c:/doom3test/pak001/dds/textures/custom/whitewall_s.tga   
    bumpmap        c:/doom3test/pak001/dds/textures/custom/whitewall_local.tga
}


to point the .mtr towards the texture files (just like in the tut)

5. I started up doom3edit and pressed M to bring up the material browser.
6. I clicked on textures.
7.I scrolled down.

But my custom folder wasn't there. Have i done something wrong in the code? I am i just an idiot and i've done somethig retardedly simple wrong.

Please bestow what is left on your patience on an eager-to-learn kid.



rich_is_bored@Posted: Thu Sep 23, 2004 3:57 am :
Consider the doom3test directory a reference and nothing more.

When you create new content for the game you'll need to place that inside the Doom 3 folder.

So, move all your custom targas into [Your Doom 3 Directory]\base\textures\custom.

Then, move your MTR file into [Your Doom 3 Directory]\base\materials.

Then open the MTR file and change it to look like this...

Code:
textures/custom/whitewall
{
    qer_editorimage  textures/custom/whitewall_d.tga
    diffusemap       textures/custom/whitewall_d.tga       
    specularmap     textures/custom/whitewall_s.tga   
    bumpmap        textures/custom/whitewall_local.tga
}


Now, what you'll notice is that I left out the entire path because doom 3 only looks at the relative path from the base folder. So, when you tell the game to look in c:/doom3test/pak001/dds/textures/custom/ you're actually telling the game to look in [Your Doom 3 Directory]c:/doom3test/pak001/dds/textures/custom/ which doesn't exist.

I'm also going to break down the material shader format real quick just to give you a push in the right direction...

Code:
NAME_OF_TEXTURE
{
   IMAGE/BLEND_TYPE      RELATIVE_PATH/FILENAME
}


So, in your new shader textures/custom/whitewall is the name of the texture and does not represent a physical path to the texture. However, in the media browser your texture will be listed in textures/custom/. This is strictly for organization in the editor.

You could name your material textures/zippity/do/da/whitewall and while that folder does not exist physically, you'd find your texture in that location in the editor.

Make sense?



abigserve@Posted: Thu Sep 23, 2004 4:06 am :
Makes perfect sense! Easily explained and everything!
One problem...I LITERALLY DONT HAVE A TEXTURE FOLDER IN MY c:/program files/doom3/base DIRECTORY. I already know i can't move my extracted files into my doom3 base directory, so i don't know what else i can do.



rich_is_bored@Posted: Thu Sep 23, 2004 4:12 am :
Sure you don't have a textures folder in c:/program files/doom3/base but what stops you from creating one? And then again inside the textures folder making a folder named custom? Ect... ect... ect...

No, you're not going to bork Doom 3 up. :wink:



abigserve@Posted: Thu Sep 23, 2004 4:19 am :
I honestly dont! Heres proof...
http://img.photobucket.com/albums/v335/ ... 65f157.jpg

I guess i'll have to create one...



rich_is_bored@Posted: Thu Sep 23, 2004 4:31 am :
I guess I left a comma out or something because you misunderstood what I was saying.

What I meant was "Yes, of course you don't have a textures folder. But, you can make one."



abigserve@Posted: Thu Sep 23, 2004 4:36 am :
You need more emoticons on this forum. wheres the :OMG!!! THIS WHOLE TIME!!!: one. i guess this will have to do: :D:D:D
I'll get right on that :D

[edit] Working 120%!!!

And its all thanks to the good people at your local doom3 forum :D



nsignific@Posted: Sun Sep 26, 2004 2:19 pm :
Hi, completely newbie question, but hell.

How do I refresh a changed texture (for example, if I change the spec. map) within the editor? Besides restarting the entire editor?



obihb@Posted: Sun Sep 26, 2004 2:38 pm :
In the top menu bar click... Materials > Reload



nsignific@Posted: Sun Sep 26, 2004 3:27 pm :
I've done that, but the textures remain the same in the cam window as well as the texture browser.



De@Posted: Sun Sep 26, 2004 5:51 pm :
in the console type 'reloadimages'
the 'reload' button on the material inspector/list will reload only the material file not images

but the reloadimages command will only reload the images, not the material file



nsignific@Posted: Sun Sep 26, 2004 6:46 pm :
Thank you.



resumil@Posted: Fri Oct 22, 2004 9:26 pm :
BNA! wrote:
kat wrote:
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html


Thanks kat - first they make a big deal out of it and then they hide it deep in their folder structure dungeons.


Updated link:
http://download.nvidia.com/developer/NVTextureSuite/NVIDIA_Photoshop_Plugins_6.6.0827.1800.exe



Drin@Posted: Sat Oct 30, 2004 8:29 pm :
my texture isnt showing up in the material or the texture browser in doom3 editor. Ive placed my .mtr in materials/drin/carpet.mtr and my textures in textures/custom/carpet_....tga, and im sure the mtr text points it to the right directory, but it still wont show.



Argoon@Posted: Sun Feb 13, 2005 2:39 am :
You need to save you mtr as an MTR file if you look your mtr is a text file.


Like this ( in the your text editor save as "custom.mtr" with the parentheses, in your materials folder.



KoRnScythe@Posted: Thu Feb 17, 2005 4:46 am :
I'm reviving this when I really shouldn't, but I have a major problem.

It's either my computer sucks ass, which it doesn't... Or it's that somethings wrong.

I do the cloud thing, then I use the nvidia tools, when I got everything down and done, scaled 1000 and such, it gets all rigged and liney, then adobe photoshop drops saying I don't have enough RAM (or memory)

It's kind of bull, I don't see how it doesn't have enough... To even make a damn texture, now my whole computer is a bit messed up.

Help anyone???



rich_is_bored@Posted: Thu Feb 17, 2005 5:19 am :
I have some questions for you...

When you say "scaled 1000" are you refering to the scale textbox in the NV plugin?

What's the resolution of the image you're running through the plugin?

How much RAM is allocated for use by Photoshop? (Look in Edit > Preferences > Memory and Image Cache)

Are you using multiple scratch disks or just one and what would be the total amount of free space between all your scratch disks?

And finally are you using the latest version of the plugin?



xfxgeforced@Posted: Sun Feb 27, 2005 8:23 pm :
ok, i have a few problems, first off, after i put in that command that turns off the cacheing that he told everyone to do my game looked like this, notice the smoke that comes off when the bullet hits the groun is two squares
http://img149.exs.cx/img149/7620/doom3prob7ty.jpg

and also, when i bring down the command thing the text doesnt show, so i hav to blind type

and in photoshop when i am making the specular image, and i make the clouds, when i try and do the nvidia normal mapping thing it just turns it into an all purple image and i cannt preview it, the finished rockwall is in the screenshot above^ and it doesnt look right HELp



rich_is_bored@Posted: Mon Feb 28, 2005 4:52 am :
This tutorial was written back in 2002, prior to the release of the retail version of the game. It may not be nessicary anymore to set the CVAR image_usePrecompressedTextures to 0.

Try changing it back and see if that solves the problem.

Also, it would help to see what your material shader looks like.

Quote:
...in photoshop when i am making the specular image, and i make the clouds, when i try and do the nvidia normal mapping thing it just turns it into an all purple image and i cannt preview it


Maybe you're having trouble describing your problem but, why would you be using the normal map plugin during the creation of a specular map?



PaganRaven or BlondeOvine@Posted: Tue Jul 12, 2005 12:51 am :
even the newest link is broken now. I need that plug-in.... (and YES, I did try looking around on the nvidia site and cant find it)



rich_is_bored@Posted: Tue Jul 12, 2005 6:18 am :
This link should always be valid...

http://www.google.com/search?hl=en&q=NV ... ling+Lucky



zigzulquit@Posted: Wed Nov 30, 2005 8:15 am :
Well as usual... after I post my question... & after all night, I figure it out.
But I wouldn't have if it wasn't for this awesome site, thanks for existing.

Thanx to rich in particular, the test bump map link made the difference.
Now that this is working, I feel alot better about spending the 108.oo for
adobe photoshop, & all night carefully reading the 8 pages of this thread
like 8 times. :wink:

The problem for me was adding --> .mtr & .tga <-- at the end of my file
names. But I still have them in my MTR script.

I do have a question though, appearantly the nvidia plugin is some what
updated. The "Auto Contrast" is nolonger under "Image/Adjust", it's under
"Enhance" now. I never found an "unsaturate though". I assumed it was
less color so I made the image totally gray, via Enhance/Adjust Color/
Adjust Hue Saturation. Which brings me to my question. Is this wrong?

My texture did looked decent, & had the specular effect too.



Kathaarsis@Posted: Fri Dec 15, 2006 3:28 am :
I followed this tutorial, but instead of making a rockwall texture, I tried to make a wooden texture. Heh, it came out looking like sludge. I liked the tutorial, though.



BuddhaMaster@Posted: Fri Feb 16, 2007 10:02 am :
Hey i've read that tutorial and made everything as described. But always when i try to select my texture in the editor: Texture stays black & console gives message 'Warning: Could not load Image' !

I've made all textures, with ending _d _local _s and _ed, put them in my textures folder, made a new .mtr file, inside 'materials' folder (same name as my texture folder) and wrote everyting needed inside (same name as my texture). But still it doesnt work !

Textures are size: 1024x1024 ! Is this too big ? (anyway i tried it 512x512)
Also i put the same textures just in .dds format in same location inside 'dds' folder (in case it doesnt work trough anything with the texture-compression)
Is that ok ?

Why isnt it working at all ? :?:



rich_is_bored@Posted: Fri Feb 16, 2007 1:02 pm :
The names of the files are irrelevant so long as the image references in material shader are correct. The resolution of the images is irrelevant so long as they are a power of two. And a lack of DDS format images shouldn't cause a black material.

I'm pretty sure it's your material shader itself but I can't say since that's the one bit of information you didn't share with us.



LDAsh@Posted: Fri Feb 16, 2007 1:59 pm :
I think it's r_useprecompressedtextures 1 (or is it 0) you need to set, but I thought this was a Quake IV-only problem. I _think_ if you set r_useprecompressedtextures to 1 and you don't have a DDS file for your texture, it will show up black (at least on my setup it does) so either get a proper DDS or set that command.



rich_is_bored@Posted: Sat Feb 17, 2007 6:18 am :
That's a possibility aswell.



DoomAddict@Posted: Mon Apr 07, 2008 11:02 pm :
What if you can't afford photoshop?



rich_is_bored@Posted: Tue Apr 08, 2008 8:27 am :
You don't need Photoshop. There are plenty of open source alternatives. Infact, I've been meaning to switch for a while now. I just haven't had a need to do raster image work lately.

http://www.osalt.com/photoshop

And there are also lots of specialized tools (some of which are commerical software) listed on the wiki including two personal favorites of mine, Texture Maker and SkyPaint...

http://www.modwiki.net/wiki/Texturing#Texture_resources



Doomguy87@Posted: Sat Jun 28, 2008 10:59 pm :
wat if u dont have photoshop?



6th Venom@Posted: Sat Jun 28, 2008 11:17 pm :
Doomguy87 wrote:
wat if u dont have photoshop?

Gimp or another free program.



Doomguy87@Posted: Sat Jun 28, 2008 11:28 pm :
does anyone know how to use GIMP???



Douglas Quaid@Posted: Sun Jun 29, 2008 1:00 am :
Get out the Gimp :D ...and have a look at it!



BNA!@Posted: Tue Dec 24, 2002 8:20 am :
Ok, this tutorial is from one of our fellow users - and trust when I say it's the best I've seen so far:


Greeting fellow Doom haxors. I've put together the first installment of a two part semi-exhuastive study of Doom 3 material creation. Enjoy...

Some housekeeping before we get started:

First of all, we will need to download NVidia's NormalMapFilter plug-in for Photoshop. The plug-in can be downloaded here:

http://developer.nvidia.com/docs/IO/117 ... Filter.8bf

This file needs to be placed in Photoshop's filter plug-ins directory. The plug-ins directory should contain other .8bf files. More information about the NVidia filter and its uses can be found here:
http://www.cyberloonies.com/bump-mapping.html

Create a new folder called "custom/" in "Doom_III/base/textures/". This is where we will save our new textures for our material stages.

=================

Now for the fun stuff. Open up Photoshop and let's draw the stages.

I. Draw a diffusemap texture

This stage will serve primarily as color information for the material. This is basically just a standard RGB texture with dimensions based on powers of 2. The image should contain color and value information. A simple flat brown texture would work fine, but I whipped up this seamlessly tiling example by playing around with the drawing tools.

Image

Save your diffusemap as Doom_III/base/textures/custom/rockwall_d.tga
By convention, diffusemap texture names are denoted with a "_d" suffix.

:!: Make sure to save all your material textures as Targas because the Doom3 alpha leak doesn't seem to like Jpegs. For this tutorial, save all targas as 24-bit as we will not be making use of an alpha channel.

II. Render a normalmap

A normalmap contains per-pixel dynamic lighting information. Essentially, it uses the color information for each pixel to determine the direction from which a light source would highlight the pixel. A normalmap can be generated from an elevation map through NVidia's wonderful little NormalMapFilter Photoshop plug-in.

1. Create new 512x512 RGB image as the NormalMapFilter only works on images with dimensions based on powers of 2.

2. Select White as foreground and black as background

3. From the pulldown menus select: Filter -> Render -> Clouds

Image

This cloud pattern serves as an elevation map for the NormalMapFilter plug-in. In the elevation map, white represents high spots on the texture and black represents low spots.

Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

4. Now apply NVidia's normalmap filter: Filter -> nvTools -> NormalMapFilter

You may get a warning message about channel selection and alphaheight. This is not a problem. Just click on OK.

Image

Use the settings depicted in the image above and then apply the normalmap color information to the image by by clicking OK.

5. Now resize your image to 256x256. A 512x512 normalmap is overkill in this instance.

Image

6. Save your normalmap as Doom_III/base/textures/custom/rockwall_local.tga

By convention, diffusemap texture names are denoted with a "_local" suffix. I have no idea why this is.

III. Render a specularmap

The specular map stage allows specular hightlights to be added to the material. Specular highlights give the surface a shiny, light-reflective look. In the case of our rock wall, it will give the rock a slightly wet look. Because the specularmap is an additive blend, light areas of the specularmap will create drastic specular highlights while dark areas will create none.

For now, lets just use simple fractal clouds to generate the specular map.

1. Create new 256x256 RGB image

2. Filter -> Render -> Clouds

3. Image -> Adjust -> Auto Contrast

Image

The lighter regions of the texture will translate to shiny areas (specular highlights) on the final material.

4. Save your specularmap as Doom_III/base/textures/custom/rockwall_s.tga

By convention, diffusemap texture names are denoted with a "_s" suffix.

IV. Create a DOOMEdit Preview image

This final image will serve as a material preview when working in DOOMEdit.

1. Open up your newly create rockwall_local.tga and rockwall_d.tga images.

2. Create a new 256x256 RGB image and call it "rockwall_ed"

3. Copy the entire contents of rockwall_d.tga and paste it as a new layer into your new "rockwall_ed" image.

4. Copy the entire contents of rockwall_local.tga and paste it as a new layer into "rockwall_ed", on top of the layer you just pasted from rockwall_d.

5. Apply the following functions to the top layer of "rockwall_ed" (the layer containing the normalmap source).

a. Image -> Adjust -> Desaturate
b. Image -> Adjust -> Auto Contrast

6. Now change the blending mode of the top layer from "Normal" to "Overlay". This is done from the "Layers" tab.

This should give you a shaded and colorized version of your material.

Image

7. Save your editor image as Doom_III/base/textures/custom/rockwall_ed.tga

By convention, editor preview texture names are denoted with a "_ed" suffix. However, I have seen this convention broken in the Doom3 alpha materials.

=================

That wraps up our image creation. Now lets create a quick material script to pull all of our images into a great looking Doom3 material.

Open up your favorite text editing program and let's add the following code to a blank text file:

Code:
textures/custom/rockwall
{
    qer_editorimage  textures/custom/rockwall_ed.tga       // custom DOOMEdit material preview image

    diffusemap       textures/custom/rockwall_d.tga        // color and value information for the material
    specularmap      textures/custom/rockwall_s.tga        // specular highlights
    bumpmap          textures/custom/rockwall_local.tga    // normalmap for bumpmapped appearance
}


Now save your text file as Doom_III/base/materials/custom.mtr.

=================

We're all done with the material creation process. Now fire up DOOMEdit and place the new material on some brush faces. The material can be accessed from the Media Browser (shortcut: 'M' key) under "materials/textures/custom/rockwall".

After assigning the material to some brushes, bring up the Doom console and use "testmap yourmapname" to compile and test the map.

See the shiny highlights ingame? Those are the specular highlights that give the rocky surface a slippery wet look.

Some final thoughts:

DoomEdit handles materials much better than Radiant handled shaders. No more 'shaderlist.txt' registrations (w00t! :grin: ). DoomEdit automatically makes accessable every valid material found in any file in the 'materials' folder.

:!: IMPORTANT :!:

For those of you working on image creation and modification, I HIGHLY recommend turning Doom3's texture caching off. Do this at the console by typing the following:

Code:
image_usePrecompressedTextures 0


By default, Doom3 is set up to create a cache of all images. This cache is generated the first time an image is used by the system. This cache doesn't automatically update if image modifications are made, therefore you will not see changes you make to images unless the cache is disabled. This really screwed with my head for quite some time. :evil: Having caching turned off will increase load times, but it appears to be the only (?) way for you to see image modifications reflected in the engine.



TheCray_nz@Posted: Sat Mar 01, 2003 2:13 pm :
I'm glad to see I'm not the only one using this approach, but a few things which I personally think make the end result better (and you might as well)
First, Use a scale of around 8 - 16 in the normal map filter.
Next, greyscale the final image, and run image->adjust->Auto Levels over it.
Then copy, paste and overlay the result into your diffuse texture. Finally, tinker with the opacity of the normalmap layer before flattening (I like 75% opacity).

This forum is the greatests :)



mohh@Posted: Sat Mar 01, 2003 7:22 pm :
Thanks for the tutorial!



BNA!@Posted: Sat Mar 01, 2003 9:37 pm :
TheCray_nz wrote:
This forum is the greatests :)


Good to hear that!

And thanks for you suggestions!



kat@Posted: Wed Jun 25, 2003 11:52 pm :
was looking thru this earlier and non of the images are showing up atm..?



TheCray_nz@Posted: Thu Jun 26, 2003 3:21 am :
well it is 6 months old, prolly been deleted. The text is quite good at describing what to do so it should be enough to go by.



kat@Posted: Thu Jun 26, 2003 3:32 am :
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:



BNA!@Posted: Thu Jun 26, 2003 8:21 am :
kat wrote:
heh yeh, I was just looking thru some of the stickies when I realised the screenies weren't showing.. they are now so thnx to either yourself or BNA for getting back up :wink:


Eventually just a quick server downtime, but I should really host the images on my own server.

Thanks for looking.



IzNoGoOd@Posted: Tue Aug 12, 2003 9:02 am :
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.



BNA!@Posted: Tue Aug 12, 2003 10:28 am :
IzNoGoOd wrote:
Hello,
the link http://developer.nvidia.com/docs/IO/1176/ATT/NormalMapFilter.8bf is dead, it's possible to send a new URL or send this to my e-mail plzzz (cHo7-IzNo@wanadoo.fr)...
Thx in advance.


http://developer.nvidia.com/object/ps_n ... ilter.html



BNA!@Posted: Tue Aug 12, 2003 11:36 am :
AZ wrote:
II. Render a normalmap
2. Select White as foreground and black as background

Where can i set that?


In Photoshop take a look to the left bar - there are two colored squares intersecting each other combined with an arrow.

Quote:
Now, if your image for some reason is not flattened, flatten it now:
Layer -> Flatten Image

Layer menu have only 4 active action no flatten is available


Don't have photoshop here, but I think it's edit > flatten layer



Starbuck@Posted: Fri Aug 15, 2003 7:26 pm :
in photoshop, pressing d will set the foreground color to black and the background to white.

If you want them the other way round just click the <--> next to the foreground and background color swatches



rich_is_bored@Posted: Wed Sep 24, 2003 9:50 pm :
I'm not sure if this has been mentioned before but Nvidia apparently has updated the normal map plugin quite a few times since this tutorial was written.

Now you have the option to invert the X or Y axis.



kat@Posted: Wed Sep 24, 2003 10:50 pm :
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html



BNA!@Posted: Thu Sep 25, 2003 5:57 am :
kat wrote:
I just spent 30mins trying to track down the url... here it is to save you some time

http://developer.nvidia.com/object/ps_t ... lugin.html


Thanks kat - first they make a big deal out of it and then they hide it deep in their folder structure dungeons.



Yarik1@Posted: Fri Mar 05, 2004 5:27 pm :
When I try to add the normal map filter to my plugins folder, I get this message at start up of Photoshop 7
"Cannot locate file d3d9.dll"
Everytime I try to change folders to another, it keeps poping up. And I STILL dont see a nvtool plugin in my filter directory, some help?



rich_is_bored@Posted: Fri Mar 05, 2004 5:47 pm :
Google is great for that kinda stuff...

Quote:
d3d9 - d3d9.dll - DLL Information

DLL File: d3d9 or d3d9.dll
DLL Name: Microsoft Direct3D
Description: Part of Microsoft DirectX 9 and is usually necessary for all games and programs that use advanced graphics.
Part Of: DirectX
System DLL: No
Common Errors: File Not Found, Missing File, Exception Errors


My guess is the latest version of the photoshop plugin requires DX9.