Home Technical Talk

Controlling Tiling texture direction with vector / flow maps

polycounter lvl 11
Offline / Send Message
Progg polycounter lvl 11
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

  • Eric Chadwick
    Options
    Offline / Send Message
    I'm using flow maps a lot in Unity, with custom shaders.

    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.

  • Progg
    Options
    Offline / Send Message
    Progg polycounter lvl 11
    I've tried a few ways to paint directly on the mesh, including Substance Painter's method (https://support.allegorithmic.com/documentation/display/SPDOC/Flow+Map+Painting) but it didnt seem to work the way I thought it would, I guess. I was painting down the mesh in the direction I wanted the Flowmap to influence in continuous strokes, but it seems to have some major issues crossing UV seams between islands. 

    I might just scrap the whole flowmap thing and try to get by with just a second UV channel.
  • demilich
    Options
    Offline / Send Message
    demilich polycounter lvl 8
    It might look incorrect when you paint across UV seams but it is actually correct. As long as you have the Follow Path button on, the flow should follow the strokes. You might have issues if you have mirrored UVs, but I'm not sure if flow maps work well with that. A second UV channel might help to use as your flow map but you will have to give your mirrored UVs from the first channel their own unique space without rotating or adding new seams to avoid changing your tangents and bi normals. If your tech can combine tangents and binormals, then your second uv channel can be whatever UVs you want I assume.
Sign In or Register to comment.