Home Adobe Substance

best workflow with detail maps?

PiroKun
polycounter lvl 3
Offline / Send Message
PiroKun polycounter lvl 3
Hi! im new on substance designer, and im trying to figure what should be a good workflow to work with detail maps(where you put a tileable albedo and normal for extra details), using this software. Im working in assets for a realtime project, but im using ogre 2.1 and blender (So, i dont have anything like the node editor in unreal for quick preview).
Thanks!

Replies

  • Jerc
    Offline / Send Message
    Jerc interpolator
    You would most likely have to create a new shader or just add the detail map part to the existing shaders.

    They are located in C:\Program Files\Allegorithmic\Substance Designer\5\resources\view3d\shaders
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    wow, thats great.

    Is possible to set a specific UV to a ouput node? (i think the model should have 2 uv, the full unwrap uv and the tileable uv)
  • Jerc
    Offline / Send Message
    Jerc interpolator
    Yes, just setup your shader so that one of the sampler/output (your detail map) is mapped on the second uv.
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    so, i need to duplicate this line like this:
    <vertexformat name="iVS_UV1" semantic="texcoord1"/>
    and use iVS_UV1 in the shader.... but where i can set the UV "texcoord1" for the ouput in substance designer?


    and another question. can i multiply the first UV coord? so this way i dont need to duplicate and manually resize the UV.
  • oblomov
    Offline / Send Message
    oblomov polycounter lvl 8
    where i can set the UV "texcoord1" for the ouput in substance designer?
    It should be done automatically if your mesh has a second set of UV coordinates. I have not checked that it actually works though.
    can i multiply the first UV coord?
    Yes, you can do that in the fragment shader.
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    thanks :)

    But about my second question, i mean this scenary:

    -Edit the shader for multi uv support

    -Inside the substance designer, use the main textures with the first UV

    -Inside the substance designer, use the detail textures with the same uv, but tiled/multiplied (And this done in substance, not the shader)

    ( this way i dont need to create and adjust the 2nd uv in a 3d program, and will be more easy to tweak. )

    - the shader take this previously multiplied version of UV0 as UV1 for the detail map

    This is possible? Is there a better way?
  • oblomov
    Offline / Send Message
    oblomov polycounter lvl 8
    In this case you don't need a second set of uv coordinate. You only need to change the shader to have an extra texture input for albedo and for normal, and read them at multiplied uv0 coordinates . Eg for diffuse, if you want to blend the colors from the main and detail texture, with the detail texture using 10x tiled texture coordinates from uv0 you need to have something like this in your shader

    mainColor = texture2D(mainTexture, uv0);
    detailColor = texture2D(detailTexture, uv0*10);
    finalColor = my_blending_function(mainColor, detailColor);
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    great

    and, how i can connect the second normal ouput in the graph with the second normal map in the glslfx?
    <sampler name="normalMap" usage="normal"/>
    <sampler name="normalMap2" usage="normal"/> //<--this
  • oblomov
    Offline / Send Message
    oblomov polycounter lvl 8
    Just create a new usage. You can name it "detail_normal" for example. You need to change the usage for your second graph output and your second texture sampler.
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    thanks! I thought usage list was fixed

    and now for UV,
    how i can send a number from substance to glslfx?(for multiply the same uv)
    and assingn an uv for an output? (in the case i have 2 uv, one for normal and other for normal2)
  • PiroKun
    Offline / Send Message
    PiroKun polycounter lvl 3
    just test texcoord1 in glslfx and works! but work in order, like "first uv in mesh = first uv in shader"

    works perfect in the case in which each texture has a diferent uv map. but what if i need to reuse an uvmap? in such cases I need to specifically assign the corresponding uv to texture, regardless of whether or not uv repeats. but how?
Sign In or Register to comment.