Jump to content
The Dark Mod Forums

How to Change Texture Colours - (Request for Textures)


NeonsStyle

Recommended Posts

Hey All,

 

Does anyone have any coloured plaster and coloured broken plaster textures with material files and bump mapping?

I'm working on a new map, in Venice, and it needs a lot of those sorts of textures, and we have so few coloured concrete

textures. I need some oranges, yellows and ochres mostly. Preferably aged, and broken, though I can work around it if

it's not broken, but I desperately need some to make it look convincing.

 

If you've got some, could you post a link here for me please? Due credit of course. :)

 

Thanks

 

Neon

Edited by NeonsStyle
  • Like 1

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

We already have what you looking for, you just need to modify the material def to change the colour. For example -

textures/darkmod/wood/panels/tile_weave_walnut
{
    wood

    qer_editorimage textures/darkmod/wood/panels/tile_weave_walnut_ed
    bumpmap         textures/darkmod/wood/panels/tile_weave_local
    
    {
    blend    diffusemap
    map  textures/darkmod/wood/panels/tile_weave
    red  .4
    green .6
    blue  .9
    }

    {
        if ( parm11 > 0 )
        blend       gl_dst_color, gl_one
        map         _white
        rgb         0.40 * parm11
    }
    {
        if ( parm11 > 0 )
        blend       add
        map         textures/darkmod/wood/panels/tile_weave
        rgb         0.15 * parm11
    }

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				textures/darkmod/wood/panels/tile_weave		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
}

The bit that change the colour of the original texture was -

 

{

blend diffusemap
map textures/darkmod/wood/panels/tile_weave
red .4
green .6
blue .9

}

Edited by Bikerdude
  • Like 1
Link to comment
Share on other sites

You can easely create colored versions of existing textures. For example textures/darkmod/plaster/plaster01.

 

Create a copy of the material and replace

diffusemap textures/darkmod/plaster/plaster_01

with

{
    blend diffusemap
    map textures/darkmod/plaster/plaster_01
    colored
}

Note that

diffusemap path_to_image

is a shortcut for

{
    blend diffusemap
    map path_to_image
}

The colored keyword allows you to alter the look of the stage via the _color spawnarg on the entity the material gets used on. So you can pick the color via the color menu the same way you can do it with lights.

 

The attached image illustrates the effect. The leftmost block uses the original material, whereas the other four are all using the same modified version, just with different color settings applied. So one material, any color.

 

There are two restrictions for this approach

  1. The material you modify should use an as desaturated as possible texture. Textures already colored won't work well with this. You can overcome this restriction by desaturating the textures on your own in an image manipulation program (such as gimp). This is normally a one click task.
  2. The color spawnarg only works on entities. If you want to use it on worldspawn, you would have to create different versions for each different color by using constant values as demonstrated by Bikerdude in the above post. However, there is no need to use worldspawn except for sealing so this is a minor restriction.

Note that if the original material uses a specular map which is not desaturated (the object is non-shiny), you would have to create a desaturated version and the same block in the material definition for it too. Don't do this if the spec is desaturated, though, unless you want a non-shiny version of a shiny original

post-11230-0-62107000-1500379417_thumb.jpg

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Two more examples

(plaster/plaster_dirty02_cracks and stone/brick/blocks_brown)

post-11230-0-60340400-1500380299_thumb.jpg

post-11230-0-64891600-1500380306_thumb.jpg

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Right, I'll dig into this, looks bit confusing at first, but I might be able to work it out. One question. What is the range for red.blue,green values? 0 to 1? Do the values

change the colour, or the saturation or the contrast?

 

So Obs, you're saying open up the game material files and copy the material script for the textures I want and then edit that yes? It sure looks like it'll do what I need. You have to understand Obst, I know nothing about scripting, so a lot of what you said went over my head, espcially in selecting the values for

the colour. Also you talk about selecting a colour from a menu, but don't say what or where that menu is.

 

[Edit] Hmmm not making a lot of headway with this. If you take plaster_worn_red I'd do this?

 

