SHADER Photo Quality Road Surface

Discussion in 'Tracks' started by luchian, Dec 17, 2016.

  1. William Riker

    William Riker New Member

    Joined:
    Aug 23, 2015
    Messages:
    29
    Likes Received:
    5
    Ok so i did now some tests, in the first picture you can see the results after giving it a very dark (Not black) alpha channel to the diffuse texture and a bright alpha channel to the detail texture. Detail texture can be noticed much more, but still it's ruined by the diffuse alpha that's now giving it dark spots on top of it.
    In the second picture i saved the diffuse texture with no alpha channel at all... it's kind of the result needed but you can still see the diffuse texture ruining it on the left side. And neither should be this way... the diffuse texture should have an alpha texture... I don't know what i'm doing wrong.. :(

    [​IMG]

    [​IMG]
     
  2. LilSKi

    LilSKi Well-Known Member

    Joined:
    Apr 6, 2015
    Messages:
    370
    Likes Received:
    329
    send me an fbx, peristence, and textures and I'll look at it. We can go around for days trying to work this out in text where I might be able to find it in person in 3 seconds and report back.
     
    Leonardo Ratafia likes this.
  3. William Riker

    William Riker New Member

    Joined:
    Aug 23, 2015
    Messages:
    29
    Likes Received:
    5
    Awesome! thanks!
     
  4. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    3,007
    Likes Received:
    1,491
    So, is this solved ?
    And if yes, how pls :D ?

    Sent from my phone using Tapatalk
     
  5. LilSKi

    LilSKi Well-Known Member

    Joined:
    Apr 6, 2015
    Messages:
    370
    Likes Received:
    329
    Couple things wrong here. First is the UV map. It must be uniform for fresnel to work right. the NM scaling is based on the UV map so it can't look like this.

    upload_2017-12-23_12-34-0.png

    Second is your textures look nothing like kunos textures so you will never get that look with these. This is what it looks like when you use kunos style textures. This was one area where the UV map wasn't all whacky.

    upload_2017-12-23_12-35-30.png
     
  6. William Riker

    William Riker New Member

    Joined:
    Aug 23, 2015
    Messages:
    29
    Likes Received:
    5
    You are right, i tested other Kunos quality diffuses and details and i realize that my detail texture specially seems to be very inappropriate, i'll take the UV map tip into consideration also and keep working on it, thank you!
     
  7. William Riker

    William Riker New Member

    Joined:
    Aug 23, 2015
    Messages:
    29
    Likes Received:
    5
    Okay so i worked on the quality of the textures and i'm already getting something very close to what i expected, thanks!

    [​IMG]
     
    Pixelchaser, Willy Wale and luchian like this.
  8. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
    Hi
    Can this technique be used for areas beside the roads? Ground, landscape, scenery etc.
    Could an orthoimage be used as a diffuse with some detail textures on top? If the orthoimage covers both forest, gravel and grass surfaces, would it require different detail textures or is it negligible?

    I'm having a hard time texturing the areas closest to the road (0-10m beside), that's why I'm asking. How do you guys usually texture the ground surfaces?

    /Marcus
     
    Pixelchaser likes this.
  9. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,050
    yeah use it for everything, use it globally, paint detail with the mask, and its great, can reduce material count in general. where you need more than the 4 detail channels. use a new object and re map it. for the road sides I use a strip 0.5 m wide to join between main terrain and into the road. but depends what type of details you are going for.
     
    fizzybanana likes this.
  10. r@m

    r@m Active Member

    Joined:
    Jun 7, 2017
    Messages:
    199
    Likes Received:
    141
    @fizzybanana If you haven't done so already and are keen to learn, grab a copy of 3DSimED
    and open up any Kunos track, easy to do do and you will grasp the basic structure of most materials in a very short time and have a clear understanding how and where they are used.

    Export as FBX and load up in Modded KsEditor, it lets you save out material libraries you can use in your tracks with your own textures.

    https://ascobash.wordpress.com/2015/07/22/kseditor/

    This will give you a solid base to work from, it only takes a few minutes studying each material to understand how they work, the number and type of bitmaps you will need, and which slot to use them in.

    ...all for educational purposes only of course ;)
     
    fizzybanana likes this.
  11. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
    Thank you for your answers. I gave 3DSimED a try and it's a nice tool to understand the concepts of not only textures but other things as well.

    Another question. Can I use a mask to mask out diffuse textures or is it only for detail textures? Haven't found an answer to that or there is something I don't understand.
     
  12. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,050
    the diffuse is blended with the details. you don't see the mask, it used for positioning the detail textures . compounding colour in this blend can be an issue. mainly kunos use a black and white diffuse and full colour details. this method brings an element of ambient occlusion to the scene. but theres all sorts of ways to use given that the details are globally mapped while the diffuse has a uv map etc.
     
  13. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
  14. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    3,007
    Likes Received:
    1,491
    It's even easier than that. You create the mask in PS. And then you assign detail textures in SDK Editor, multilayer shader. In the above example, the red will be automatically replaced with whatever texture you set in the Red channel, inside SDK Editor.
     
  15. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
    But using the Multilayer shader in AC Editor, aren't you limited to use 1 texture per channel?
    And you want to use the detail textures in those channels? (and that's the kind of greyscale image right?)
    Then where do I get the color from then, the green grass color?
     
  16. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    3,007
    Likes Received:
    1,491
    The names don't have much to do with the actual color. They are referring to the channels (RGB) in the mask texture. Using Red channel in SDK does not mean that only red/grey will come of that. It means that the texture assigned to that channel (e.g. red) will be visible in all areas marked red on the mask.
     
  17. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
    Hmm, I'm not quite sure what I'm thinking right now... Will try to explain it with an image, see attached.

    This is what I mean. I create a mask and then assign both a diffuse and a detail texture to each channel inside AC Editor. Is this the way to go, or should i already in Photoshop put the diffuse textures over the red and blue areas and use that as a diffuse?

    I'm thinking that you can only assign 1 texture to each channel inside AC Editor, which means that this method will not work.
     

    Attached Files:

    Last edited: Jan 8, 2018
  18. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    3,007
    Likes Received:
    1,491
    Not sure why you write diffuse red channel. Diffuse should be just diffuse.

    EDITED:
    Mask is correct (left image - although you don't make use of green, but it's not mandatory)

    You can have an additional Detail for green channel, if you want.

    Now you would just use them in AC Editor, in a multilayer shader. Make a test, and see the result :).
     
    fizzybanana likes this.
  19. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,050
    that is me just using the mask on the model in rtb. and yeah all done in photoshop. where you see those colours means different detail textures.
     
    fizzybanana likes this.
  20. fizzybanana

    fizzybanana New Member

    Joined:
    Jan 1, 2018
    Messages:
    17
    Likes Received:
    2
    Location:
    Sweden
    But I wonder if it's possible to use multiple diffuses and apply them to different RGB channels in the same way as for the detail textures. But in AC Editor I see only 1 slot for a diffuse texture. So, the diffuse MUST BE ONE single texture only? See image attached to this post if I get it right?
     

    Attached Files:

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice