Custom textures are simple.
Make your texture the same way you always do, place it in a folder under textures. Done. Theres a few things to remember.
texture_d.tga - Diffuse
texture_s.tga - Specular
texture_local.tga - Local Map
texture_h.tga - Height map
texture_add.tga - Glow stage
Of course there are a few more but its best to stick to this naming scheme.
A simple material for Quake 4 would look like this:
Code: Select all
models/textures/test/floor
{
bumpmap models/textures/test/floor_local.tga
diffusemap models/textures/test/floor_d.tga
specularmap models/textures/test/floor_s.tga
}
An even MORE simple material can look like this (This still uses _d, _s and _local):
Code: Select all
guide textures/test/floor generic_shader("test/floor")
If you want to add a height map, you add this:
Code: Select all
textures/test/floor
{
bumpMap addnormals ( textures/test/floor_local.tga, heightmap ( textures/test/floor_h.tga,5 ) )
diffuseMap textures/test/floor_d.tga
specularMap textures/test/floor_s.tga
}
Now. the height map is of course a simple grey based texture, white being the highest, black being the lowest. Using different shades of grey you can add more or less height to the texture. You can multiply this by chaning the "5" at the end of the material. 1 is a less visible result, 9 is a massive result.
If you want a default texture thats just a diffuse, then yes thats possible in Quake 4. I THINK this is how you do it, not sure, but its more than possible:
Code: Select all
textures/test/floor
{
diffuseMap textures/test/floor_d.tga
}
Making the textures is easy. The diffuse is a simple texture with no height based information lighting or shadowing. The specular map is a texture that shows levels of specularity and works on the basis that white = 100% specular, and black = no specular. You can use colour to give more realistic results. These are usually dark textures. The local map is the hardest part to make. I prefere to model my surfaces FIRST and then output the model to a local map via Doom 3/Quake 4's "renderbumpFlat" command. Painting normals by hand is NOT a good idea as its more effort than its worth and looks bad 9 times out of ten. Height maps are obviously just a grey based image.
As an example texture, here is a few from the screenshots thread (So i dont have to go and paint some new ones). No height maps are on this:
[lvlshot]http://www.quake2evolved.com/odium/od_pipe_tex.jpg[/lvlshot]
[lvlshot]http://www.quake2evolved.com/odium/od_floor_tex.jpg[/lvlshot]
[lvlshot]http://www.quake2evolved.com/odium/od_grate_tex.jpg[/lvlshot]
[lvlshot]http://www.quake2evolved.com/odium/od_trim_tex.jpg[/lvlshot]