Search Unity

Assets [Released][Thread Moved] Free road creator

Discussion in 'Works In Progress' started by MCrafterzz, Jun 13, 2018.

  1. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    It says that it does allow for commercial use so what do you meen. I changed to Mit, should be good as ra has it. Just don't won't people to simply sell the tool.
     
  2. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    It's because it uses the lwrp to be able to use the shadergraph. I don't know if the high render one works but it's possible. Download the lwrp from the package manager and the find convert materials to lwrp materials. It's somewhere in the assets menu at the top. Scroll down a bit and this will explain it: https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html
    I didn't want to have to choose one of those but I had as the old pipeline will be deprecated and removed. I may be able to do a hwrp version of the road shader which is the only thing that doesn't work in hdrp.
     
    Last edited: Nov 1, 2018
  3. embeddedt

    embeddedt

    Joined:
    Mar 10, 2018
    Posts:
    22
    Thanks, I was able to get it working. After struggling for several hours to get a simple intersection to work properly, I think I've pretty much given up on RoadArchitect's code at this point. I think our efforts should be focused on bringing the road props and materials to RoadCreator. Then I (might) be able to make some nice screenshots.

    Is there a way to scale up the whole road system? At the moment it's producing pretty small roads and my Standard Assets car can't drive on them that well.
     
  4. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Haven't tried it. The normal way would to be changing the width/height of roads and intersections. You could scale the road system with the transform components but that may create some miscalculations,you'll have to try!

    I'm currently working on the new intersection system (just started) so if you can transfer some assets that would be great! I think there should be two folders, low resolution with the current ones and high resolution with the new ones
     
    Last edited: Nov 2, 2018
  5. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Big progress with the new procedural intersections:

    A lot is left to do but it's defently a good start and I therefore wanted to share it with you. You can test it by downloading the proceduralintersections brach from github: https://github.com/MCrafterzz/roadcreator/tree/proceduralintersections but it's not recommended to use it for your projects yet.

    Rounded edges will come which will inprove the visuals of it drasticly.
     
  6. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    After not working on this for about a month I started inproving the procedural intersections. Bugs have been fixed but plenty still exist! I will continue work on it during my winter break and of course also sharing progress.
     
    embeddedt, Justice0Juic3 and Mark_01 like this.
  7. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    174
    No worries, this is just about the busiest months at the end of the year. :p I'm already liking it so far
     
    MCrafterzz likes this.
  8. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Thanks for your kind words! Please consider filling in some issues on github :D
     
  9. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Things start to look quite good now. Creating intersections, adding roads, changing positions of roads and removing roads all update the intersection correctly. I would say that it's possible to start using these new intersections now. One thing to keep in mind tho, intersections with only start or end points work. Mixing start and end points in the same intersection still has some way to go. Some pictures:

     
    sharkapps and manpower13 like this.
  10. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    The issue with intersection containing both start and end points is now fixed. Another picture for you:
     
  11. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    174
    Sorry I'm filling socks with candy and stuff lol
     
  12. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    @Justice0Juic3 A last chrismas suprise from me. You can now curve the intersection connections to get even smoother intersections. It's easiest to explain with a picture:


    Worth noting is that it's customized per intersection so you can get a good result with t-intersections and other unsymmetrical ones.
     
    Last edited: Dec 23, 2018
  13. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    118
    @MCrafterzz It is really great to see the progress on procedural intersections. The curved connections are a key feature. I am excited about playing with this while I'm on break this week!
     
    MCrafterzz likes this.
  14. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Now I'm back working on this. Features that were added today:
    - Added line presets to easly use the road tool to create road lines. This allows you to do stuff like this:

    - Added an option for roads to not generate intersections, use this when creating lines
    - Added an option for prefab lines to have a different start/end prefab which is useful when placing for example guardrails
    - Added option to overlay a material for roads/intersections. This doesn't work perfectly atm and will be worked more on in the future
     
    sharkapps and carking1996 like this.
  15. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    One of the last features before release is here. Automatic bridge generation!:

    With loads of customizability. Every part of the bridge mesh can be customized, height, width etc. Multiple pillar prefabs are included. Scale, gap etc can all be customized. This feature excists both for roads and intersections.

    EDIT: Pillar placement for intersections is now correct
     
    Last edited: Dec 31, 2018
    DrOcto, embeddedt, sharkapps and 3 others like this.
  16. embeddedt

    embeddedt

    Joined:
    Mar 10, 2018
    Posts:
    22
    @MCrafterzz Having the requirement of resetting curve points when you add or remove a road doesn't seem like a big deal to me
     
    MCrafterzz likes this.
  17. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    @embeddedt New system is now in place.
    Also added bridge railings. Place them with a prefab line.
     
    sharkapps and DrOcto like this.
  18. embeddedt

    embeddedt

    Joined:
    Mar 10, 2018
    Posts:
    22
    It looks more and more like RoadArchitect with every new feature!
     
    DrOcto and MCrafterzz like this.
  19. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,562
    Looks great
     
    MCrafterzz likes this.
  20. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    21
    This is looking really nice - I would like to see more screenshots of the tool in action showing how you work with the guidelines, or create a sidewalk that isn't quite following the side of the road, as I can't quite picture it from your description.

    Don
    have a great day
     
  21. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Last days fixes/changes:
    - Added dotted white line preset
    - Fixed intersection line width not being consistent:


    - Added option to intersection to either stretch or repeat texture
    - Added Y Rotation Randomization for prefab lines that replaces RandomY. This let's you control how many degrees the prefab maximumly will rotate
    - Fixed intersection curve points sometimes being under the intersection
    - Fixed asymetrical 3 lane road transition being stretched
    - Fixed roads not handeling transparency correctly
    - Fixed a few crashes

    @IsDon Made a short video shorting road placement etc:
    As you can see there are still some issues that have to be fixed(fixed now) but it shows it off pretty good. The amount of road guidelines can be configured. Snap to them by holding control. Also they are an estemation so they will never be perfect but still speed up creation time
     
    Last edited: Jan 18, 2019
    sharkapps likes this.
  22. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    118
    Hi @MCrafterzz, a lot of good things fixed! I really like that non-uniform looking intersection and glad to see you are giving some attention to the lines.

    One thing I found awkward when using it last time was laying down the road. It seems less intuitive to have your second node placement be the curve midpoint as opposed to the next node. I think making the node placement more like a standard spline editor would be more intuitive, but keeping the idea of being able to modify the curve by using some kind of gizmos like you already have or like the ones in the linked video.

    Hoping I will get some time this weekend to play with it again. Keep up the great work!
     
    carking1996 likes this.
  23. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    By clicking on the road in the top row in the object creation gui you can toggle placing a straight or curved road. This way you can avoid placing the center point and move it afterwards.

    It's funny that you link that video as that was the inspiration too this whole project. The reason why I use the current system is that it much quicker to modify one point instead of two and I also think it's easier to get a good result that way. Changing the system will force me to rewrite enormous parts of the code.

    RoadArchitect doesn't let you modify control points at all which gives less customizability which is the focus of this tool. Customizability > automatically.

    Test placing straight roads and then modifying them. I think that could work better for you.

    EDIT: forgot to say that I'm thankful for criticism!
    EDIT 2: The current system is very inspired by city skylines (game). I've always liked it's workflow as it let's you quickly and easly create a curve that you control and not some algorithm.
     
    Last edited: Jan 19, 2019
  24. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Really need some testing before a release!
     
  25. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,476
    I'm testing now, looks cool though! Thanks for sharing your work. I'll let you know if I find any problems or have any suggestions.
     
  26. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,476
    First thing I got after downloading as a ZIP and opening the project:


    Is there a different texture that was used? Not really a deal breaker - but probably wanna avoid any lost references to textures and shaders and whatnot:


    Changing the shader to another one worked and it appears green now.

    EDIT: Same seems to happen for the roads shaders:


    EDIT2: I hit "reset road" on a couple roads, then it gave me an error:

    MissingReferenceException: The object of type 'Point' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    RoadCreator.UpdateEndConnectionData (.Intersection endIntersection) (at Assets/Resources/Scripts/Road/RoadCreator.cs:431)
    RoadCreator.CreateMesh (Boolean fromIntersection) (at Assets/Resources/Scripts/Road/RoadCreator.cs:145)
    RoadEditor.OnSceneGUI () (at Assets/Resources/Scripts/Road/RoadEditor.cs:113)

    EDIT3: I see you mentioned I should have the LWRP Package - probably should make that really apparent for people who don't read like me :p
     
    Last edited: Jan 23, 2019
  27. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Thanks for testing! I added some text about the LWRP package to the original post so hopefully people should see it now! As for the error I've tried to reproduce it without luck, can you give a bit more detailed instructions about how to get it?
     
  28. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,476
    It may have just been from not having LWRP installed - or something else, I'm not sure. I had just selected the default scene, and on a few road sections I hit "Reset Road" on the road creator script component, in the inspector (you can see the button I had been hitting in the screenshot). Then that error showed. Perhaps it would work fine if I had LWRP, but I never got around to getting it :X
     
  29. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    A small change, it's now possible to change colours in the global settings object:
     
    sharkapps and amcagurban like this.
  30. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    214
    Another quite inportant update:
    - Fixed the texture not connecting smoothly between road segments. Before the texture started at zero for every segment but now it's offseted to look like one smooth connected road. The problem can be seen to the left on the above picture (where the line is cut of).
    - I also added high resolution road and intersection texture (only a few for now):

    The cutoff line is because of the intersection starting there so nothing I can do about it.
    Do you like the higher resolution textures? The low poly texture are unchanged and are still default.

    The plan is to release this tool sometime during this month, the only thing left that's planned is to add some high resolution road objects and signs but that may come after 1.0.