Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

Discussion in 'Tools In Progress' started by raoul, Feb 19, 2014.

  1. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Ok, there it is:

    http://www.thecolonizers.com/Web/roadingtest/roadingtest.html

    Next thing to get work: NormalMaps. Nasa have work to do :)

    Raoul. Add "resolution" also for runtime api. You can find a little problem
    with this demo. When distance between first and second point is smaller
    than resolution, the road is "rejected" and it isn't visible. It is a little complicate
    problem, since those points are made by path finder and it's grid is a
    little smaller than default road resolution (seems to be 2).
     
  2. woyehua

    woyehua

    Joined:
    Jun 10, 2013
    Posts:
    7
    I use realworldterrain create terrain, from 10 * 10 parts, only this one terrain in the scene, when I have created maker, will have the first shot in the middle part of the period error occurs, the road is normal, but around the white surfaces will collapse in the terrain, when I click build terrain, third screenshots of error occurs
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, glad you got that working. So I assume the actual road game object you want to get the middle positions from is known? Would something like the below make things easier?

    ERRoadNetwork.GetRoad(GameObject object) : ERRoad;

    Enjoy your holiday!

    Raoul
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Look great! In my case some additional Is there additional Help Info available (couldn't find that), it took a while before I figured out W starts the road, and can you force a marker position?

    I will add the option to change the road resolution to the API.

    Thanks,
    Raoul
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi woyehua,

    Yes, it seems the white surfaces are not snapping to your terrain. But there are no known issues regarding that, both to scenes with a single terrain object or when using multiple terrain objects. So I need more info, that is why I was asking about your workflow, the exact steps you take inside Unity to create the road network. Also because the first screenshot you posted does not include the terrain visible in the other screenshots. Or did you hide the terrain only to make it clear that the white surface do not snap to the terrain?

    I see 3 Real World Terrain objects in the hierarchy and also a Terrain Composer object. Only one is enabled in the screenshots but are the other objects used during the road creation? I also see a disabled Road Network Object?

    What happens when when you move a marker in Edit Mode with the final terrain object enabled (second screenshot on the previous page)? Do the white surfaces snap to the terrain after the road updated? If not, can you create a new scene, drag this terrain object from its location in the assets folder in the scene, start a new road network and add markers. Do the white surfaces now snap to the terrain?

    Or would it be possible to have a look at this project so I can see myself what is wrong? Could you email me a download link in that case?

    Thanks,
    Raoul
     
  6. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Oh. I had an "star wars" text earlier for help purposes. I forgot to add that prefab to scene :)
    I will add for clarifying. Took 20 min.

    Adding markers to road. Just click mouse, while dragging.

    Double clicking the side road opens a delete menu.

    (It is not complete scene. ie, when deleting a house, the road remains. And when loading a saved
    game, the structured data will corrupt due so many new variables on structures -> no road delete ->
    roads are orphans (normally they are glued to house data) -> reroading activated on restored houses)

    I hate to do these test versions, but have to. No one is not going to download almost 300mb file
    every time for test something... ---> test projects data structures aren't always full clones from
    full game project data structures --> took too much time to add/copypaste even a minimum set
    of new variables & function calls to test projects.

    EDIT: Ooops. Current full game size seems to be over 550mb :)
     
    Last edited: Jul 5, 2015
  7. woyehua

    woyehua

    Joined:
    Jun 10, 2013
    Posts:
    7
    I have put my project file send an email to you, you check the mail
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, click does add a marker, before I only managed to connect directly to the main road. Nice!

    Raoul
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you woyehua, I will look at it.

    Raoul
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi woyehua,

    I had a look at your project. There are about 100 terrain objects in your scene and there was indeed an issue related to this. Thank you very much for reporting it!

    I changed some things and tested it on your scene, all terrains are now flattened correctly according the road shape. Let me know if you want to try this out, I can send you an alpha build.

    Also, the terrains have a reasonably high resolution resulting in a low heightmapscale (size vs heightmap resolution), about 1.5, You may want to lower the minimum Indent and surrounding values in General Settings > Scene Settings. Just enter 1 or so, it will clamp to 2.4, the minimum Indent value based on your terrains heightmapscale. After that, select a road marker and set the Indent and Surrounding values to the lowest value. You can use the "Copy Indent/surrounding values to all markers" to quickly update all markers. Terrain deformation will be limited to the crucial road area only.

    Thanks,
    Raoul
     
  11. woyehua

    woyehua

    Joined:
    Jun 10, 2013
    Posts:
    7
    Hearing the news, I very happy, please send an alpha version to me, thank you
     
  12. Atzig

    Atzig

    Joined:
    Jul 17, 2014
    Posts:
    157
    I'd like to try out the beta, also, how do I add side objects like fences/hedges?

    EDIT: I found it, but it doesn't come with any of the side objects/bridges advertised on the asset store?
     
    Last edited: Jul 7, 2015
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Atzig,

    Can you email us or contact me by sending a PM (Start Conversation) including your email? I will send you the v3 beta and further v2 info.

    Side objects in v2 is a framework that can be used with your own assets. A side objects example package is available. The V3 beta includes various example side objects part of the package. More will follow and just like in v2 you can create your own side object assets and use them within the system.

    Thanks,
    Raoul
     
  14. SaliferousStudios

    SaliferousStudios

    Joined:
    Jul 7, 2015
    Posts:
    17
    That looks awesome. I love the flexibility of this tool.
     
  15. Assets-Reporter

    Assets-Reporter

    Joined:
    Jul 4, 2015
    Posts:
    79
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you, glad you like it!

    Raoul
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you very much for reviewing the tool!

    Just a note, it looks like you have been reviewing v2, I thought I mention it because this is the v3 WIP thread. Perhaps you could explicitly mention that in the review too? And please let me know if you want to include a "preview" review of v3, I will send you the current beta. It is a totally different road tool with many more features.

    The v2 user interface is indeed not ideal, certainly after Unity didn't allow asset store tools anymore to have their menus display in the top menu bar. This has been taken care of in v3, everything is accessible directly in the Inspector after creating the main road network object from the main menu.

    Thanks,
    Raoul
     
  18. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Hi Raoul,

    Is it possible to use meshes with different LOD groups as side objects.

    For instance I have a very high-poly fence. I want to use three different LOD meshes. Each mesh is two meters long. The last LOD mesh is simply one polygon with a fade material.

    When I open the mesh editor I only see an input for one mesh.
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi StaffanEk,

    It depends on the fence type. When using the "Mesh Object" type of side object (bootcamp fence example) you could use LODGroups on the source prefab.

    But since you mention the mesh editor, I assume you use the "Procedural Mesh Object" side object? This will currently generate a single mesh so you cannot really add different LOD levels as source meshes. What you can do is prepare the side object, afterwards duplicate it and use the other LOD levels as the source meshes, export the generated side objects, in a modelling app cut them in different LOD groups and reimport back in Unity. Things like this are on the list but since there are workarounds to achieve this, other new features and getting v3 out has more priority at this moment.

    Thanks,
    Raoul
     
  20. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Thank you very much.

    That workflow sounds reasonable for my needs.
     
  21. Assets-Reporter

    Assets-Reporter

    Joined:
    Jul 4, 2015
    Posts:
    79
    Yes that's true. We have the beta as we purchased the package for our review and we asked for it to you (another persona). You provided us a perfect support at this time.
    We edit the post to add a mention and we will do a new review for the v3. Maybe you plan a launch date for the final release, we could be in sync for the benefit of everyone.
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    After duplicating the side object and assigning the other source mesh, just make sure to open the Mesh Editor window, update possible start/end offsets and click Apply to update the mesh data for the new side object.

    Let me now if you have further questions regarding this!

    Thanks,
    Raoul
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you!

    I will send you a message once publicly released.

    Thanks,
    Raoul
     
  24. yilianxin

    yilianxin

    Joined:
    Jan 22, 2015
    Posts:
    8
    Hi,i like this tool,it's amazing,may I get a beta version of it?I appreciate that.by the way,I didn't buy it.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi yilianxin,

    Thank you for the compliments!

    The free version of v3 is not yet available. The v3 betas are part of the v2 Pro deal. With a current EasyRoads3D Pro license you have access to the v3 betas and also the final public release, no need to upgrade.

    Thanks,
    Raoul
     
  26. Wizardius

    Wizardius

    Joined:
    Feb 25, 2013
    Posts:
    1
    Hi!

    I'm using the previous version of EasyRoads 2.5.4 for more than a year and it always worked great for me. I would like to know if there is a feature in the latest version that will allow me to bake the road into the terrain? So that I could remove the geometry for the road and add final touches like skid marks, scratches, potholes and such with terrain tools to make the road surface not so regular and not patterned. Or how I'm supposed to do this?

    Thank you!
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Wizardius,

    It is not really possible to bake the road, as it is, in the terrain. the unity terrain object can't be used for that. You can add the road shape to the terrain splatmap and select terrain texture you want to use for that. That is possible in both v2 and v3. Skidmarks etc. could be done using decals as side objects randomly placed? Creating real potholes (geometry) is tricky because of the grid based nature of the unity terrain object, there is no way to deform the terrain accordingly. The only way to do this is by raising the road further above the terrain so the potholes are actually above the terrain.

    For v3 also a couple of additional options will be implemented regarding variation in the road texturing.

    Thanks,
    Raoul
     
  28. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154

    I'm sure I've seen an option to export the road mesh in V3. maybe @Wizardius could use this and open the mesh in Blender?
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, you can indeed export the road network after "Build Terrain" and add some potholes but the terrain will very likely be visible through the holes unless you raise the road far enough upwards. Another way is for example use the road also as a mask to hide the terrain covered by the road in which case physics will also need to be taken into account. Alltogether it is doable but tricky.

    Thanks,
    Raoul
     
  30. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Sorry, I havn't check or read through this thread, so I apologize if this has been answered before:
    So what's the time frame for official V3's release?
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi I am da bawss,

    There is no exact time frame for the official release. At the moment small bits and pieces are being fixed/improved and two new features are implemented. When that is done it will be released as part of the asset store package. Once feedback is all positive it will officially be released, replacing the current asset store version. Meanwhile the v3 betas are available, simply contact us through our website or you can send a PM (start conversation here on the forums) if you want to try it out.

    Thanks,
    Raoul
     
  32. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    At last I'm in the position, where I have time to continue with this :)

    JOKpathing.png


    Raoul. I need a connection. Not "T", not "X", not "O". Just "-". OR! I have to get info from road, that
    it is closed loop, and that loop is ready. I'm so noop with Er3 connection editor, so... :rolleyes:
     
  33. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Ok folks. I made an example, how the JOKPathFinder works with Easyroads.

    http://www.thecolonizers.com/Web/pathing_1/pathing_1.html

    - RoadToWaypoins scripts includes only an one required function, when building roads at runtime. UpdateRoadsToWaypoints().

    - When working on editor, and when the road network is ready. Just click "Create From Scene"
    button, and thats all. All crossings etc. are included automatically.

    BridgeJOKPath script uses the waypoint matrice created by RoadToWaypoints.

    BridgeJOKPath uses Dijkstra algorithm for finding shortest path.

    You can extract any road (or lane on road) as waypoint path.

    I have to create custom inspectors for those scripts and after that I send them to Unity store.
    Unfortunately, I'm busy with my game code now, so this will take a time. From week to one month...
    Under year ;-) anyway.
     
    Last edited: Jul 15, 2015
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Jari,

    Is this for a simple road only, two vertices (left and right side) and a fixed width? In that case all you need is a plane with two triangles and, indeed, create a custom prefab out of it. That shouldn't cause any issues. Check the 3rd video on the first page (about customizing road networks) of this thread. With what you have shown so far, you have done far more complicated things :)

    Just let me now if you need help with it or if you need something more complex.

    Thanks,
    Raoul
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    That looks very useful, great work!

    Raoul
     
  36. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Good work! I can wait but that is great. For some reason or other (probably availability of f code) I used the djisktra sort in my uni dissertation a long time ago. It worked!
     
  37. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Jep. Dijkstra is a good anough for point to point pathing. I did try A* aswell, but I didn't
    find any performance differences with road path usage. Have to remember, that I'm
    not using evenly spaced 2D array. I'm using dynamic array and that why djikstra won't
    eat memory too much and the speed is incredible for this use. In fact, Dijkstra <-> A*
    have only an one verifying routine as an code difference.

    Anyway. The code is now ready, tested, all null/index errors are handled properly. No
    any annoying red error warnings. Only thing what to do: Custom inspectors. I haven't
    done even first of them. Have to study. With my game related inspectors I'm using
    UI overriding when I want to get different kind of Inspector. Spaces, colors, buttons etc.
    So easy and fast to do. (As you can see from those pictures, what I send here time to time.)

    But I didn't forget you, since you got me to do a new road+path system for my game too.
    Now I can get rid off grid based waypathing when NPC carriers uses a roads :cool:.

    You will get your copy before it is on asset store.

    Next demo test version of roading (on my game) uses this system. BUT it doesn't
    show easyroad mesh as road. It uses only easyroad meshcolliders for raycast hit
    purposes for selecting road by mouse on game. The road itself is "baked to terrain"
    via my new ultrafast baking system. It is terrain splatmap on the one side, but from
    the other side it is not ;). Shaders + mask. That is the trick. No blended roads
    with other terrain textures (oh, only in very near on road / free terrain edge with
    bumbiness), incredible fast. No road meshes (textured) -> less GPU. etc...
     
    Last edited: Jul 15, 2015
  38. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Oh. Just forget to tell about performance.

    This pathfinder demo updates the WHOLE path on every FixedUpdate() loop.
    It uses (Web blugin on firefox) on my computer 12.2% processor time
    (quite slow machine!). It will be almost 0%, if calling only, when a new
    path is required.
     
    Last edited: Jul 15, 2015
  39. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Ok. Demo version 2 of JokPathfinder with ultrasplat roads :)

    ScreenCapture_110.5859.png

    With those splat roads I used hexacon shape brush for roading. I didn't remember fade brush's edges, so
    the road is not faded by sides with terrain. Blah. Demo only....

    http://www.thecolonizers.com/Web/pathing_2/pathing_2.html

    Will be available on server within 30min (upload time with slow 3G) from now on.

    Just try to create as complex/long network as you can. It should work :)
     
    Last edited: Jul 16, 2015
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
  41. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
  42. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Hello,

    I purchased this planning to use it to make a sci fi racing game, I was wondering if you had any good tips for going about using this asset in that fashion? I would like to do something with tracks in the air.

    Is there a way to not have easy roads require a unity terrain? I know it works alongside the terrain but what if I just wanted to build the track itself without a terrain? Should I just turn the terrain off after I build the track?
     
    Last edited: Jul 21, 2015
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello dizzymediainc,

    For sci fi racing tracks I would recommend to look into the custom crossing/connection feature. You can use non conventional road shapes by creating these shapes in a modelling app. You can also use this system to add variation to the track by inserting connectors with different shapes.

    I am not far from finishing an update to this custom crossing system, it will allow more complex shapes also useful for sci fi tracks in the air. The final package will include examples for this type of tracks.

    Yes, at the moment a Unity terrain object is required but you can indeed remove it once you are finished building the track.

    Thanks,
    Raoul
     
    hopeful likes this.
  44. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    Hello everyone. I've been trying to get the procedural mesh feature to work for side objects.
    I got it to work in the previous releases but now I am on my third day of trying and I'm completely dead in the water.

    Anyone else having issues?

    As a test i created a cube 1 x 1 x 1 m in 3ds max.
    I sliced that cube to make the start and end sections.
    When i view ANY those objects in the Edit Geometry in the Object Manager , I don't see any vertices.
    I can select any axis on the Trace On drop down and every single time it say no vertices found along with an explanation that is very hard to understand.
    I tried putting my imported object into an empty game object to adjust rotations as suggested in the instructions and still nothing different.
    I rotated these object all kinds of different ways.
    All my objects are on 0,0,0 before when I imported them.
    The child objects of the empty game objects mentioned above are also at 0,0,0
    This release doesn't seem to have any demo projects to look at either.
    I have an new project with only easy roads imported.
    I have no other side objects at all. This make me wonder if the installation was correct so i created two more projects to make sure.
    I'm using 5.1 deferred rendering and linear color space.
    I have easy roads pro version 2.5.6 (even though the webpage uses 6.6.1 which is confusing because easy roads is on version 3)
    So at this point I must be missing something. Any help would be greatly appreciated.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi kloogens,

    First, to avoid confusion, this is related to EasyRoads3D v2. This thread is the v3 WIP thread. Here is the v2 thread http://forum.unity3d.com/threads/ea...d-rivers-procedural-geometry-for-unity.82331/

    The official version, the asset store version, is v2. For v2 a demo project including side objects is available upon request. It won't be long before the v3 beta will be part of the asset store package download. Until then please contact us for access to the v3 betas.

    Regarding the problem, the procedural mesh side object type in v2 generates geometry according the shape you draw in the Geometry editor window. You can optionally assign matching start / end object models. An additional feature is to load one of these start/end models in the Procedural Geometry Editor window and have the system trace and build the shape for the actual procedural geometry. It will by default trace all vertices at z = 0 using a small (tweakable offset), if no vertices are found it will return the message "no vertices found". In that case you can try a bigger offset or you may indeed want to try tracing on the X or Y axis. To test if another rotation axis is required you can drag your model on the stage, does unity auto rotate the object (rotation values in the Inspector)? In that case you probably indeed want to try the X or Y axis for tracing.

    What does the model look like? Are the vertices that should connect to the procedural shape indeed positioned at z=0?

    Additionaly, all this is simplified in v3. V3 has a new 3rd side object type "Procedural Mesh Object" you can import the model as it is, including optional start/end segments, and split the object accordingly in segments by defining start/end offsets inside a new editor window. The beta includes various examples. Also see this process starting at 2:10 in the below video.



    Thanks,
    Raoul
     
    Last edited: Jul 21, 2015
  46. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
     
  47. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    Thanks for getting back to me so quickly Raoul.

    I think I jacked myself by accidentally importing easy roads from the asset store when I was originally using the beta V3.
    So I think the 2.5 version overwrote and conflicted with V3beta.
    Let me check it out and let you know if I have any problems.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, indeed both v2 and v3 share the same folder /EasyRoads3D in accordance with the asset store setup. Files should not be overwritten though. If that indeed happened and you want v3 imported only then you can remove the full EasyRoads3D folder and reimport the v3 beta.

    In case, you already have scenes with exisiting road networks and you also added your own road types, materials, side objects etc. you probably want to remove specific folders only:

    /EasyRoads3D/scripts/
    /EasyRoads3D/Editor/

    and reimport the v3 beta. I would first open an empty scene to avoid the road network in the opened scene possibly getting corrupted after removing used files.

    Please let me know if you have more questions regarding this.

    Thanks,
    Raoul
     
  49. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    Ok all the weirdness is gone. I am still have trouble with the procedural side object though.


    As a test I created a rectangle with start and end caps. It perfectly symmetrical. The edge loops for the start and end align with the z axis.
    When I open the Mesh Editor Window I see the object on the y axis and its centered at 0,0 in the window.
    I move the start and end points to the appropriate vertices, with a substantial portion remaining as the middle of the object.
    When I click Build Test Meshes the middle portion is blank while the start and end caps are not where I told them to cut but rather cut the entire mesh at the middle. So the start cap is essentially one half of the original mesh and the end cap is the other, again with no middle.

    So here are my question.
    What settings required when importing? I've seen different result depending if I let unity calculate the normals and tangents.
    What orientation does the Mesh Editor Want?
    When I import, the object is rotated -90 on X, because it came from 3ds Max 2013. Which is fine with me because that orients the object correctly.
    These are fbx files, I'll send it if you want.

    Edit: Ok are messing around with the model I removed the vertices that bisected the object and now I see a middle piece. However its still not correct. Something is strange here.
     
    Last edited: Jul 24, 2015
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Kloogens,

    It is hard to comment on this without seeing the mesh itself, how it is extracted in the Mesh Editor window, and seeing the result of "Build Test Meshes".

    What does this look like? when you move the offset handles to nearby vertices it will snap to these vertices. These offset handles should snap to those vertices that connect start/end geometry with the middle geometry. Are these offset handles positioned between vertices in your case?

    Regarding your question, what we always do is indeed check the model after import in Unity. After dragging it in the scene, did Unity auto apply rotation values? You can see that in the Inspector. If so, then we create a new prefab, add the model as a child to the prefab and add the same rotation values as Unity does to the child object. This way It will import exactly as how it is instantiated manually in the scene. This is also what most of the example side object source models look like. Otherwise you can try a different axis for "Trace On", but it looks like the default Y axis works well for you.

    Indeed being able to look at the fbx files and test this on our end would help a lot.

    Thanks,
    Raoul