Hey guys,
I have just read through the thread about diffuse mapping and optimising their uses by using gradient mapping. In my next environment to create to up my portfolio i was thinking about using gradient mapping instead of standard normals mapping if they are really as awesome as this guy says
http://artisaverb.info/DitchingDiffuse.html
I was just wondering is gradient maps are a multi-coloured image made from your diffuse texture and also when you apply the gradient map would you do it in the bump mapping channel (using Maya) or is it only something you can use in game engines like UDK etc.
Would be cool to show off optimised stuff if this is the case, what do you think?
Cheers guys! x
Replies
You can't accurately derive directional info from a heightmap with gradient mapping, and thus gradient mapping isn't useful for generating procedural normal maps.
I.e. L4D take the color intensity as grey-value and remap this value to a color gradient (saved in a map). That is, the L4D artists have painted a standard diffuse texture, then convert them to a greyscale image (i.e. by taking the value of the color) and remap it in a shader to different colored gradients to archieve some kind of variation. But you can paint it directly, take only the albedo or the highmap or a combination of all this, as long as you have some kind of greyscale image at the end.
The article you referred combines the diffuse map with the height map, this works great for natural materials where you have different colors at different layers of the material. I.e. stones (greyish) poking out of sand (yellow).
You need some kind of shader. As far as I know some tools support it out of the box (photoshop). The shader is really simple and should be no problem in any game engine or modelling tool. I have created a gradient mapping shader in blender and my game, therefore this should be no problem in max/maya/udk/unity/ce.
Final tip:
1. From my experiences you should be careful when baking AO into the diffuse map or directly into the greyscale texture. In this case you are darkening the resulting greyscale texture which results in a color shift. IMHO it is better to keep the AO map in a separate channel and combine it on-the-fly in the shader.
2. Use the layer magic of photoshop or gimp 2.8 to create your final greyscale.
d1ver has a link to his UDK shader, at the bottom of the article. In Maya you should be able to create something similar with Hypershade.
Some more links here
http://wiki.polycount.com/Multitexture#Modulation_Blending