Jump to content


Photo

How to Change Texture Colours - (Request for Textures)


51 replies to this topic

#1 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1257 posts

Posted 18 July 2017 - 05:58 AM

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, 19 July 2017 - 11:34 PM.

  • CarltonTroisi likes this

I have a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#2 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18893 posts

Posted 18 July 2017 - 06:51 AM

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, 18 July 2017 - 06:52 AM.

  • Destined likes this

#3 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 07:09 AM

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

Attached Files


  • Destined likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#4 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 07:19 AM

Two more examples

(plaster/plaster_dirty02_cracks and stone/brick/blocks_brown)

Attached Files


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#5 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1257 posts

Posted 18 July 2017 - 08:15 AM

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, 18 July 2017 - 08:36 AM.

I have a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#6 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1296 posts

Posted 18 July 2017 - 09:06 AM

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.

Attached Files


Edited by Destined, 18 July 2017 - 09:16 AM.

  • Judith likes this

#7 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 18 July 2017 - 09:10 AM

I have a 2048 plaster texture set that might be a good base for _colored parameters. Will check it tonight and post it here.

 

Btw. parm11 > 0 section is responsible for frob, not for texture color.


Edited by Judith, 18 July 2017 - 09:12 AM.


#8 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1257 posts

Posted 18 July 2017 - 09:51 AM

Thank you Destined, that works great. :) 

 

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


I have a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#9 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1296 posts

Posted 18 July 2017 - 10:46 AM

Glad I could help. If it is that easy to make, I will try to modify the light materials used in Springheels modules. This might be a very easy way to add further variation to them.
  • NeonsStyle likes this

#10 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 18 July 2017 - 11:40 AM

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....ster01.zip?dl=1



#11 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 11:41 AM

This might be more helpful :)

 

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


  • RPGista and NeonsStyle like this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#12 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1429 posts

Posted 18 July 2017 - 12:22 PM

Very cool, never knew you could do that! Thanks a lot for the tutorial, man.



#13 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 12:45 PM

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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#14 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 18 July 2017 - 03:32 PM

Using solid colors with textures or stuff like storing multiple masks in one texture are pretty old technique. Thing is, in other engines you just set up a node or two and link them. Meanwhile here...

Edited by Judith, 18 July 2017 - 03:33 PM.


#15 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 04:10 PM


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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#16 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 18 July 2017 - 04:15 PM

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.).



#17 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1257 posts

Posted 18 July 2017 - 04:16 PM

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 a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#18 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 04:16 PM

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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#19 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 18 July 2017 - 04:21 PM


  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.

  • NeonsStyle likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#20 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 18 July 2017 - 04:28 PM

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 ;)



#21 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1257 posts

Posted 18 July 2017 - 05:25 PM

 

  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 a small YouTube channel making videos on a variety of games. Come and have look here:
 
https://www.youtube.com/c/NeonsStyleHD

 

Briarwood Manor - available here or in game

http://forums.thedar...2017-update-16/

 

 

 


#22 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5297 posts

Posted 19 July 2017 - 02:02 AM

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.thedar...water/?p=388440


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#23 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 19 July 2017 - 02:27 AM

Fog light is actually cheaper than ambient light. It can be a bit difficult to use, as Obs said, and it doesn't have a minumum range, it always starts at player POV.



#24 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1296 posts

Posted 19 July 2017 - 03:02 AM

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....odules.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....ules_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, 19 July 2017 - 03:27 AM.


#25 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 655 posts

Posted 19 July 2017 - 03:34 AM

 

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.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users