Im currently working on an asset that is quite large and requires tiling detail maps to get back the surface detail at close range to the player. However, the detail maps have a very directional pattern to them. In an ideal world the UV's would be laid out in a way that flowed with the direction of the detail maps, but because of the complexity of the objects unwrap it just isnt possible, thus the pattern flows in all kinds of weird directions as the mesh curls and bends.
I've played with painting a flowmap using these techniques in Ben's post from a long while ago (
http://polycount.com/discussion/98983/how-to-paint-flow-anisotropic-comb-maps-in-photoshop), but it seems to cause the direction of patterning to become erratic instead of warping in a very smooth kind of way. It's possible the flowmap was painted wrong (dont have it here with me at home) but it essentially ended up looking like the flowmap in that post. However driving the texture uv's in Unreal 4 with the stock flowmap function and this map caused it to look pretty crazy.
Has anyone had success with something like this that could offer some tips? I essentially just want to warp the tiling details textures in a way where the direction of the pattern flows in a particular direction following the shape of a larger mesh.
Thanks
Replies
I'm not doing exactly the kind of directional control you're talking about, but it certainly seems do-able from a shader and UV standpoint.
If you used traditional pelt-style UVs, your flow map would have to be authored to counteract that non-uniform flow. The flowmap painting tool would have to load your custom mesh, and let you see the flow across it as you paint it.
It might be easier to use object-space UVs instead, a UV that has consistent direction, for example a top-down object-space projection. This would give you consistent directionality, to override with your own custom-created flow map.
Anyhow you need a custom flow map which matches your particular mesh. Some tools here:
http://wiki.polycount.com/wiki/Flow_map
You would also need to control the strength of the flowmap distortion, to prevent it from over-distorting the UVs and causing a mess. A multiplier param would do the trick.
I might just scrap the whole flowmap thing and try to get by with just a second UV channel.