Roads

RGcincyRGcincy Posts: 2,805
edited July 2020 in Art Studio

Back in 2007 I wrote a program to automatically generate roads for Bryce. It was OK but oftentimes suffered from stair stepping in the terrain since it used a height map approach and the road textures were pixelated. Then in 2015 and again in 2018 I picked it up and worked on it for a few months each time, converting to a 3D mesh and solving various mathematical problems until I would hit a roadblock and move on to other projects (you can see what I did those two occassions in my thread Bryce Roads). After another long pause, I picked it up again last month and have made substantial progress. Besides correcting a bunch of code and rounding errors that led to kinks in the road and UV mismatches, I further improved the match of the two terrains (one is for the road and its cut and fill, the other is the base terrain), split the polygons of the cut and fill edges to eliminate stair stepping, halved the slope of the first row of cut and fill to soften the transition, added random edges to the curb and shoulder, added random variation to the cut and fill, and added cross sections to the road, curb, and shoulder so you can have a domed road, a gutter, and other variations. I also added code to automatically generate additional maps to use for materials and with scattering scripts.

Here’s several renders made with Daz Studio to show the current output. I have lots more to work on but I'm pleased with the recent progress.

road_2020-06-19.png
752 x 619 - 1021K
road_14-006.png
1200 x 675 - 2M
road_14-007.png
1200 x 675 - 2M
Post edited by RGcincy on

