Jump to content
The Dark Mod Forums

Recommended Posts

Posted

I will do a quick tut on how to change a texture.

 

Might that be redundant to all the texture tutorials linked above? Those three already have some overlapping info (although they cover different aspects).

 

Try it in darkradiant?

 

Yes.

 

PS: After you see it in dark radiant, try it in a simple test map in game to be sure it looks how you want. If necessary, make adjustments. They can all be provided in a map which includes the materials folder and resources of your textures which you can upload anywhere and link here.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Posted
Might that be redundant to all the texture tutorials linked above? Those three already have some overlapping info (although they cover different aspects).

I only meant from a point of making textures TDM ready, in this instance its just a a case of creating a material def.

 

if we take a basic material def as showen - http://wiki.thedarkm...c_Material_File

 

textures/darkmod/stone/brick/redbrick_with_mortar
{
stone
qer_editorimage  textures/darkmod/stone/brick/redbrick_with_mortar_ed
bumpmap		  textures/darkmod/stone/brick/redbrick_with_mortar_local
diffusemap	   textures/darkmod/stone/brick/redbrick_with_mortar
specularmap	  textures/darkmod/stone/brick/redbrick_with_mortar_s

// This is the code required for frob highlighting this texture
{
	if ( parm11 > 0 )
	blend	   gl_dst_color, gl_one
	map		 _white.tga
	rgb		 0.40 * parm11
}
{
	if ( parm11 > 0 )
	blend	   add
	map		 textures/darkmod/stone/brick/redbrick_with_mortar
	rgb		 0.15 * parm11
}
// TDM Ambient Method Related
	{
			if (global5 == 1)
			blend add
			map							 textures/darkmod/stone/brick/redbrick_with_mortar
			scale				   1, 1
			red							 global2
			green				   global3
			blue					global4
	}
	{
			if (global5 == 2)
			blend add
			program ambientEnvironment.vfp
			vertexParm			  0			   1, 1, 1, 1			  // UV Scales for Diffuse and Bump
			vertexParm			  1			   1, 1, 1, 1			  // (X,Y) UV Scale for specular
			vertexParm			  2			   global2, global3, global4, 1
			fragmentMap			 0			   cubeMap env/gen1
			fragmentMap			 1			   textures/darkmod/stone/brick/redbrick_with_mortar_local			  // Bump
			fragmentMap			 2			   textures/darkmod/stone/brick/redbrick_with_mortar						// Diffuse
			fragmentMap			 3			   _black				  // Specular
	}
}

 

And then replace all the texture paths to point to one of the new textures - egypt03.jpg, we first have to copy the texture to a folder path correct for mod, in this case it would be - ( textures/darkmod/stone/brick/egypt03 ). We dont need to include .jpg at the end as TDM supports that format. The material def would then look as follows -

 

 

textures/darkmod/stone/brick/egypt03
{
stone
qer_editorimage  textures/darkmod/stone/brick/egypt03_ed
bumpmap			textures/darkmod/stone/brick/egypt03_local
diffusemap		  textures/darkmod/stone/brick/egypt03
specularmap	   textures/darkmod/stone/brick/egypt03_s

// This is the code required for frob highlighting this texture
{
	if ( parm11 > 0 )
	blend	   gl_dst_color, gl_one
	map		 _white.tga
	rgb		 0.40 * parm11
}
{
	if ( parm11 > 0 )
	blend	   add
	map		 textures/darkmod/stone/brick/egypt03
	rgb		 0.15 * parm11
}
// TDM Ambient Method Related
	{
			if (global5 == 1)
			blend add
			map							 textures/darkmod/stone/brick/egypt03
			scale				   1, 1
			red					 global2
			green				 global3
			blue				   global4
	}
	{
			if (global5 == 2)
			blend add
			program ambientEnvironment.vfp
			vertexParm			  0			   1, 1, 1, 1			  // UV Scales for Diffuse and Bump
			vertexParm			  1			   1, 1, 1, 1			  // (X,Y) UV Scale for specular
			vertexParm			  2			   global2, global3, global4, 1
			fragmentMap			 0			   cubeMap env/gen1
			fragmentMap			 1			   textures/darkmod/stone/brick/egypt03_local			  // Bump
			fragmentMap			 2			   textures/darkmod/stone/brick/egypt03					   // Diffuse
			fragmentMap			 3			   _black				  // Specular
	}
}

 

And where the local, specular and editor version are missing I will have to create these. Ignore all the poor tab spacing as the forum isnt formatting it correctly.

bhm_banner.jpg

Posted

I have some problems, it seems newest wine does not like darkradiant anymore and besides, it is normal that darkradiant still asks for doom3 and sees darkmod as a mod?

Posted

If you mean you still need to select a game as Doom 3, engine path and mod "darkmod", yes.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Posted (edited)

Well, it crashes often in gobject (a low level component of gtk...). I try tomorrow compiling a native version. But if tdm itself is of any experience I am not very optimistic.

Edited by ezze
Posted (edited)

Having it is not enough, if it does not work.

 

Edit:

I am sorry, I give up. Building darkradiant is a nightmare, after fixing more than 20 missing "include" I get some linking problems. I guess the main developers uses a different or more permissive compiler.

 

 

Edit(2):

After some patching and greebo intervention, I have darkradiant that starts. I see what I can do.

Edited by ezze
Posted (edited)

So, what am I doing wrong?

 

I put editor picture and normal map under textures:

% find textures
textures/
textures/egypt
textures/egypt/stone
textures/egypt/stone/blocks_yellow_local.tga
textures/egypt/stone/blocks_yellow_ed.jpg

 

The diffusemap under dds folder:

% find dds/
dds/
dds/textures
dds/textures/egypt
dds/textures/egypt/stone
dds/textures/egypt/stone/blocks_yellow.dds

 

