More detailed textures

Alright so I’ve been porting some models lately into gmod, and I’ve been applying the bump map to the model’s skins. However there are 2 more normal maps which I can’t seem to figure out how to apply them to the textures, as well as a detail mask which I have no clue what it is.

Actual skin: http://imgur.com/a/q2w37

Bump map: http://imgur.com/a/uNORf

Extra detail 1: http://imgur.com/a/GHj3l

Extra detail 2: http://imgur.com/a/5gY96

Detail mask (?): http://imgur.com/a/5a6pb

If anyone could help, it would be greatly appreciated. Thank you.

There is $bumpmap2, but I don’t know how to use it properly.

$detail is probably what you are looking for.
What I’m not sure of is if you can use a normalmap as $detail, maybe you’ll have to convert it to grayscale.

Also, I couldn’t find any way to use two detail maps and/or use a detail mask on the same VMT.

The customhero shader could do what you want; but that doesn’t exist in the garrysmod branch.
You’ll either have to drop the additional details, or get real creative with how your model is set up.

you could bake a giant normal map. use the detail mask to lerp between detail1 and detail2 and add it to the normal map.

using the normal maps as real $detail. you gotta bake 2 detail (greyscale) textures. you could do it by ligthing them with a directional light and bake that lighting. then setup the materials to render the details in 2 passes with a different detailblendmode and detailmask to apply whether the first or second detail texture.

/offtopic nice to have for gmod would be a default vertexshader and a $pixelshader blob mechanic like the screenspace_general uses. garry’d have to clean up the shader sources tho and make sure the default ligthing is always applied as a fixed asm fragment.

the term for this detailbump is just approximate



normaltexel.rgb = normalize ( bumpmap + lerp ( detail1, detail2, detailmask ) );