• Dear visitors,

    The email issue seems to have been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

SHADER Photo Quality Road Surface

Pixelchaser

Well-Known Member
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?
your object has 1 material. you could give it multiple materials if you wanted too.

this image above is wrong approach.

the channel painting RGB is for the mask only. the diffuse is just a full colour texture. the details are full colour textures. the mask is just a (full colour texture) that controls placement of the detail channel textures and blends all that with the primary diffuse in the shader.
 
Last edited:

luchian

Administrator
Staff member
Multiple materials are not supported in AC, afaik.

Yes, it's correct, but diffuse can be "clean", no need for any "stripes".
 

fizzybanana

New Member
Don't mind the white stripe in the diffuse. But if I wan't the color variation in the diffuse and avoid the sharp edges. Do I simply have to blend the colors in some way? Like this:
 

Attachments

Last edited:

quetillo

Member
good, I do not understand much about photoshop, so I stay with it in the first, alhpa and mascara channel, I will not continue. A small video would be of great help, I have been 2 days and I can not get it out, it is very well explained, but no There is a way to continue. It would be of great help to finish my section and give it more realism. Thank you very much
 
Before anything, all credits for this guide go to @LilSKi , who took the time to share (<<thank you). If you are not familiar with him, his tracks (e.g. Bridgehampton Race Circuit) are one of the best modded tracks out there.

Back to our guide, this is what we aim to.. ahm no, what we WILL obtain by following the indications below.

View attachment 1306
View attachment 1307

The shader to use (the that Kunos also uses in official tracks) is ksMultilayer_fresnel_nm
Here are the settings from the SDK Editor.

View attachment 1308

View attachment 1309

Let's go through all those textures and how to set them up to produce what you see above.

1/ the road diffuse.
This texture should be 1024x4096. You want as long a texture as possible to limit the amount of times it repeats. Shown below is the diffuse with the alpha channel next to it. Basically, the alpha channel here is your specular level. White is 100% and black is 0%. What I simply do is make the alpha channel a copy of the diffuse and adjust the levels how I want them to be. The format of the diffuse should be DXT5 and with about 4 mipmaps.

View attachment 1310

In general you only want to use one single diffuse for your entire road. You may ask "how do I get color variations and such?" The answer is in the detail textures which I will get to that in a later post.

2/ the mask.
My mask is fairly small at 128x512. It does not need to be as large as the diffuse. Mine looks like this and is in DXT3 format with 4 mipmaps.

View attachment 1311
The red is where the main road detail image is shown and the purple is where the main red channel detail is mixed with the blue channel crack texture. You can play with this bad boy all day long and even mix in the green channel if you want with another detail texture. I only used the two channels. You shouldn't need to use the alpha channel with this so it should be 100% black if it is not used with a detail texture.

3/ txDetailR - the main detail image (in this example).
It should be 1024x1024 in DXT5 format with 4 mipmaps and it looks like this. The main texture is on the left and the alpha channel is on the right. This alpha channel is also specular so here you want it fairly dark with only some pebbles light to light up by the sun.

View attachment 1312

3.1/ txDetailG
If you are not using any of the color channels in the mask you can simply repeat the main detail image just to complete the form in the editor. In my case I don't use green so it gets the main detail again.

3.2/ txdetailA is also not used in this case, so it can be set to the main detail like the green channel.

4/ txDetailB - The blue channel
Used in this example for the cracks texture. It should be 512x512 and DXT3 with 4 mipmaps. Again the alpha channel is specular. You will have to fine tune it so it matches the detail texture it blends with.

View attachment 1313

5/ normal map.
It should be 1024x1024. No alpha is used on this and it can be DXT1 with 4 mip maps. You adjust the normal map resolution with the two numbers in "detailNMMult"

View attachment 1314

Final note from the author: I hope this helps clear up how to set the textures to make this shader work properly. I would suggest you use my settings to start and then you can play with the numbers to make them work for you.

..and a possibly useful note from NightEye: I found that Photoshop exports a full black alpha as full white somehow. Making the alpha #010101 fixes this. It doesn't matter if you use a black detail texture, though. But it's worth mentioning for people who experience weird results inside the Editor.


***
So there it is, asphalt in all its glory. If you get this to look right, it's a huge step in bringing your track to "AC standards".

