Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Our response to Improbable’s blog post (and why you can keep working on your SpatialOS game). Read more here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[RELEASED] Improved Road Material 3 (+ dirt road and wetness on road)

Discussion in 'Assets and Asset Store' started by mkgame, Sep 11, 2016.

  1. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Wet/Dirt road available in this version. All road textures were generated with procedural texture generator inside Unity. Custom shader is used.

    In game:
    bandicam 2018-02-12 14-41-42-809.jpg

    In asset:
    RoadWithWetSide.jpg

    DirtRoad.jpg

    SnowWayWithGlossiness.jpg
    In asset store: https://www.assetstore.unity3d.com/en/#!/content/70923


    This road material is a high quality road material, which blends in the terrain texture. The material is based on a
    custom shader, made in Shader Forge, and the road texture is made in Substance Designer.
    The shader and the Substance Designer 5 project is included in this asset, so you can make your changes, if you have the necessary tools.

    Configuring the road shader attributes and the Substance Designer material attributes can be time consuming.

    6 shaders available:

    - shader noise based detailed (8 textures)
    - shader noise based optimal (5 textures)
    - shader noise based simple (4 textures)
    </br>
    - texture noise based detailed (9 textures)
    - texture noise based optimal (6 textures)
    - texture noise based simple (5 textures)

    II recommend you to use a spline asset, one that is good for road creation on terrain, so the mesh adapts the terrain and the road and rotation stays stable.

    So at all, I didn't found any good looking road solutions in the asset store, not even for my upcoming strategy game.
    I had have to make my own road solution.

    Enjoy the road!
     
    Last edited: Feb 12, 2018
  2. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
  3. ayushsingla991

    ayushsingla991

    Joined:
    Oct 1, 2016
    Posts:
    11
    Objects turn black in android using these materials. I have added shaders in graphics settings also. Please Help.
     
  4. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Hi, the shader supports OpenGL ES 2.0 and 3.0. Old and new phones should be able to show the road. I will build an APK and test it on my Qualcomm 810, but it takes a bit time. I guess the procedural .sbsar materials trying to calculate the textures at starting the game and this causes the problem. You shoud use cached textures, select on the Road substances "Bake and keep substance" option in the inspector at the bottom. If it fails even then, then you have to copy the generated textures and assigne them to the material (this takes time, and it is then still a bug in Unity).
     
    Last edited: Oct 7, 2016
  5. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    I took the scene project and built an APK. Installed it on a Qualcomm 810 with 4 GB RAM (also routed, OpenGL ES 3.0 support). It took about 1-2 min. to start the app on the phone, because all the procedural material were not cached (on pc it takes also 20-40 sec). But it runs well, no black textures. Unity 5.3.3f1, my favorite Unity version.

    Maybe you could tell me more about your phone spec, and your Unity version. Do you see the black textures in a windows build? Please tell me exactly what you do, else I cannot reproduce it.
     

    Attached Files:

    Last edited: Jan 28, 2018
  6. ayushsingla991

    ayushsingla991

    Joined:
    Oct 1, 2016
    Posts:
    11
    Sorry for the late reply after inbox message. Actually i got email after the personal message but not with he forum post. My Phone is Nexus 5X. 2Gb Ram. Snapdragon 808.
     
  7. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
  8. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Remember, this asset is for experienced user, it's not simple to make your own road type!

    I'm still working on the next release. The T and X junctions will have round corner additionally, a line at the road border to better hide the road connection (this is a common way to hide the road connections) and junction decoration (+ pattern and X pattern). The I road gets also more kind of center separation lines and more separation lines (3 separation lines). Each separation line will have its own color. I'm still looking for details on real common road types, that can be added to a procedural made road.

    The complexity for creating a road texture in combination with the custom road shader will rise, so I will probably provide an editor script for the next release, depends of the complexity.
     
  9. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    It's not an advertisement for the climate change! The next version comes also with environment effects.
     

    Attached Files:

    Last edited: Feb 9, 2018
    blitzvb likes this.
  10. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Road junctions and connections for the next release.
     

    Attached Files:

    • Road.jpg
      Road.jpg
      File size:
      433.2 KB
      Views:
      522
    Last edited: Feb 9, 2018
  11. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    I guess I have now a state that I can publish. I just have to clean up my project and create a more advanced scene. Keep in mind, there are now a lot of road texture variations possible due to the Substance Designer procedural textures. That means you have a lot of attributes for changing the road. The shader was also improved, it cuts now more rounder :) corner.

    The red car and a simple car controller script will be available too.

    The well known car:
    Car.jpg
     

    Attached Files:

    Last edited: Feb 9, 2018
  12. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Just 3 procedural textures are available. For normal road, X and T junction. L junction can be made by a spline tool with the normal road. As you can see on the pictures you can have a lot of variations, but this brings also more complexity at setting up the road.

    This asset is for experienced users only!!!
     
  13. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    On one map three different environment with environment switch script (changes light and fog). This shows that the road can be blended in different environments, that is the main purpose of this asset. Just Unity textures/grasses/trees/particle material are on the map, because of licensing issues. At all, the trees looks good, but the rest can be made much more better. The quality of the environment is not that good for this reason, but you can see somehow the road in different environments. With RTP, volume fog, lot of more props, rocks, point lights, better terrain textures and so on it would look much more better.

    This all comes in the next release:

    Continental.jpg

    Desert.jpg

    Snow.jpg
     
    Last edited: Mar 27, 2017
  14. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    New release is under way, in Unity approval state.

     
  15. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
  16. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    The following screenshot is from my RTS. I just uses the Unity plain meshes with a spline line editor. You see shadows on the road and that the road color is not hostile to the terrain.

    bandicam 2017-08-05 14-44-11-535.jpg

    bandicam 2017-08-05 14-59-15-185.jpg
     
    Last edited: Aug 5, 2017
  17. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    New features for the new version (dirt road, water on road):

    - Glossiness mask will be created from the normal map depth in the procedural material for water
    - The shader will have an additional texture input for for glossiness mask
    - Dirt road can be made with lot of variation (can be made already with specific settings)
    - Selecting different patterns for road, dirt, glossiness will be possible
    - The road texture can be mixed from two texture pattern for more details on the road
    - Control textures (normal map ramps) can be used over the road to offset the glossiness mask (the depth).
    - Reflection probes have impact on the shader
    - Ice will be also possible on the road.
    - Water won't be animated on the road

    You will have some control over the glossiness map, but the water will be visible in depth areas of the road, so the by wheels worn part of the road will be deeper.
     

    Attached Files:

    Last edited: Feb 9, 2018
  18. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Wetness strength will be fully controlled by glossiness strength:

    bandicam 2018-01-20 01-32-38-538.jpg bandicam 2018-01-20 01-33-22-935.jpg bandicam 2018-01-20 01-33-08-820.jpg
     
  19. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    New wetness based normal map can be added to the wetness based shader in the upcoming release. The shader will blend now between the standard normal map and wetness normal map. The wetness based normal map will be also procedural generated by the procedural material, but you have the freedom to create your own wetness normal map, if you want.

    If the wetness glossiness intensity is 0, then you will not see the glare wet spots on the road.

    bandicam 2018-01-23 14-27-14-797.jpg
     
  20. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    For the next version, wet side for the road can be made:

    RoadWithWetSide.jpg
     
  21. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Dirt road can be generated with the procedural material. The dirt road blending can be made also by a fading road end segment, that means dirt would be on the road. However, in this example the dirt road mesh is a bit under the road.

    DirtRoad.jpg
     
  22. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Snow way with glossiness, made with the upcoming version:

    SnowWayWithGlossiness.jpg
     
  23. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    The next version has been uploaded. This is the intro for the Improved Road Material 3, unfortunately youtube couldn't process correctly the video. I'm sorry for that...

     
  24. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    The dry road normal will now be more present. The shader has clamped away the normal intensity. For the straight road the procedural texture generator had a different (worser) approach to calculate the normal. Both issues will be fixed in the next version.

    Dry road will have now more detailed road pattern:

    DryRoadFixedNormal.jpg
     
    Last edited: Feb 9, 2018
  25. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Sometimes I suprise myself, looks like wet sand on the road:

    bandicam 2018-02-09 15-05-36-913.jpg

    Snow/Ice road will also improved by the upcoming normal map changes:

    bandicam 2018-02-09 15-07-16-380.jpg
     
  26. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    The shader will be updated again. Normal maps will be blended better. Color intensity will be the color alpha value. Side blending will be improved too, which allows you to blend to the ground.

    Strong normal pattern for top-down game. Needed to make details visible from top-down distance. For an FP-View I would recommend weaker road pattern, but it depends on your game.

    bandicam 2018-02-12 14-41-42-809.jpg

    bandicam 2018-02-12 14-41-06-874.jpg
     
  27. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    New Version is in unity approval state. More detailed normal map and better side blending. Better wetness and road pattern blending:

    WetRoad.jpg
     
  28. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    The new version has been released.
     
    blitzvb likes this.
  29. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    271
    Hello I'm interested in this assets how it is working with different than standard terrain shaders like Color map ultra shader? and what when there is finish of road, Is there smooth fade too?
     
  30. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    569
    Hi, it is independet of the terrain shader. This asset provides a configurable procedural texture and some shader to use the generated textures. The shader and the procedural material is editable. The shader can be changed with shader forge (it is now a free asset) and for the procedural material the Substance Designer is needed. However, editing the shader and the procedural material is not the aim in this asset, but it is possible.
    In the demo scene and images the road is on the unity plane (10x10 mesh) and I used a spline editor with mesh deformation feature and drop mesh to terrain feature to place the long roads. Basic junction procedural textures are also of this asset.
    Microsplat has a terrain blending feature, which can blend the road with the terrain texture. If you don't use terrain blending features the only one way to blend the road with the terrain is to use a kind of noise (2 different noise types are available, provided by the shaders) on the side of the road and give this noise a color in a way, that it looks like the road is blended in the terrain.
     
  31. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    271
    Thank you for info!