Jump to content
The Dark Mod Forums

Texture tutorial questions


Tels

Recommended Posts

Moin,

 

I am going through the process of creating a texture for DM. After reading (and actually amending :) the basic tutorial and reading a few others, there are still open questions:

 

* do we need a detail texture? Does TDM even support them yet?

* In what format should I save TGA files? (Gimp does only allow you to select RLE compression or not, and if the origin should be bottom-left, but nothing else)

* In what format should I save .dds files? The plugin uses a host of options like compression, format, and wether you want mipmaps generated.

 

Edit: I managed to get my "texture" into the game, but the normal isn't working.

 

One thing I missed is the material types. The Basic texture tutorial just skips these, and the only thing I could find on the wiki is this:

 

http://www.thirdfilms.com/darkwiki/index.p..._Material_Types

 

which is Doom specific. Is there somewhere a list of the different material types in TDM and their usage? I see that surftype15 is used for cloth, but for instance wallpaintings are used as "wood".

 

Since I am making a canvas texture, I think mine should be cardbox, but I am not sure. :unsure:

"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

* do we need a detail texture? Does TDM even support them yet?

We don't need them, but they are possible (add another shader stage) and you are free to implement it in your custom textures. Beware of performance issues though. One of ascottk's stone textures has such a stage (it's a black stone, IIRC).

* In what format should I save TGA files? (Gimp does only allow you to select RLE compression or not, and if the origin should be bottom-left, but nothing else)

We agreed on saving the TGAs uncompressed, because it only increases the workload for the engine before loading them into graphics memory.

* In what format should I save .dds files? The plugin uses a host of options like compression, format, and wether you want mipmaps generated.

This is described in my wiki article here: http://www.thirdfilms.com/darkwiki/index.p...le=DDS_creation

Link to comment
Share on other sites

We don't need them, but they are possible (add another shader stage) and you are free to implement it in your custom textures. Beware of performance issues though. One of ascottk's stone textures has such a stage (it's a black stone, IIRC).

 

We agreed on saving the TGAs uncompressed, because it only increases the workload for the engine before loading them into graphics memory.

 

Ok.

 

This is described in my wiki article here: http://www.thirdfilms.com/darkwiki/index.p...le=DDS_creation

 

Cool, I missed that article. I can see that we should somehow move all the messy little articles to one big tutorial.

 

Right now every one (except maybe yours) misses some crucial detail. For instance, I didn't know I need to put the .dds into a different folder, or restart doom if I change the .mtr etc.

 

These things really should covered in on texture tutorial - I get on it.

 

Thanx for the tips, trying it now :D

"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

Ok.

Cool, I missed that article. I can see that we should somehow move all the messy little articles to one big tutorial.

 

Right now every one (except maybe yours) misses some crucial detail. For instance, I didn't know I need to put the .dds into a different folder, or restart doom if I change the .mtr etc.

 

These things really should covered in on texture tutorial - I get on it.

 

Thanx for the tips, trying it now :D

 

Hah. Gimp lets you choose the compression method for DDS, and tick a box "mipmaps" but nothing else. No color weight etc.

 

Even after juggling the paths I can't get it to work. Doom shows my material in a base yellow color (so the diffuse map seems to work), but it is transparent for lights, and doesn't have a "bumpmap". Strange.

 

Edit: Never mind, I see them now, I was getting confused with the paths :D

"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

or restart doom if I change the .mtr

You don't have to restart it. Type in console ReloadDecls and that's it.

Type Reload and press Tab to see what other things you can reload without restarting doom. (models, images and so on)

Link to comment
Share on other sites

Hah. Gimp lets you choose the compression method for DDS, and tick a box "mipmaps" but nothing else. No color weight etc.

 

Even after juggling the paths I can't get it to work. Doom shows my material in a base yellow color (so the diffuse map seems to work), but it is transparent for lights, and doesn't have a "bumpmap". Strange.

 

Edit: Never mind, I see them now, I was getting confused with the paths :D

 

Hm, is there a specific requirement for the .DDS files for the normal map? I can see them just fine in DE, but doom says "cannot load image textures/tels/canvas_yellow_local".

 

Hm, trying a .tga works, so it seems that the normal plugin of Gimp just can't create the right sort of .dds Doom3 requires.

"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

Yes, Normalmap compression has a different format (DXT5 RXGB) than diffusemap (DXT1/DXT3). The compression can only be performed with the ATI Compressonator and with a specific version.

 

Anyway, don't bother with that, we decided to not compress the normalmaps as DDS texturemaps can't be used with mapexpressions like addnormals(), which weighs more heavily.

Link to comment
Share on other sites

Yes, Normalmap compression has a different format (DXT5 RXGB) than diffusemap (DXT1/DXT3). The compression can only be performed with the ATI Compressonator and with a specific version.

 

Anyway, don't bother with that, we decided to not compress the normalmaps as DDS texturemaps can't be used with mapexpressions like addnormals(), which weighs more heavily.

 

I used DXT5 (or at least I choose the option) but it still didn't work. Anyway, if there is a TGA file, it can always be converted later anyway. So I proudly present my first texture. It was supposed to be a canvas you can use at the back of paintings, but after seeing it in game it looks so like coarse cloth/wood twigs covered by plaster that I had to build a fake house front with it.

 

(the wooden beams are just some stock wood texture)

 

Current problems:

 

* too bland

* causes moire insome settings

 

I am not quite sure how to fix these.

 

post-144-1192377281_thumb.jpg

 

Any tips welcome.

"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

Current problems:

 

* too bland

* causes moire insome settings

 

I am not quite sure how to fix these.

The "blandness" can be resolved a bit by altering the diffusemap (create an overlay using some other irregular texture - that's how I created most of my stone/marble textures).

 

What's moire? Does it look to regular?

Link to comment
Share on other sites

The "blandness" can be resolved a bit by altering the diffusemap (create an overlay using some other irregular texture - that's how I created most of my stone/marble textures).

 

Iwill try it. It is amazing how little small brightness variations look stark contrast inside the game.

 

What's moire? Does it look to regular?

 

http://en.wikipedia.org/wiki/Moir%C3%A9_pattern

 

The pattern is created by the normal map being too regular I guess.

 

In any event, is this texture even usefull? I am still toying around and warming up. :D

"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

A material question for the masters here :D

 

I have made a material with a almost-transparent map. Following some example from ID, I used theheathaze vertex shader to distort whatever you see through the transparent material.

 

This works great, except if there are two transparent surfaces behind each other, the first one shows everything _except_ the other one behind it.

 

If I take out the vertex shader, the transparent surfaces stack, meaning you can see one through the other.

 

Is this a fundamental limit with the doom engine atm, or is there some trick to it?

"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 don't quite get how your faces are setup. Which faces using which shaders do overlap? Can you post a screenshot. Not that I'm a shader master, but maybe I can point something out.

 

Sure: (although I didn't want to spoil the effect for others :D

 

You can see behind the big one in the center, you see a corner of the small crystal on the wall.

 

If I enable the heat haze effect (aka uncomment it), you can no longer see the edge of the smaller one through the front. It is like the surfaces at the front only draw *everyting else* behind them, but not other surfaces of the same type.

 

The heathaze effect is what makes stuff behind the crystal "wobble" when you move around and it looks quite cool (although it is probably wrong for polishes crystal faces anyway)

 

post-144-1192390094_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

Ah, I see what you mean. My guess is that the fragment shader is not using the current colorbuffer but the _currentRender texture as reference when calculating the "wobble" effect. So, both fragment shaders use the same base image, but they don't add up.

Link to comment
Share on other sites

Ah, I see what you mean. My guess is that the fragment shader is not using the current colorbuffer but the _currentRender texture as reference when calculating the "wobble" effect. So, both fragment shaders use the same base image, but they don't add up.

 

Yes there is a _currentRender in it. With what would I need to replace this? The problem is that there is almost zero documentation on that stuff, even the official docs just list quite a lot of thing without ever explaining them :(

 

Here is the best I found so far:

 

http://www.iddevnet.com/doom3/materials.php

 

Ah and I found this:

 

http://www.doom3world.org/phpbb2/viewtopic...ghlight=scratch

 

That will come in handy..*bwahahaha

"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

Ah, I see what you mean. My guess is that the fragment shader is not using the current colorbuffer but the _currentRender texture as reference when calculating the "wobble" effect. So, both fragment shaders use the same base image, but they don't add up.

 

Ah, replacing _currentRender with _scratch gives a VERY cool effect - although not what I wanted :) This warrants more toying around.

 

Tels

"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

When I was playing around with underwater overlays, I found that vertex shaders would not 'show through' each other.

 

The problem is that there is almost zero documentation on that stuff, even the official docs just list quite a lot of thing without ever explaining them

 

Welcome to modding. ;)

Link to comment
Share on other sites

When I was playing around with underwater overlays, I found that vertex shaders would not 'show through' each other.

Welcome to modding. ;)

 

I intend to fix the doc issue with our wiki, tho :ph34r:

"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

There is a sort keyword which is sometimes used on some original doom textures (mostly in the particle materials located in pak000.pk4 I think) but I don't know if that helps.

 

I've also noticed that the vertex programs (water waves...) mess around with translucent stuff in front of them.

Link to comment
Share on other sites

There is a sort keyword which is sometimes used on some original doom textures (mostly in the particle materials located in pak000.pk4 I think) but I don't know if that helps.

 

I've also noticed that the vertex programs (water waves...) mess around with translucent stuff in front of them.

 

As far as I know, this is just how it is. Even the ID guys knew this and setup stuff so that the player doesn't have a weapon if he is in front of large glass windows etc.

 

Maybe fixable if the renderer goes open source.

"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

@greebo, nice work on that dds article.

 

--EDIT

Here's the glass that is current for the flasks and gauges, at least that's what I'm using it for. anyway, it's in mechanical.mtr. please don't change it but feel free to use it as a base for something better :D

bc_gaugeglass
{
noshadows
noselfshadow
translucent
glass

qer_editorimage	textures/darkmod/sfx/whiteglass
{
	blend	diffusemap 
	map textures/darkmod/sfx/whiteglass2
	rgb 0.2
}

{
	if ( parm11 >= 0.5 )
	blend  add
	map	textures/darkmod/sfx/whiteglass
	rgb 0.1
}
}

 

I think normals would be the way to go with bumps in the textures instead of using shader fx

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

@greebo, nice work on that dds article.

 

--EDIT

Here's the glass that is current for the flasks and gauges, at least that's what I'm using it for. anyway, it's in mechanical.mtr. please don't change it but feel free to use it as a base for something better :D

bc_gaugeglass
{
noshadows
noselfshadow
translucent
glass

qer_editorimage	textures/darkmod/sfx/whiteglass
{
	blend	diffusemap 
	map textures/darkmod/sfx/whiteglass2
	rgb 0.2
}

{
	if ( parm11 >= 0.5 )
	blend  add
	map	textures/darkmod/sfx/whiteglass
	rgb 0.1
}
}

 

Have you looked at my glass shaders? They are quite alot more complicated :)

 

(I admit I haven't tried frobbing my glass, maybe I can (have to) use only one stage as your frob does.

 

I think normals would be the way to go with bumps in the textures instead of using shader fx

 

I will toy around with this. But we needed "flat" glass, too. :)

"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

  • 2 weeks later...

I went in and updated most of the texture-creation-related wiki articles, foremost this one:

 

http://www.thirdfilms.com/darkwiki/index.p...to_The_Dark_Mod

 

I also consolidated the article with the guidelines and removed the old CVS screenshot:

http://www.thirdfilms.com/darkwiki/index.p...ture_Guidelines

 

And this one has been updated to reflect the latest reorg (there was still redbrick_wall1 as example, which is something we didn't want):

 

http://www.thirdfilms.com/darkwiki/index.p...c_Material_File

 

I'm still not entirely happy with all these articles, as Tels pointed out, it's a bit messy (there is another one here: Texture Creation Tutorial, which I didn't touch.

Link to comment
Share on other sites

I went in and updated most of the texture-creation-related wiki articles, foremost this one:

 

http://www.thirdfilms.com/darkwiki/index.p...to_The_Dark_Mod

 

I also consolidated the article with the guidelines and removed the old CVS screenshot:

http://www.thirdfilms.com/darkwiki/index.p...ture_Guidelines

 

And this one has been updated to reflect the latest reorg (there was still redbrick_wall1 as example, which is something we didn't want):

 

http://www.thirdfilms.com/darkwiki/index.p...c_Material_File

 

I'm still not entirely happy with all these articles, as Tels pointed out, it's a bit messy (there is another one here: Texture Creation Tutorial, which I didn't touch.

 

Thanx a lot I saw you working while I updated "Texture Creation Tutorial", so I left everythign alone for now :)

 

We really should consolidate this into one or two tutorials.

"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

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 )
      · 1 reply
    • 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
       
      · 3 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...