So I wanted to put a helmet laying around the env to imply that people/soldiers used to be there.
I'm not super bothered about historical accuracy, and tbh I haven't decided a specific timeline anyway, so I just chose a helmet that looked cool.
The high res base mesh was a doddle, as I wasn't going to put a whole lot of detail into it anyway. Tbh, with Udk's weak normals, I'm not sure how necessary the high res was anyway. Nonetheless, I did it anyway, including reshaping the model to ensure a decent bake.
The low res was dealt with similarly quickly and unwrapped. I baked normals and an amb occ map in xnormal, and used these as a base for the texture.
I painted two different mask textures: one as a mask for scratches (so scratches only showed up in scratchy places) and one as a mask for chipped off areas of paint, exposing bare metal. I combined these as two channels of one image. I could have each of them as the alpha channel of two of the other textures, which would be more efficient (one less texture to load) so I'll probably do that next time.
Anyhoo.
In UDK, I started setting up the material.
It's pretty complicated.
Basically, I'm mixing the base textures you see labelled above with three different tiling textures, controlled by masks. The first tiling texture is a bumpy normal map to simulate the surface of the helmet. If I'd baked that into the helmet's main normal map, the scale of the bumps would either be completely off, or unnoticeable. The other two textures are scratches, one for colour/spec, and one for normals.
The scratches are both tiled by the same TexCoord node, so that I don't accidentally get them scaled differently.
I'll start with the normals.
First off, the bumps texture ("Bumps") is tiled by a TexCoord node. Then, I remove the blue channel, by multiplying it by a Constant3Vector set to 1,1,0. If you don't remove the blue channel, it messes with your final normal map. Then, I use a LinearInterpolate node to mask that off, so it doesn't show up on the chipped off bits.
Then all that gets added to the rest of the normals.
Ok, then the normals for the scratches go the same way. First remove the blue channel, then mask it off (in this case using a different mask- the green channel instead of the red). I should have probably used the same Texture Sample for both, I'm not sure if that makes a difference. Probably does.
So that's the normals.
The spec is pretty simple, a scratch texture is masked off and added to the spec base texture. I also have a constant going into spec power to control the 'glossiness' of the material.
So that's the specular.
The colour/diffuse is probably the most complicated.
It has the scratches masked off in the same way as the other two textures, but it also has a reflection component.
For the reflection, you plug a reflection vector into a component mask, because afterwards you plug that into the uv's of the texture you want reflected, and RGB>UV means you have one too many.
This again gets masked off, and added to the base texture.
(oh btw the reflection texture is a fairly simple blurry render of some white columns)
It all looks a lot more complicated than it really is.
Oh yeah, one other thing. The base colour texture has been converted to a parameter. The reason for this is that I can make an instance of this material, give it a different texture as the parameter, and have multiple colour bases for the model pretty easily. The *really* efficient way to do this would be to create a master material with parameters for every slot like this, but as of now I'm still learning different things in the material editor, so I'll stick to normal materials for now.
Also, the scratches texture is pretty crap and tiles horribly, but I'll get around to changing it to something better eventually.
The in-udk view in the video is kinda crappy, to spin it has to be a mover, and mover's dont get lit by lightmass, so the lighting is pretty pish.