***
PS: an alternative explanation, you can also find in this post from @Pixelchaser , should that "speak" better to you. Whichever you choose, good luck and let us know your results !
This is great. Are the textures of the example available anywhere for download? It would be great to have a step by step video showing how to use the downloaded textures in Blender and ksEditor
 

Corracar

New Member
Thank you @LilSKi for your tutorial! And thanks to @luchian too!
I'm trying to improve my first track quality. I used ksMultilayer_fresnel_nm shader.
I discovered that it's very important how I resize the main texture in Blender, and it's not so easy to reach the best values. Sometimes the texture is too stretched along the x or y axis. Another stuff: if I use a diffuser too dark, I have strange results in AC.
Anyway, now I changed detail texture, crack texture and I made a new normal map starting from my detail texture. I see that the tarmac is quite good in the shade but a bit strange in the sun. What's wrong? I attach two pictures... I used two differents NM, obtained from the same detail picture. Shader settings are the same.v 179.jpg v 181.jpg
 

DiME

New Member
Maybe it's a bit late, but I'm also confused about specular/alpha thing. So what I need to have is a specular map image (black and white, toned contrast) but how do I convert that to an alpha channel? the RGB channels are filled, but the A channel remains empty even after applying alpha, and It makes sense because well, a black and white image doesn't contain any alpha information for GIMP to understand it.
upload_2022-5-19_13-16-15.png
upload_2022-5-19_13-16-41.png
 

Attachments

Mitch9

Member
Maybe it's a bit late, but I'm also confused about specular/alpha thing. So what I need to have is a specular map image (black and white, toned contrast) but how do I convert that to an alpha channel? the RGB channels are filled, but the A channel remains empty even after applying alpha, and It makes sense because well, a black and white image doesn't contain any alpha information for GIMP to understand it.
View attachment 7607View attachment 7609
That´s more of a gimp question. Sorry I dont remember the steps off the top of my head but essentialy you make a mask and apply it as the alhpa channel.
This guide should help out a bit: https://www.gimp.org/tutorials/Layer_Masks/
 

Martin Lacina

New Member
Hi guys. I would like to ask you what is your best experience to create the base diffuse asphalt texture with such a nice colour variation, cracks etc. what is visible in the first post. Im still curious about how to create such a texture from scratch but i didnt found any good references. My idea is to create procedural texture in blender and bake the final texture from it but im not sure if this is possible. Or is it just about painting this texture in GIMP/photoshop?
 

kaze59190

New Member
Hi guys. Thanks to this great tutorial I changed my road shader to ks fresnel multilayer but I'm getting some strange lighting issues. It looks like some parts of the road are lit "in reverse"

lighting.png


The road is a single mesh, low poly, with a Catmull-Clark subdivision and a Shinkwrap modifier so that it stands above the terrain.

mesh.png


I've tried applying scale, setting normals correctly but I'm still having this issue in ksEditor.
Here are my shader settings:

spec.png


I took some time to search for similar issues in this forum but could not find any.
Does anyone know how I could fix this ?
Thanks!
 

fughettaboutit

aka leBluem
some values are too high, try ksSpecular at 0.1
fresMaxLvl 1 or lower

make the uv mapping coninuous, and not flipped on the y axis, that might also be a reason that lighting gets this bad

or you are using a bad normal map, hint: assettocorsa\sdk\dev\car_pipeline_2.0rev\Photoshop Action\Normal_MAP_Rotation.atn
 

kaze59190

New Member
Thanks a LOT for your help @fughettaboutit !

The UV map of the road was made of different parts, and some parts were flipped. Now that I've made it continuous it looks much better.

I also adjusted the values as you suggested and it also improved the rendering a little bit but I still have to tweak those values. There's still some darker areas but I'll have to check in-game how it looks and adjust the shader.

fixed.png



for the detail NM I made it from my texture main detail using the 3D tool in Photoshop. Should be okay but I'll check your hint If i can't get it to look better

Thank you !
 

Alex23Rally

New Member
Hello everyone, I have a questions regarding the markings on the road for a real life road.

I have been thinking for the last couples of days about how to make the marks on the road. Like the line in the middle and markings like turn left, go forward, speed limit and so on.

