Home Adobe Substance

how to do non squared material UV tiling in SD ?

SebKaine
polycounter lvl 5
Offline / Send Message
SebKaine polycounter lvl 5
Hi guys, 

I would like to know how to do UV tiling at shader level in SD.
I don't want to do texture tilling that would lower my texture resolution.
At the moment i can only use in the 3d view  Material > Default > Edit > Tiling

  

But it only give me a uniform square ratio.
I need to be able to set custom X, Y value like (3,15) for exemple.

Is it possible to do this ?

Thanks for your time.
Cheers 
E


Replies

  • Jerc
    Options
    Offline / Send Message
    Jerc interpolator
    You would need to expose the X and Y parameters separately in the shader settings. That can be done by editing the shader files in 
    C:\Program Files\Allegorithmic\Substance Designer\resources\view3d\shaders
  • SebKaine
    Options
    Offline / Send Message
    SebKaine polycounter lvl 5
    Many thanks for your help Jerc, I'm quite new with SD. 
    Could you please tell me, if these are the one to be edited to get this works  
    - with the Metallic / Roughness workflow 
    - with OpenGL / Iray preview 





    Thanks again.

    EDIT:

    I have try to replace  in fs.glsl

    uniform float tiling = 1.0;
    by 
    uniform vec2 tiling = vec2(1.0, 1.0);

    But it doesn't work,

  • SebKaine
    Options
    Offline / Send Message
    SebKaine polycounter lvl 5
    Ok it does work for OpenGL by modifying the 2 files attach.

    in fs.glsl
    uniform vec2 tiling = vec2(1.0, 1.0);
    replace 
    uniform float tiling = 1.0;
    in parallax.glsl
    <div>vec2 updateUV(&nbsp;..., in vec2 tiling)</div>
    replace
    <div>vec2 updateUV(&nbsp;..., in float tiling)</div>
    Thanks a lot ! now i need to make it work for iray.

  • SebKaine
    Options
    Offline / Send Message
    SebKaine polycounter lvl 5
    @Jerc > How would you do to edit an .mdl file ? i have try to open them in SD without succes. What am i doing wrong ? 
    Thanks again for your time.
  • Jerc
    Options
    Offline / Send Message
    Jerc interpolator
    Only MDL files that were created in SD can be opened in SD. Regular MDL files are very similar to glsl files and can be edited with a simple text editor.
  • SebKaine
    Options
    Offline / Send Message
    SebKaine polycounter lvl 5
    Thanks again for your help Jerc. I have succesfully open all the .mdl with a text editor, but the synthax is pretty weird and i haven't find where i need to edit the thing. It doesn't look like a shader that much , but more something like a weird xml declarative stuff. I think i'll pass on this and stick with the glsl preview.


  • Jerc
    Options
    Offline / Send Message
    Jerc interpolator
    Indeed, looking at it now, it seems like the tiling is hardcoded whenin Iray, the setting is not exposed in the mdl file.
  • SebKaine
    Options
    Offline / Send Message
    SebKaine polycounter lvl 5
    Thanks for the info Jerc !
Sign In or Register to comment.