{
if ( parm11 > 0 )
blend add
map textures/darkmod/plaster/plaster_worn_red
rgb 0.15 * parm11
}
and how do I change it to yellow? I know I change the rgb values, but to what?
Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I tried what Obsttorte suggested and came up with the following texture called plaster_01_coloured. Just copy the txt-file into the materials folder and rename it to *.mtr

 

You can find the new texture in DR directly under the plaster_01. Just create a brush, apply the new texture, convert it to func_static and give it the "_color" spawnarg (the underscore has to be there). Just as for the lights, there will be a button with which you can choose the colour you want. Note that the colour change is only visible ingame, not in DR.

 

Edit: As for changes, I really did exacly was Obsttorte wrote and exchanged "diffusemap textures/darkmod/plaster/plaster_01" with

"{
blend diffusemap
map textures
/darkmod/plaster/plaster_01
colored

}"

The stuff he wrote after that meant that you can do this for each texture by replacing "diffusemap FILEPATH" with

"{
blend diffusemap
map FILEPATH

colored
}"

for the texture. This adds said color button.

 

Edit2: For colours there are always two ways to express them: One is the range from 0 to 255 (8 bit), the alternative is in ranges from 0 to 1. You can get from the 0-1 range to the 0-255 by multiplying the number with 255. E.g. the value 0.7 represents the value 0.7*255=178.5 DR uses 0-1 in the spawnarg, the 0-255 is used in the field below.

Plaster_colour.txt

Edited by Destined
  • Like 1
Link to comment
Share on other sites

Thank you Destined, that works great. :)

 

Judith, I'd love to have them. let me know please. :)

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Here are the textures, you should probably scale them down by to 1024 to fit to TDM assets. It works well with colored modifier, although this needs further refinement IMO. Basic problem with isolator materials is that they need the base color to be inverted in specular to look right, while other parts of the texture need to be brighter or lighter, as needed. This specular is useful only for the base texture. When you use colors, the whole surface looks more like a metal (the light source gets color from the texture instead of being white). I'm not sure whether it's possible to have an automatic inverted value for diffuse color in specular, and even if so, it probably won't be enough. Still, it's always good to try :)

 

https://www.dropbox.com/s/urwdmftdpnmvrng/plaster01.zip?dl=1

Link to comment
Share on other sites

https://youtu.be/hSJPurpx5FE

This might be more helpful :)

 

(There is a minor mistake in the video. It is "shaderParmX", not "shader_ParmX")

  • Like 2

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

You are welcome.

 

A while ago I watched a GDC video of the makers of The Witcher 3: Wild Hunt where they used this feature, too. It is a good way to achieve a versatile look while keeping the amount of textures, and therefore the performance impact, low.

 

Btw., I can only recommend everyone to watch those videos. There is a lot of stuff you can learn from the pros.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 


Using solid colors with textures or stuff like storing multiple masks in one texture are pretty old technique

There are more advanced approaches for sure. But in some instances it might suffice.

 


Thing is, in other engines you just set up a node or two and link them.

I have no idea what you mean. Can you be a bit more specific, please?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

In graphical interfaces for materials you have nodes to link. Nodes can contain samplers (texture sources), math functions, single or combined channels (R, G, B or A), etc. You chain them and then you link them to proper slot (diffuse, specular etc.).

Link to comment
Share on other sites

This might be more helpful :)

 

(There is a minor mistake in the video. It is "shaderParmX", not "shader_ParmX")

 

Obsttore; you're a legend mate. That was a brilliant video, and I learned heaps from it, and whats more I learned where to look up things I had questions

about. It was clear, it was concise, and most useful :D

 

One question, at the end you mentioned the light shader can have the sound volume adjusted. Is this also possible for water? The water sloshing around

in my map by default is very loud.

 

Also I noticed Parm3 could be used to create fog, does that mean I could make a brush, make it func_static, put it in water, and make the fog pretty

opaque, so you can't see into the water?

 

This is a brilliant tute, thank you so much :)

 

@Judith, thank you

 

Neon

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