And wrote the material file (here is just the head, the rest is the usual), begin a matte surface there is no speculars.

% head darkmod/materials/tdm_egypt_stone.mtr
textures/egypt/stone/blocks_yellow
{
	stone
	qer_editorimage		   textures/egypt/stone/blocks_yellow_ed
	bumpmap				   textures/egypt/stone/blocks_yellow_local
	diffusemap				textures/egypt/stone/blocks_yellow

	// This is the code required for frob highlighting this texture
	{
			if ( parm11 > 0 )

 

But still I see no "egypt" directory in the darkradian media browser.

Edited by ezze
Posted
But still I see no "egypt" directory in the darkradian media browser.

You have to put the texture your making the .MTR for in the correct folder/s, so -

 

In your Darkmod folder

 

- textures/egypt/stone/blocks_yellow

- textures/egypt/stone/blocks_yellow_ed

- textures/egypt/stone/blocks_yellow_local

 

And as TDM supports .jpg you dont have to change them to .tga, but the sake of file size we prefer to convert the main diffuse file to a .dds and move that to the follow folder

 

- dds/textures/egypt/stone/blocks_yellow

 

Would it be easier if I did the whole process with one texture and put it into a zip so you can see how it should be done..?

bhm_banner.jpg

Posted

I got the problem. The .mtr file must be in the materials directory, not in darkmod/materials.

 

However, the .jpg version works fine, instead the .dds appears very dark.

Posted

Well to help you here is a basic mission where i converted one of the textures. I have removed all the textures that arent required and recreated both the normal and specular as the ones that came with originally were substandard.

 

- skydrive

bhm_banner.jpg

Posted (edited)

Behold! Our expert little thief entered a pyramid! For some reason the ancient-egypt-inspired culture of the TDM world worshiped the Q :D

 

Edit:

Thanks Bikerdude, I give a look.

Edited by ezze
Posted
Behold! Our expert little thief entered a pyramid, thanks Bikerdude, I give a look.

Looks good, unfortunately A lot of the wall/brick textures are far too low res for TDM and you'll find the little mission above has a lot of the textures removed before they were either not suitable or too low res.

bhm_banner.jpg

Posted (edited)

Just to know, what is a good resolution? From my experiments I saw that 32 editor units for 256 pixels is fine, isn't it?

 

It sounds good to me as It would mean that one pixel is about 3.5mm (0.14 inches for non-standards people). Perhaps is too little for detailed objects like painting, but for stones...

Edited by ezze
Posted
Just to know, what is a good resolution? From my experiments I saw that 32 editor units for 256 pixels is fine, isn't it?
  • Textures should always be in even multiples, 128x256, 256x512, 512x512 upto a max of 1024x1024, althought person I would go upto 2048x2048 is said texture was cover a very large area.

And for each texture type (diffuse, spec, local and ed -

  • Editor image: 256 pixels (128x256 or 256x256 or 256x128)
  • Diffusemap: 1024 pixels (512x1024, 1024x1024 etc)
  • Normalmap: 1024 pixels (see above)
  • Specular: 512 pixels (see above)

Some more relevant info about textures - http://wiki.thedarkm...ture_Guidelines

bhm_banner.jpg

Posted (edited)

About the other point. What small textures are you thinking? egypt19.jpg for example with 256x256?

 

I am not sure, I guess it depends on the size of what brush you want to wrap, it is fine for a baseboard or doorframe. After all the relief I posted few messages ago is 1024x256 and looks fine since it wraps a decoration that is not very big.

 

About this, I am wondering. Is there a way to setup the default scale that the texture will use?

 

Edit:

However, there is a problem. The textures have shadows in them, so they cannot appear perfect in game. They still appear fairly well luckily.

 

 

Edit(2):

I have this strange problem, with the .dds format the texture appears almost black... It is true that since we already have the .jpg convert to .dds is not so important... but it is annoying.

Edited by ezze
Posted
  • About the other point. What small textures are you thinking? egypt19.jpg for example with 256x256?
  • About this, I am wondering. Is there a way to setup the default scale that the texture will use?
  • However, there is a problem. The textures have shadows in them, so they cannot appear perfect in game. They still appear fairly well luckily.
  • I have this strange problem, with the .dds format the texture appears almost black... It is true that since we already have the .jpg convert to .dds is not so important... but it is annoying.

  • Its a trim type yextures then its fine
  • We arent making a mission here, just making these textures available to authors to use.
  • The material def is what defines a shadow on a texture, if you use the material def I used you will be fine.
  • which dds file are you refering too.? the one I made or one you have made..? if its one you have made then its correcupt, what imagien program are you using, Gimp?

bhm_banner.jpg

Posted (edited)

- I am not sure what is a trim texture, yet I guess it is fine...

- We are not writing a mission, but I thought there is a "default" game dimension such that the texture should be rendered. Considering your answer it is probably not the case.

- What I meant is that the diffuse map already has shadows in it. According to the wiki they should be removed.

- It is about a .dds file I made. In the two screenshots in the last message there is exactly the same material, but in one the diffusemap is a .jpg in the other is a .dds compressed with dxt1. I am using gimp with the plugin where I exported the picture using default options but the "BC1 / DXT1" compression. It is probably not very important for the diffuse map as the .jpg as already fine, but in the case I have to write a specular map I would to be sure that my .dds files are correct.

Edited by ezze
Posted

It could be interesting, but aside from the required textures, I'd require it would need a somewhat different gameplay. Perhaps a little more based on trap avoiding and surpassing objects than classic stealth?

 

As for the setting, how would one insert an egyptian-like temple into the TDM fluff?

 

One small suggestion, how about working something like an aztec temple to cut down the texture work a bit? Wouldn't require sandstone textures for one.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...