What is the best approach to it? I am using Blender.

I was thinking that i have two options, either, make the road in small little pieces and when the road marks needs to change, it will just be a different road piece with that texture, but i'm thinking that will not work all the time and it would be a lot of assets to build and time consuming.

My second option which i think is a better and easier approach and that offers more flexibility is to make the main road clean, plain concrete paths(roads) with nothing.
And then add the markings as seperate objects on top of the plain road. Then it would be easier to put how and where i want the markings, like the line in the middle to separate the lanes and turn left/right and speed limit and other things like that.

I've seen many maps of roads from real world done by other people and their roads looks very good and i would like to know what was their approach for that.

Realy appreciate your help.
Thank you very much.
 

luchian

Administrator
Staff member
Second option, i.e. road marking as separate objects, places e.g. 1 cm above the road, and using alpha for nice blending.

This will also improve a lot the way the line marking looks in the distance.
 

Alex23Rally

New Member
Second option, i.e. road marking as separate objects, places e.g. 1 cm above the road, and using alpha for nice blending.

This will also improve a lot the way the line marking looks in the distance.
Thank you very much for your quick reply luchian.
I'm still learning on how to make/export all those dds files , but will get there eventualy, didn't realy had the time to look into it properly.

Still working on my map while trying to learn about texturing it.

I will come back when i have results of my textured map.

Thank you very much.
 

Xuacu

Member
Hi guys. Thanks to this great tutorial I changed my road shader to ks fresnel multilayer but I'm getting some strange lighting issues. It looks like some parts of the road are lit "in reverse"

View attachment 7812

The road is a single mesh, low poly, with a Catmull-Clark subdivision and a Shinkwrap modifier so that it stands above the terrain.

View attachment 7813

I've tried applying scale, setting normals correctly but I'm still having this issue in ksEditor.
Here are my shader settings:

View attachment 7814

I took some time to search for similar issues in this forum but could not find any.
Does anyone know how I could fix this ?
Thanks!
some values are too high, try ksSpecular at 0.1
fresMaxLvl 1 or lower

make the uv mapping coninuous, and not flipped on the y axis, that might also be a reason that lighting gets this bad

or you are using a bad normal map, hint: assettocorsa\sdk\dev\car_pipeline_2.0rev\Photoshop Action\Normal_MAP_Rotation.atn
I think I have a similar problem in my project and I would like to know if there is a way to solve it.

I have made a city based on Google Earth, and for the road I have made a bake of the textures that I take as a reference but I have to improve, but I wanted to be able to have each area separately to be able to give heterogeneity to the road, as is reality .

But I see that when following the tutorial "SHADER Photo Quality Road Surface" each segment has a different lighting although the size of the detail textures are practically the same.

Road_A.jpg


Before this I tried to make the road continuous with a single texture and since it is a single element there are obviously no changes in brightness.

Road_B.jpg


My question is if there is any way to fix option A or the only way to do it according to this tutorial is mode B. I don't quite understand the phrase: "not flipped on the y axis" about the UV maping

Thank you very much!
 

Johnr777

Moderator
I think I have a similar problem in my project and I would like to know if there is a way to solve it.

I have made a city based on Google Earth, and for the road I have made a bake of the textures that I take as a reference but I have to improve, but I wanted to be able to have each area separately to be able to give heterogeneity to the road, as is reality .

But I see that when following the tutorial "SHADER Photo Quality Road Surface" each segment has a different lighting although the size of the detail textures are practically the same.

View attachment 8607

Before this I tried to make the road continuous with a single texture and since it is a single element there are obviously no changes in brightness.

View attachment 8608

My question is if there is any way to fix option A or the only way to do it according to this tutorial is mode B. I don't quite understand the phrase: "not flipped on the y axis" about the UV maping

Thank you very much!
The issue is with the normal map in that multilayer shader, since you have it baked from the google reference, the UV makes is so that the light shines on that section differently. I would use a different shader.
 

Xuacu

Member
The issue is with the normal map in that multilayer shader, since you have it baked from the google reference, the UV makes is so that the light shines on that section differently. I would use a different shader.
I have tried to put a flat normal map of a single blue color and the problem remains the same, I think it is not because of the normal map
 
Top