So it basically does what the material definition does, except that it provides a graphical interface to deal with it? What is the advantage, except of it being a bit more user-friendly?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 


  1. One question, at the end you mentioned the light shader can have the sound volume adjusted. Is this also possible for water? The water sloshing around

    in my map by default is very loud.

  2. Also I noticed Parm3 could be used to create fog, does that mean I could make a brush, make it func_static, put it in water, and make the fog pretty

    opaque, so you can't see into the water?

  1. It is actually vice versa, the volume of the sound can be used to modify the brightness of the light (or any other setting in the material definition, depending on how you setup the shader). The volume of sounds can be modified using spawnargs on the respective speakers (s_volume iirc)
  2. Parm3 is used on fog lights. It defines at which distance the fog becomes opaque. There is a chapter about fog in the A-Z beginners guide to mapping as well as some other articles on the wiki dealing with this. If you want to have water that becomes opaque at a certain distance, then I would suggest you take a look at SteveL's water shader. He wroked on exactly that.
  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

So it basically does what the material definition does, except that it provides a graphical interface to deal with it? What is the advantage, except of it being a bit more user-friendly?

 

 

Much greater speed of work and ability to experiment. You can stare at empty notepad all you want, but when you have all types of nodes listed and ready to use, at least you can try to combine them ;)

Link to comment
Share on other sites

 

  1. It is actually vice versa, the volume of the sound can be used to modify the brightness of the light (or any other setting in the material definition, depending on how you setup the shader). The volume of sounds can be modified using spawnargs on the respective speakers (s_volume iirc)
  2. Parm3 is used on fog lights. It defines at which distance the fog becomes opaque. There is a chapter about fog in the A-Z beginners guide to mapping as well as some other articles on the wiki dealing with this. If you want to have water that becomes opaque at a certain distance, then I would suggest you take a look at SteveL's water shader. He wroked on exactly that.

 

 

Yeh I havn't been able to find Steves shader. I hear lots of reference to it, found Arcturus's shader, but not Steves. I'll go through that A-Z again

and read the part of fogs. Definitely want to learn that. In my last map, I used fog emitters, but I'm sure there's a better way.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Fog lights are not that performance-hougry iirc. But they can be difficult to handle if you want to have a combination of fogged and non-fogged areas. Hence most mappers prefer the use of particles. In my mission The Builder Roads I have used a foglight in the cellar of the inn.

 

SteveL's work: http://forums.thedarkmod.com/topic/18036-messing-with-sea-water/?p=388440

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I added the "colored" keyword to the materials "textures/darkmod/wood/boards/white_painted_wood01" and "textures/darkmod/wood/panels/wood_white_panel02" and was able to colour Springheel's modules "mansion01_wall03", "mansion01_wall04", and "mansion01_wall05" without any problems. I noticed, that it is best to use pastel colours as others appear too strong.

https://www.dropbox.com/s/1nuqnszjblfwmv0/coloured_modules.jpg?dl=0

I think it would be viable to generally introduce "colored" to white plasters and painted wood materials as this would add a lot of variability by just adding one word to a couple of material definitions, but will check out some other models first and post them here. It would also not affect older models, as the original colour is kept if the "_color" spawnarg is not used, so I cannot see any downside at the moment.

 

Edit: "colored" the materials "models/darkmod/wood/panels/wood_white_panel02_ns", "models/darkmod/wood/boards/white_painted_wood01_ns", and "textures/darkmod/plaster/tiling_1d/plaster_dirty01_grey". Especially the last one enables you to colour basically each of Springheel's exterior timber module:

https://www.dropbox.com/s/qtyr7xnz2u35xe3/coloured_modules_2.jpg?dl=0

However, I noticed that you can get the colours wrong pretty quickly. I suggest saturations of 60 or lower. These looked best, in my opinion. The exterior modules have a saturation of 60 in the picture.

Edited by Destined
Link to comment
Share on other sites

 

I cannot see any downside at the moment.

 

Clipboard01.png

 

It's more pronounced in motion, but while the original material looks like a plaster wall, the colored version behaves like metallic surface. It's a wrong material. To make it right, you'll need to get the the value from colored and invert it, and then properly blend it with specular (add, blend?). Not sure how to do this though.

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

    • 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.
      · 4 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...