Jump to content
The Dark Mod Forums

List of Inverted Normal Maps


Serpentine

Recommended Posts

This thread is intended for reporting materials and models containing problematic textures.

 

Materials belonging to the wrong type - a wood texture that sounds like stone.

Non-power-of-two sized textures - if a texture has dimentions that are not power of two. 64x128 115x73

Bad alpha textures - There are parts of a texture which should be transparent, but instead are opaque. Example

And any other texture/material related issue. If you are not sure what to call it or how to describe it please include a screenshot! :)

 

An inverted normal will have shadows where there should be rises, and rises where there should be shadows - cracks in wood would stick out of the wood, instead of into the wood as they are intended. As an example :

Inverted Fireplace Texture

 

If you're making materials in an automated normal application - please remember that Doom3 uses the "Direct3D" style normals, not OpenGL as you would assume.

 

To get a name, select the material in DR, hit "S" for surface inspector and copy the name, for models, find the offending model and get its active material/name.

 

The urls linked here aer for people who are releasing an FM before the fixes have been officially released, so that they may override the broken one with a fixed one.

 

Confirmed Bad Normals:(fixed in next version) (unknown/not fixed)

 

models/darkmod/props/textures/fireplace_brick url

textures/darkmod/wood/boards/weathered Internal

textures/darkmod/stone/flat/smooth/marble_black_squares url

 

Non power-of-two textures:

guis/assets/readables/books/leftpagecurl

guis/assets/readables/books/book_leftpage_01

guis/assets/readables/books/book_leftpage_curled_01

guis/assets/readables/books/rightpagecurl

guis/assets/readables/books/book_rightpage_curled_01

guis/assets/readables/books/book_rightpage_01

textures/darkmod/stone/flat/smooth_marble_trim01_s_tiling_1d Internal

textures\darkmod\decals\dirt\long_drip_pattern01 url

textures\darkmod\stone\flat\smooth_ceramic_tile_tan02 url

textures\darkmod\stone\flat\smooth_ceramic_tile_gold01 url

models\darkmod\props\textures\bc_stair01 url

models\darkmod\props\textures\bc_stair01_local url

models\darkmod\props\textures\table_medallion - not referenced

models\darkmod\props\textures\table_medallion_s - not referenced

 

Models with texture issues:

models/darkmod/furniture/seating/chair_set01.lwo - Texture at the back is very distorted!

 

Possible Bad Normalmap Suspects(need to be checked):

hinge02

bucket_wood

chain1

corner_brace

framed_gables

framed_gables_small

old_cloth

shingles_red

Edited by Serpentine
Link to comment
Share on other sites

Just a quick question, is there an easy way to flip the normal map in a graphic program like gimp? Like open image, click "invert colors", then re-save? Or do you need to recreate the normalmap from scratch?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Just a quick question, is there an easy way to flip the normal map in a graphic program like gimp? Like open image, click "invert colors", then re-save? Or do you need to recreate the normalmap from scratch?

I use the normalmap plugin for the GIMP. (It's also good at generating normals)

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

To invert an already made normal map - all you need to do is to invert the green channel of the image.

 

In Photoshop :

  1. Open normal map
  2. Windows(menu bar) -> channels
  3. Select green channel (will hide red/blue)
  4. Select all (ctrl+A)
  5. Invert (ctrl+I)
  6. Show the other channels
  7. Check that it is correct

 

As for tools to use when creating normals, I would suggest SSBump. Though it is aimed at creating SSBumps for Source based games, its normal generator is I find, a lot better than both the nvidia and gimp plugins. The use of layering to seperate out elements of the image makes it much more realistic if you want high detail with realistic depth. Getting used to making normals takes very little time with it, I would suggest taking a texture you already have a 'good' normal map for and then trying to recreate it accurately. For most textures using 3 filters is advised - 2 is fine if there are either no large or fine details.

Edited by Serpentine
Link to comment
Share on other sites

Not a normal map issue, but stone/flat/smooth/tiling_1d/marble_trim01_brown produces crashes on some PCs, including Fidcal's and the one I am currently working on. I have no idea about the possible cause, but upon changing all instances of the texture into something else in my map, I experienced no further problems. It is possible that other similar textures exist; I got a crash at the beginning of Railgun's current beta mission. Other released missions work perfectly. The bug only affects some configuration; my home PC is free of it.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

To invert an already made normal map - all you need to do is to invert the green channel of the image.

 

Thanx, that was the info I was looking for. Will find out how to do this in Gimp.

 

Edit: Erm, it look like the green channel is the "up/down" information, while blue/red is the "left/right" information. Here is a screenshot of the original and the "inverted" normalmap. Is the result on the right side the one we want? (It doesn't look like that to me):

 

post-144-126202675798_thumb.jpg

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Not a normal map issue, but stone/flat/smooth/tiling_1d/marble_trim01_brown produces crashes on some PCs, including Fidcal's and the one I am currently working on. I have no idea about the possible cause, but upon changing all instances of the texture into something else in my map, I experienced no further problems. It is possible that other similar textures exist; I got a crash at the beginning of Railgun's current beta mission. Other released missions work perfectly. The bug only affects some configuration; my home PC is free of it.

 

I think it is because the specular map is not the same size (and not a power of two) of the diffuse:

 

 

$ imageinfo --geom dds/textures/darkmod/stone/flat/smooth_marble_trim01_s_tiling_1d.dds

499x284

$ imageinfo --geom dds/textures/darkmod/stone/flat/smooth_marble_trim01_brown_tiling_1d.dds

512x256

 

Can somebody with DDS tools please resize the specular map?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Might be a good idea to check the others at the same time, then.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Might be a good idea to check the others at the same time, then.

 

I have added a script that can do this kind of check (under Linux, with the help of find, xargs and imageinfo) and here is the result:

 

Warning: ./dds/guis/assets/readables/books/leftpagecurl.dds has a non-power-of-two size: 32 x 49.
Warning: ./dds/guis/assets/readables/books/book_leftpage_01.dds has a non-power-of-two size: 1024 x 705.
Warning: ./dds/guis/assets/readables/books/book_leftpage_curled_01.dds has a non-power-of-two size: 1024 x 705.
Warning: ./dds/guis/assets/readables/books/rightpagecurl.dds has a non-power-of-two size: 32 x 49.
Warning: ./dds/guis/assets/readables/books/book_rightpage_curled_01.dds has a non-power-of-two size: 1024 x 705.
Warning: ./dds/guis/assets/readables/books/book_rightpage_01.dds has a non-power-of-two size: 1024 x 705.
Warning: ./dds/textures/darkmod/stone/flat/smooth_marble_trim01_s_tiling_1d.dds has a non-power-of-two size: 499 x 284.
imageinfo: image type not supported `./dds/textures/test_window/window1_glass_local.dds' @ dds.c/ReadDDSImage/339.
Warning: ./dds/textures/test_window/window1_glass_local.dds not recognized as image:

imageinfo: image type not supported `./dds/textures/test_window/window1_combined_local.dds' @ dds.c/ReadDDSImage/339.
Warning: ./dds/textures/test_window/window1_combined_local.dds not recognized as image:


 

Btw, this could also be the source of the crash with ATI cards and the column model, does it maybe use this texture?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I think it is because the specular map is not the same size (and not a power of two) of the diffuse:

 

Spec map doesn't have to be the same size as the diffuse, but it should certainly be a power of 2.

 

edit: I've fixed it and put it up on SVN. I'd love to know if that fixes the pillar crash issue.

 

Thanx, that was the info I was looking for. Will find out how to do this in Gimp.

 

There's useful info on the wiki about this (unfortunately the image on the first is now lost).

 

http://wiki.thedarkmod.com/index.php?title=Inverting_Normalmaps

http://wiki.thedarkmod.com/index.php?title=Inverse_Normalmaps

Link to comment
Share on other sites

It makes sense that the pillar using that texture would produce a crash. Very interesting.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

The weathered wood is not an inverted map,

 

Is that the one in Bikerdude's shot? If so, I already fixed it (it did have an inverted green channel).

Link to comment
Share on other sites

Is that the one in Bikerdude's shot? If so, I already fixed it (it did have an inverted green channel).

 

Im losing my mind, forgive me.

 

I just spent the last 15 minutes learning how to swap directions/channels to reorient models with bad normals. I will have the fireplace one done in 5 min, just need to get some tea. If you've already done that, it wasnt a simple inverted chan, there are rotated bits that need to be swapped and other bits that arnt inverted at all... wonder if there are any other models like this.

Link to comment
Share on other sites

wonder if there are any other models like this.

 

It's certainly possible. I remember this was a common problem in the early years of the mod, and sometimes you don't catch it until you see the model in a certain light. Thanks for doing the fireplace, I hadn't had time to look at that one yet.

Link to comment
Share on other sites

  • 2 weeks later...

Updated the list a bit - keep your eyes open!

 

textures/darkmod/stone/flat/smooth_marble_trim01_s_tiling_1d was already fixed internal.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hmn I wonder why Tels' script didn't detect these? Have you fixed those already? Their editorimages aren't power of 2 as well, but that's not as important I guess.

 

textures\darkmod\decals\dirt\long_drip_pattern01.dds (662 x 314)

textures\darkmod\stone\flat\smooth_ceramic_tile_tan02.dds (236 x 236)

textures\darkmod\stone\flat\smooth_ceramic_tile_gold01.dds (234 x 234)

models\darkmod\props\textures\table_medallion.tga (580x593)

models\darkmod\props\textures\table_medallion_s.tga (580 x 593)

models\darkmod\props\textures\bc_stair01.tga (512 x 96)

models\darkmod\props\textures\bc_stair01_local.tga (512 x 96)

 

And since we're on it right now: I always wondered why textures have to be a power of two. Do you know the technical reason? I can only guess that it's because of the mipmaps, which are probably dyadic decompositions of the sourceimage and so a picturedimension not being a power of two would eventually result in non-integer mipmap dimensions. Assuming this is right, maybe the ATI drivers don't have some sort of exception handling for creating mipmaps dynamically, while nvidia drivers have. This should only be an issue with the tga-files though, since dds stores mipmaps as well, right?

 

Also you've got an editorimage duplicated, but with different aspect-ratios:

textures\darkmod\wood\boards\new_grainy_ed_tiling_1d.jpg

textures\darkmod\wood\boards\new_grainy_tiling_1d_ed.jpg

 

There are also two psd-files (I guess those shouldn't be in here as well, right?):

models\md5\chars\townsfolk\wench\wench_dress_work.psd

guis\assets\purchase_menu\purchase_image_template.psd (200x240)

Edited by STiFU
Link to comment
Share on other sites

Hmn I wonder why Tels' script didn't detect these? Have you fixed those already? Their editorimages aren't power of 2 as well, but that's not as important I guess.

 

textures\darkmod\decals\dirt\long_drip_pattern01.dds (662 x 314)

textures\darkmod\stone\flat\smooth_ceramic_tile_tan02.dds (236 x 236)

textures\darkmod\stone\flat\smooth_ceramic_tile_gold01.dds (234 x 234)

models\darkmod\props\textures\table_medallion.tga (580x593)

models\darkmod\props\textures\table_medallion_s.tga (580 x 593)

models\darkmod\props\textures\bc_stair01.tga (512 x 96)

models\darkmod\props\textures\bc_stair01_local.tga (512 x 96)

 

Good question, I don't know!

 

And since we're on it right now: I always wondered why textures have to be a power of two. Do you know the technical reason? I can only guess that it's because of the mipmaps, which are probably dyadic decompositions of the sourceimage and so a picturedimension not being a power of two would eventually result in non-integer mipmap dimensions. Assuming this is right, maybe the ATI drivers don't have some sort of exception handling for creating mipmaps dynamically, while nvidia drivers have. This should only be an issue with the tga-files though, since dds stores mipmaps as well, right?

 

No idea, but textures-not-powers-of-two are also a "recent" addition, old hardware simply couldn't handle them.

 

Also you've got an editorimage duplicated, but with different aspect-ratios:

textures\darkmod\wood\boards\new_grainy_ed_tiling_1d.jpg

textures\darkmod\wood\boards\new_grainy_tiling_1d_ed.jpg

 

I deleted the first one as it wasn't used:

 

te@te:~/.doom3/darkmod_org$ ack new_grainy_ed_tiling_1d materials/
te@te:~/.doom3/darkmod_org$ ack new_grainy_tiling_1d_ed materials/
materials/tdm_wood_boards.mtr
409:    qer_editorimage textures/darkmod/wood/boards/new_grainy_tiling_1d_ed

 

There are also two psd-files (I guess those shouldn't be in here as well, right?):

models\md5\chars\townsfolk\wench\wench_dress_work.psd

guis\assets\purchase_menu\purchase_image_template.psd (200x240)

 

I don't know, Springheel might.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I always wondered why textures have to be a power of two. Do you know the technical reason? I can only guess that it's because of the mipmaps

The somewhat hand-wavy explanation I've always heard is that it simplifies the maths (bit-shifting is a lot cheaper to implement in hardware than multiplication and division; pretty much free, in fact, just re-route some wires!) and memory management (banks of memory are always POT, for good reasons relating to hardware addressing schemes; so having POT data as well ensures ideal memory alignment and easy addressing with no wasted memory). Mipmaps is another good reason.

 

NPOT textures were indeed not supported at all back in the day, though all decent graphics cards have supported them for many many years. Not sure about some Intels though. And they're still less efficient, even when they do work.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

models\md5\chars\townsfolk\ wench\wench_dress_work.psd

guis\assets\purchase_menu\ purchase_image_template.psd (200x240)

The first one is an oversight, but the second is there for map authors to create their own images for the purchase menu.

Link to comment
Share on other sites

The author of the thread seems unable to rename it, as such could a mod please rename it to something about texture/material issues.

 

Updated OP to reflect that.

 

Also : I checked out the handle alpha issue and it hinted at something a bit strange :

What are the guidelines for alpha? I've noticed the use of masking quite a bit but it doesnt make sense to use a full mask if the diffuse layer is already a dds, surely DXT3 would be fine?

And also, there are a number of model textures that use 512x512 when they are storing <256x256, is there a reason for this?

Edited by Serpentine
Link to comment
Share on other sites

What about that issue with the uv-layout of the chair? It is a default TDM-asset, right? I am asking because you didn't add it to that list...

 

When playing Melan's new FM yesterday, I noticed that one of the bricktextures had a pretty messy normalmap, because it was probably generated automatically from a picturesource. So I went ahead and converted the texture into a heightmap, which I edited manually afterwards in photoshop and finally converted back to a normal map. The result is not perfect, but I am quite happy with it. Judge for yourself:

Before

sidebefore.th.jpgmiddlebefore.th.jpg

After

sideaftersharpnr.th.jpgmiddleaftersharpnr.th.jpg

In case you're interested in the normalmap: Download here!

Edited by STiFU
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...