Home Adobe Substance

Why SD does kind of square cells while scaling down pixels?

gnoop
sublime tool
Offline / Send Message
gnoop sublime tool
Does anybody know  a way to get rid of this?   I recall same thing had been happening with Photoshop smart objects  a  decade ago . Then they fixed it.    
In SD  it always been that way  when you scale down not /2  but rather some arbitrary number  . I mean since the very first version  so I avoided to scale imported bitmaps as much as possible  but maybe there is a simple workaround, a secret trick  or something   ?   

Here is  Photoshop vs Substance Designer with around same pixel/detail ratio  for example:


Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I can't say I've ever noticed it tbh

    Does it happen with the software renderer?
  • gnoop
    Offline / Send Message
    gnoop sublime tool
    poopipe said:

    Does it happen with the software renderer?
    Yes, no difference.    Actually it 's not just scaling  it's shifting pixels too .  SD can't shift anything to say exactly 10 pixels   left.   So any node that scale down  and shift , re-shuffle  bitmaps  turns into that kind of mess,    Specifically "smart auto tile" and "make tile"  nodes.    I never use them because of that..   

    It's usually not very noticeable  until you go to very brink of small details getting dissolved among pixels .

      If you scale with /2 output size sliders  it's totally ok  .     2d transform also works much better if you scale by top right corner only  without shifting gizmo.                       




  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Designer isn't working with pixels - it's sampling in UV space so there's no concept of a hard division between a pixel and it's neighbour - that can lead to confusions if the filtering is a bit crap

    the exact repro case is a little unclear from the posts in here - can you explain it step by step and I'll try it out at my end 
  • gnoop
    Offline / Send Message
    gnoop sublime tool
    poopipe said:
    Designer isn't working with pixels - it's sampling in UV space so there's no concept of a hard division between a pixel and it's neighbour - that can lead to confusions if the filtering is a bit crap

    the exact repro case is a little unclear from the posts in here - can you explain it step by step and I'll try it out at my end 
    In this case I imported  CG render  >  use  smart tile node > 2d transform to scale down a little bit  > another smart auto tile.

    But in fact I always see  that kind of square cell structure when use 2d transform on any  grainy  looking image .   Like asphalt , grass  etc.    Sometimes it's more noticeable, sometimes hardly noticeable at all .    If the subject is kind of low contrast  features  it's invisible usually but my guess it's still there.           In SD I always have to work in twice bigger resolution  but nevertheless  Photoshop still does it always way better.

    Interesting thing is that Affinity Photo also sometimes shows you something like that on a screen  for embedded/linked bitmaps   but only  before you do final  rasterization into document resolution or export into target  format .  Once you did it's fine


  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    so, I did a couple of tests and you're absolutely right.  it looks like shit . 

    why ? 

    bilinear filtering is bad at minification (downsampling) . 

    Photoshop uses more appropriate filtering methods for downsampling (you can choose which one when you apply transforms iirc)  these are slower and possibly not easily GPU accelerated  (trilinear and anisotropic filtering are better but I believe rely on distance/angle information)  I imagine affinity uses bilinear filtering for preview and then applies a better one once you commit the change

    so. back to Designer  

    On the left of the attached image I've set the mipmap mode on my transform2d to Automatic, on the right it's set to manual with the mip level set to 0. I've scaled the image down by non uniform values around 30% 
    This is roughly equivalent to setting mip bias on a texture sampler. 

    if you scale down more you probably want to choose a larger mip level to avoid sparkles 


    to fix smart auto tile you'll have to break open the graph and expose the mip-mapping parameters from any transform2d nodes inside it so that'll be fun (i recommend making a copy and putting it somewhere safe)


  • gnoop
    Offline / Send Message
    gnoop sublime tool
    I already set all my 2d transforms to manual 0  years ago.  Not smart tile although.      Still see that squares pattern sometimes at certain down-scaling ratio   if subject  is kind of a contrasty nature  with a tiny shadows etc.   

    Guess nothing could be done  and a good idea is not scaling  anything in  SD at all. 
Sign In or Register to comment.