Home Adobe Substance

Substance Designer + Input image Size -> Projection-Tool

polycounter lvl 6
Offline / Send Message
goekbenjamin polycounter lvl 6
Inside Designer i define a "Input Color" and expose it, so the user can place a custom image.

The Material is meant to use with projection-tool, so when the user-image is square (500x500)
the preview of the projection is fine, no stretches...

But when the user add a NON-sqare image (1000x500)
the preview of the projection is stretched.

Is it possible to handle that in designer (like with a node)?

Replies

  • Eric Chadwick
    Heyo. Moving this from Technical Talk into the Adobe Substance section.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    If there's no exposed scaling parameters on the projection node you should be able to use a transform node to scale the input image to the right proportions within a square  - youll have to give it the original resolution and do some mild sums to work out the correct scaling but it won't be too tricky. 
  • goekbenjamin
    Offline / Send Message
    goekbenjamin polycounter lvl 6
    poopipe said:
    If there's no exposed scaling parameters on the projection node you should be able to use a transform node to scale the input image to the right proportions within a square  - youll have to give it the original resolution and do some mild sums to work out the correct scaling but it won't be too tricky. 
    yeah, i tried to get the image-size via $size in a function, but I am lost, at some point (i think when I set the output size to absolute) the material won't even bake...

    so actually I only need to let designer know what size the image has, but I really don't know how to do it.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Expose an int2 at the graph level,  put the pixel dimensions into that, use it to work out the aspect ratio of the original image and use that to transform the input before you send it to the projection node


    $size returns the size of the graph/input node in pixels,  not the pixel size of the file you input - designer doesnt care about that
Sign In or Register to comment.