Comments

  • GordigGordig Posts: 9,024

    It could definitely use a new texture, but it looks pretty good. I'd buy this as a product for DS.

  • RGcincyRGcincy Posts: 2,805

    Yes, textures are one area I'll be working on at some point. I'm basically just grabbing what I find in my runtime for now.

  • WendyLuvsCatzWendyLuvsCatz Posts: 37,711
    edited July 2020

    now that DCG ground control is OpenSource maybe you could work with that and your software as it has a DAZ studio plugin but needs certain types of files such as dem

    http://www.digitalcarversguild.com/os.php

    https://github.com/scottbragg/GroundControl

     

     

    Post edited by WendyLuvsCatz on
  • akmerlowakmerlow Posts: 1,124

    Looks interesting!

  • AscaniaAscania Posts: 1,838

    Oh, I remember that. Great idea back then but so frustrating to try to get anything out of it.

  • nonesuch00nonesuch00 Posts: 17,890

    Looks good to me too. Maybe Will Timmin's methods used to make his WTP3 (Willi Timmons Provedural Shaders 3) could educate you on how to do similar for your roads? 

    https://sharecg.com/v/87095/view/7/Material-and-Shader/WTP3-Will-Timmins-Procedural-Shaders-for-Iray

  • gitika1gitika1 Posts: 948

    yes

  • HansmarHansmar Posts: 2,750

    Looks great. The terrain is still Bryce? So it will work in Bryce, once it is ready to be shared?

  • lilweeplilweep Posts: 2,217
    edited July 2020

    topology looks really blocky.  Think it needs smoother transitions in your height map or more geometry?

    edit: oh i re-read op and youre not using a height map.

    Post edited by lilweep on
  • RGcincyRGcincy Posts: 2,805

    Looks good to me too. Maybe Will Timmin's methods used to make his WTP3 (Willi Timmons Provedural Shaders 3) could educate you on how to do similar for your roads? 

    https://sharecg.com/v/87095/view/7/Material-and-Shader/WTP3-Will-Timmins-Procedural-Shaders-for-Iray

    I was looking for something like that (layering). I have a number of Will's shaders but haven't really explored them much yet.

  • RGcincyRGcincy Posts: 2,805
    lilweep said:

    topology looks really blocky.  Think it needs smoother transitions in your height map or more geometry?

    edit: oh i re-read op and youre not using a height map.

    It starts with a height map though and gets converted to a mesh, so a lot depends upon the resolution of the map and the type of generator used. 

  • RGcincyRGcincy Posts: 2,805
    Hansmar said:

    Looks great. The terrain is still Bryce? So it will work in Bryce, once it is ready to be shared?

    The terrain is an .obj file, so yes, it still works in Bryce but as an imported mesh instead of a terrain.

  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    Was finally able to create a distance map using AoA distance camera, and combined with the new texture masking ability in Ultrascenery, able to get better vegetation around the road. Here's a few views:

    Still have to work on the road texure.

    road in harpwood 2 _two roads.png
    1200 x 750 - 2M
    Post edited by RGcincy on
  • RGcincyRGcincy Posts: 2,805
    edited July 2020

    A different base terrain and road. Made a higher resolution height map and used that in Ultrascenery to get a pretty good matchup.

    road_07-09-2020 ultrascene.png
    1200 x 750 - 2M
    Post edited by RGcincy on
  • duckbombduckbomb Posts: 585

    I can't wait for the Digital Art Live demonstration where you walk us through this!  LOL Day one purchase for me!

  • RGcincyRGcincy Posts: 2,805

    Thanks, we'll see how fast I am. This project has always had its fits and starts although I think I'm on a good track right now.

  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    A different view of the same road using Ultrascenery vegetation. Much easier and quicker to use Ultrascenery then scattering individual props as you get a complete ecology.

     

    road_07-09-2020 ultrascene 2.png
    1200 x 750 - 2M
    Post edited by RGcincy on
  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    More examples of combining roads I've created with UltraScenery vegetation. 

    Post edited by RGcincy on
  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    Attached is a zip file with a free paved road that can be used with UltraScenery, UltraScatterPro or other scattering scripts. The .duf file contains a scene with a pre-sized road terrain that comes in two parts (one part used one part optional for UltraScenery, both used for your own scattering).You haver to create your own UltraScene using the height map, vegetation masks, and directions included. You also have to add your own shaders to the cut, fill, curb and shoulder. Several images for the roadbed shader are supplied. Since this is the first time I've tried to explain how to use this, let me know if anything doesn't work or is unclear and I'll update the directions. (The zip is the same as the one I posted in the UltraScenery commercial discussion except I've added instruction for UltraScatterPro to this version}. 

    Road using Pines 1 ecology:

    zip
    zip
    Shape Magic_FreebieRoad_1_rev1.zip
    989K
    SM_FreebieRoad_1_pines.png
    1024 x 1024 - 2M
    Post edited by RGcincy on
  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    Testing out adding a bridge to a terrain created using UltraScenery. This required a fair amount of post work on the road terrain to hide some fill polygons - I need to update my generation code to restore multiple road capability which should make this easier.

     

    SM_FreebieRoad_2_road bridge Oaks.jpg
    800 x 800 - 722K
    Post edited by RGcincy on
  • RGcincyRGcincy Posts: 2,805
    edited August 2020

    Added a different type of bridge today. By testing various situations, I can identify features I need/may want to add to my road generator. In this case, I want to add code to make bridge abutments and eliminate the fill (for this image, I had to manually hide it). With the previous bridge, it shows I need to add code so the bridge area is level as bridges do not dip like what was shown. 

    bridge crossing.png
    1000 x 800 - 2M
    Post edited by RGcincy on
  • WendyLuvsCatzWendyLuvsCatz Posts: 37,711
    edited August 2020

    Thanks for the terrain and road yes

    Obligatory DAZ studio render using Ultrascatter pro on it

    I had a few issues but unsure if user error

    RGC terrain and road.jpg
    1920 x 1080 - 2M
    Post edited by WendyLuvsCatz on
  • RGcincyRGcincy Posts: 2,805

    @WendyLuvsCatz

    Thanks for giving it a test drive! I'm glad you were able to create a scene with it. You did a good job using UltraScatter, I especially like the red flowered bushes. For the stray rocks, you can break instances to move them as needed.

    (Sorry for my delayed response, I didn't get a notification of your post and only looked at this thread today.)

  • WendyLuvsCatzWendyLuvsCatz Posts: 37,711
    RGcincy said:

    @WendyLuvsCatz

    Thanks for giving it a test drive! I'm glad you were able to create a scene with it. You did a good job using UltraScatter, I especially like the red flowered bushes. For the stray rocks, you can break instances to move them as needed.

    (Sorry for my delayed response, I didn't get a notification of your post and only looked at this thread today.)

    the issue I spoke of was the scale and position of the terrain and Ultrascatter moving the result to the original position

    I copied the first translation after I fixed it and pasted it on subsequent ones

    in hindsight moving the road would have been easier

  • RGcincyRGcincy Posts: 2,805

    When I run UltraScenery, you can see that the UltraScene is being created offset from the terrain but then it moves into the right position after it's been built.  UltraScatter must not be doing that move. The problem may be the origin on the road terrain is a corner rather than the center. When I next build a scene, I'll try to remember to move the origin and see if that fixes that issue.

  • WendyLuvsCatzWendyLuvsCatz Posts: 37,711
    RGcincy said:

    When I run UltraScenery, you can see that the UltraScene is being created offset from the terrain but then it moves into the right position after it's been built.  UltraScatter must not be doing that move. The problem may be the origin on the road terrain is a corner rather than the center. When I next build a scene, I'll try to remember to move the origin and see if that fixes that issue.

    yes

    yes I gathered since it was meant for UltraScenery it would work fine there

    nice as US looks, I follow the thread because the render do look so nice, it doesn't suit my needs for animation ffrom what I gather 

    I have Carrara and other software for that but I have done animated scenes with Ultrascatter too

  • Very interesting project.  I am in the process of learning UltraScenery right now as I post this.  But I'd like to ask, in what folder in my DAZ 3D Library would I put all the files in the freebie road zip folder?

  • RGcincyRGcincy Posts: 2,805

    EightiesIsEnough said:

    Very interesting project.  I am in the process of learning UltraScenery right now as I post this.  But I'd like to ask, in what folder in my DAZ 3D Library would I put all the files in the freebie road zip folder?

    As it is a scene file I would put the duf file and terrain/mask maps in the folder where you keep other scenes. In my case, that is Documents/Daz3D/Studio/My Library/Scenes but you can put them anywhere. The .duf file when loaded will likely not find the road marking image files and will ask you to locate them, so you can put them anywhere you want although putting it in the Scene folder or in your texture folder would be best. Hope that helps.

Sign In or Register to comment.