Home Adobe Substance

Snap to pixels in Painter

gnoop
sublime tool
Offline / Send Message
gnoop sublime tool
Have anyone ever managed to make sbsar for decals  scale   and move  doing it with pixel snap precision? Or move at least ?  Say I need the decal, a painted line on asphalt for instance  be moved exactly 15 pixels right, be exactly 64pix wide and match exact pixels of asphalt material ?   
 Whatever I ever tried never worked properly in Painter . Not sure "get size'  is working there.

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    In the case where you're projecting a decal onto a texture in anything other than UV space  the texels in a decal are never going to line up with texels on the target texture. 

    As far as I know, every stroke etc in painter is projected and as such this isn't possible

    I would expect it to be possible to generate an sbsar material/mask/whatever that supported it (setting the position/size etc as parameters)  - you can absolutely pixel snap in designer. 

    if you think $getsize isn't working,  just replace it with a parameter and set the pixel size manually -  if it still doesn't work I'd assume there's some reprojection/filtering happening when painter composites layers


  • gnoop
    Offline / Send Message
    gnoop sublime tool
    poopipe said:
    if you think $getsize isn't working,  just replace it with a parameter and set the pixel size manually -  if it still doesn't work I'd assume there's some reprojection/filtering happening when painter composites layer
    Get float2 $size  gets the size of the whole document  and I need to obtain the  size of  a decal   I drop as a layer over to calculate shift and scale values from "pixel" integer inputs . In Designer I just  use "get size"  node that measure whatever bitmap you drop there and pass float2 to transform  node with parent size .   Same approach is not working in Painter by some uncertain  reason.   It always stretch anything up to doc full size 0-1uv     but  you are right  when I input the size of decal layer manually it works . Need to do it anyway if I want to scale it  to certain size in pixels.     Thanks for the hint  poopipe
    That way it works, tried with 1 pix  grid. it doesn't blur away  when shifted.  Still the  gray alpha  pixels become more translucent  than when I use  same approach in Designer . 
     Another puzzle I couldn't solve.
    IMO they should do pixel snap in 2d view  at least   Transform gizmo  is monstrously inconvenient and super touchy
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    The 2d view is still a 3d projection in painter - it's just done in UV space. 
    The whole foundation of the painting system is projected brush strokes so I can't see them implementing anything like that  - especially given that it's a pretty niche use case.


  • gnoop
    Offline / Send Message
    gnoop sublime tool
    Well, left is layer placed with pixels precision  scaled to exactly  64x2048 pix and moved around with 1 pix increments to exact value.   Right is when I scaled the  thing just on my eye and moved around using  gizmo.     So when  I composite  something  from earlier created materials  I always get this  slightly blurrier result.  It's critical on normal map details .   Imo  it shouldn't be a niche use case.  Even  if you downscale twice at export . 
Sign In or Register to comment.