Home Adobe Substance

flow map without a brush?

gnoop
polycounter
Offline / Send Message
gnoop polycounter
is it possible  to make flow map in Substance Designer somehow ?  
For example for this kind of dried out ground streams .  I spent last couple days  trying to invent the way  but still have no idea.


I know I can do it with a"follow path" brush option in SPainter  but how could I do it  procedural way?    

I tried to make regular  normal map  and then shift it slightly  but  it makes the flow vector inaccurate.   Does anyone manage  to do  it  in SD?

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    a normal map is workable as the x/y components of a flow map - the problem you have is generating flow direction

    you may be able to use a kernel based approach to determine flow direction at a heightmap pixel based on the slope angle between it and it's neighbours - basically the same approach you'd use to generate a normal map 

    I'm not sure how well it would work out in practice though. 
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    Thanks poopipe.      I am afraid kernel approach  is something   too complex for me.    Have no idea how to do it on my own in pixel processor.     Would appreciate an example of  any sort.   

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    the sobel filter bit in the curvature_sobel node is a fairly simple example 

    it samples the 8 neighbouring pixels to the current one (thats the kernel) and uses the difference in normal direction to work out how much curvature is happening. 

    this is a fairly clear explanation of how kernel based filters work
    https://setosa.io/ev/image-kernels/

  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    poopipe said:
    the sobel filter bit in the curvature_sobel node is a fairly simple example 

    it samples the 8 neighbouring pixels to the current one (thats the kernel) and uses the difference in normal direction to work out how much curvature is happening. 

    this is a fairly clear explanation of how kernel based filters work
    https://setosa.io/ev/image-kernels/

    Nice link.. This custom-widget is sweet :D
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    Thanks a lot  poopipe   Very  explaining link indeed.          Meanwhile  I am trying a bit other approach by  painting initial tillable cells structure  as a  flow map by a brush  and  then making every directional warp and slope blur   I used  to   deform in sync the initial flow map colors too  with a certain color/vector mix.
    Too bad Substance  doesn't have a "replace nodes" command it's gonna be a hell of tedious job since  my  node network is undecipherable macaroni monster  :( 

    Looks like  anyway will be neceaasry  if I switch the initial cells from manual painting to kernel approach . I think it could be working  in some macro low mip mode rather than exact pixel to pixel  
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    ive had a little poke at this  out of curiosity. 
    there's no point building your own kernel based stuff - whatever happens you're just going to end up with a normal map and without looping there's nothing you can do to track an individual pixel "rolling" down a slope

    you might have some luck with this sort of thing...  the basic idea is to use the normal direction as UVs and then scroll them by height

    it's going to be pretty difficult to maintain the integrity of the input image - I imagine it'll work better in a shader but the input flowed texture is going to get pretty brutalised 



  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter

    poopipe said:
      the basic idea is to use the normal direction as UVs and then scroll them by height





    Thanks a lot for trying  poopipe .    I am still not sure I understand  how the flow vector/direction is derived here .  I tried to build this and it looks like  vector warp  node mostly.

    Same as with both vector warp and morph you need proper  flow map  as a vector input
    In my  texture the streams are just directional warp of some initial cell pattern  so if  I turn that kind of cell pattern or bubbles into normal map  I am not sure  how  can I detect  the edges  changing their direction  .   

     
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    This is my initial idea how to get flow vector  but it has an obvious fault   since the rotaton is   represented  only within180 deg.  Same as in a normal map. 


    Perhaps if the normal node would give  kind of exr normals representation  like in Blender normal AOV   it might work better but I am not sure.

    If somebody have an idea how to make   those small details follow  cell pattern  I would be appreciative.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    What the function I posted does is remap a set of UVs so that the Y coordinate tiles along the height map's height value and also both sets of coords are wobbled by the normal direction in the normal input.
    It is indeed similar to the vector warp . 

    I'm going to give this some more thought but I have tried to make working direction maps before (that's what you actually want) - with the support of genuinely clever people with maths degrees etc. and not had any success in terms of a general solution so im not entirely confident


  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    Thanks poopipe   it's cool approach indeed.   As of  direction map  I believe some  people found the way already somehow. I recall I saw  a substance material with tire tracks with tire patterns following  some invisible curve.  Surely it should be some directional vector input for that.      Would be nice to put cracks brunching  in points of switching direction and numerous of other  uses.
Sign In or Register to comment.