Home Adobe Substance
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

Have anyone figured out how new Curvature Smooth node works in Designer?

gnoop
sublime tool
Offline / Send Message
gnoop sublime tool
So far I find it best for doing various edge masks  just  on top of a  final  normal map .    Tried to make it work in Painter  but as always  it's weird and never same , works only on square textures  i.e  a dead end.   

Want to recreate it for Blender  shader editor.  
I see it sort of shift iteratively in  x and y  positive and negative detection the   dot products of normal XY channels vs plain XY vectors  and then subtract  from before shift .    No actual blur involved probably which is extremely hard to do in Blender.  just loops  of fading shifts.      But this is mostly my guess.   I couldn't understand   some parts at all when open the node in Designer .        Am I on the right path ?




  
I would want to give it a kind of a wind effect  to have brighter  slope down to certain  direction .    Any ideas how to do it?   


Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    it's a bit beyond what you can do with a stateless pixel shader effect afaik.  standard curvature is doable with a sobel (like) filter but this needs to consider a much larger range

    if you want to mask by a specific normal direction though - just dot(normal, other normal) 

  • gnoop
    Offline / Send Message
    gnoop sublime tool
    poopipe   From what I see in the node  Designer just makes copies  scaled down images till 2x2 pix  where it perform roughly same  and upscale back .  Instead of doing blur  or Sobel like .     But it's extremely hard to read and figure out  form their math nodes  really  as if they specifically tried  to make it cryptic  vs Blender for example so I am not sure .   Some parts  I don't understand at all.      Like where they set their variables and what for . I hardly see any "set" nodes. 
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I (naively) assumed they'd done it properly 
    Hacks like that explain why it breaks down under some circumstances 

    edit:

    ok so I've had a look . Hopefully this helps with some of the weird bits 
    The only variable they seem to be using is the builtin $sizelog2  -which is log2(pixel size of the input) ==  log2(512, 512) == (9, 9) etc.. 

    The  constants they declare are mostly the log2 of image size - this function which sets the image size on one of the blends ensures that the final output is 32x32 px.  if you pass a 64,64 px node in, it will set the relative size to -1 :  (5,5) -(6,6) = (-1, -1)


    In terms of what it does..
    You're basically right...
    They're splitting the normal map into x and y components, making several copies, blurring them to various degrees and blending them back together with less and less influence as the sharpness (image size) increases (The blends set opacity with (1.0 / $sizelog2) ).  This is a hacky/ingenious way to pretend you're sampling multiple times over distance and is a similar principle to building fractal noise. 

    Things i noticed... 
    • I don't think this will work properly at over 4k.
    • The very small (16x16) images are treated slightly differently to the >= 32x32 images but the principle appears to be the same 
    • There are a lot of nodes (the switch blends on the right side of the graph and the nodes that feed them) that don't appear to do anything but guard against data it doesn't like - you can delete quite a big chunk of the graph without changing the output
    • This could probably be implemented more elegantly but in terms of output I think its as good as you'll get from designer.  I find it slightly disappointing that they're not implementing some of these nodes as a c++ plugin (the vector/directional blur would be a good candidate)

Sign In or Register to comment.