Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Not exactly. My large game world is composed of lots of additive scenes for streaming purposes. and I can't load them all into the editor at once either. I've put the road network in it's own additive scene also, but which I always load. When the editor is loaded though, the road scene may be loaded before the terrains.

    So I haven't been changing the terrain position, but the terrains may not be loaded when the road network Awake/OnEnable is called. Would this cause the issue?

    Cheers, Joe
     
  2. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello again, I have a very useful seuggetion to @raoul , Please make a small page on your website to Upload/Share and download custom connection prefabs.
     
  3. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Ah of course, I'm using the Easyroads Cutout shader so that shadows work. (am I right in thinking shadows aren't possible with transparent shaders?) So I might just need to add an additional texture to the shader for feathering it out using cutout alpha.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, it could very well be that the issues are related so I will first fix the issue I was having and prepare an update. Can you drop me an email or PM with your email so I can send you this update?

    Thanks,
    Raoul
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi D4N005H,

    Thank you for the suggestion, a new website is being prepared as well. I will see how we can do that.

    Raoul
     
    imDanOush likes this.
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, unfortunately shadows are still not supported on transparent shaders (check the default unity standard shader) but that is what you would need for what you want to achieve. I am constantly looking at developments in that area but it still seems impossible. If anyone got that working, I am all ears :)

    Thanks,
    Raoul
     
  7. PiMuRho

    PiMuRho

    Joined:
    Jul 11, 2012
    Posts:
    17
    @raoul
    As part of the system I'm developing, I have trigger objects that extend along the length of my roads. Would it be possible to implement these as side objects? It would make development massively simpler for me if it is. Also, can you please check your email? I purchased the full version earlier and didn't receive a serial number.
     
  8. raoul

    raoul

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

    That certainly should be possible. What type of trigger objects are these, prefabs or procedurally generated geometry along the road shape?

    Prefabs should work out of the box by creating a Mesh type of side object and assign your prefab as the Source Object. For procedurally generated geometry a Mesh Renderer component will be added so that will require disabling or removing that component from the newly created object. That should probably be done automatically by checking the status of possible attached renderer components to the source object. I will make a note of that.

    Regarding your purchase, that was done this morning through our website is that correct? That should already been taken care of, otherwise please contact us through our website or PM.

    Thanks,
    Raoul
     
    PiMuRho likes this.
  9. PiMuRho

    PiMuRho

    Joined:
    Jul 11, 2012
    Posts:
    17
    They're prefabs, literally just box objects with a script applied. Sounds like it should work nicely.

    The purchase was fine - just my initial mail came through without the serial. The following ones had it in, so it's all good. Thanks for the fast response!
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, that should be fairly simple to setup with the Mesh type of side object, let me know if you have further questions.

    Raoul
     
  11. PiMuRho

    PiMuRho

    Joined:
    Jul 11, 2012
    Posts:
    17
    It worked perfectly. Thanks for your assistance!
     
    raoul likes this.
  12. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,255
    Here are another couple of images of dynamically showing different amounts of water on a road based on the weather in the scene. As the weather changes at runtime the amount of water on the road will also change.

    LB1.3.4_ER3_wetroad4.png

    Here we're using the Landscape Builder weather shader for EasyRoads.

    A question, Raoul, around the shader offset to assist with terrain Z fighting. In this test scene we've disabled the offset (in our shader) and haven't seen any issues (although we have raised the road by 0.05). Under what circumstances would you expect to see z-fighting without the shader Offset? A side effect of enabling the Offset is vehicles sometimes appear to slightly disappear below the road surface - not sure if you've seen this before.

    LB1.3.4_ER3_wetroad1.png

    Assets used:

    EasyRoads3D 3 Pro (Beta 8.1)
    Landscape Builder 1.3.4 (Beta 1e)
     
    Last edited: Sep 29, 2016
    emergki, raoul and 600 like this.
  13. raoul

    raoul

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

    That looks great!

    About z-fighting:

    On reasonably flat roads like in your screenshot the Offset is not really required. Raising the road network to somewhere between 0.02 and 0.05 should work just fine and is hardy noticable unless perhaps when your in game cam positions are very near the ground and the road edges (for 0.05 and upwards).

    Z-fighting / the terrain popping through the road can become more apparant in hilly areas and then specifically in sharp bends with significant height differences.

    Indeed a side effect of the offset can be that objects on the road are affected by it as well. This also depends on the cam angles so you probably want to check this with your in game cam rather then the scene view cam. You can tweak the offsets more towards 0 to reduce this affect. Another workaround is to use a similar offset on the shader used for objects on the roads.

    Another solution is custom roads shapes like the single lane road in the main demos scene (this road is part of the custom road network example), the main road geometry is possitioned at a save distance from the terrain. But this results in more complex geometry which is not always what you want. This approach will also be added to the dynamic crossing system in v3.x.

    Thanks,
    Raoul
     
    Last edited: Sep 30, 2016
  14. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,255
    Ok, we'll probably provide two versions of the Landscape Builder shader for EasyRoads, one with and one without the offset.
     
  15. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Three questions.
    0) What are the use cases of "Road Type" option? I only use different "road material" for the "Default road type" for each road.
    1) What are the requirements of creating custom connections in 3DS Max?.
    2) Is the actual road (the road, And not the connections) get generated by the shape of the connection that is connected to? I mean, if I make a custom connection I then should expect that the road that is connected to it should have the same shape as the connection have, is this true?.

    Thanks in advance.
     
    Last edited: Sep 30, 2016
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, that is what we will do as well with the further customized shaders that will be part of the v3.0 package.

    Thanks,
    Raoul
     
    sstrong likes this.
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi D4N005H,
    Apart from the material you can for example set the road width. Side objects can be assigned to road types. Road types can be assigned to dynamic crossing connections so they automatically adapt to that road type. You can create road types from custom connections. The advantage of this is that you only have to do this once. Afterwards this road type will be selected automatically when you create a new connection that matches the road geometry of the existing type connection. So overall setting up road types will save you time creating your road networks.

    The beta package includes various examples of custom connections, you can use them as a reference by looking at the source model itself and the connection settings, drop the prefab from /Assets/EasyRoads3D/Resources/custom prefabs/ on the stage of the Custom Prefab Editor window. With regard to terrain deformation, Y = 0 matches the terrain height at that position. Apart from that currently the only requirement is that the rotation of the object is correct otherwise the shading will not be correct. You can see that by dropping the model in the scene, does unity automatically apply rotations on the X or Z axis?

    That is right, have a look at the little road network build from custom prefabs in the main demo scene. You can experiment with this. Drop a custom prefab in the scene from the 2nd tab off the left in the Inspector and pull out a road from one of the connections.

    To get used with creating your own custom prefabs I would recommend to start with a simple model. Import it in the system, create connections and test the final prefab in the scene. Afterwards you can try more complex custom prefabs like in the two videos about customized road networks in the Quick Start section of the manual.

    Let me know if you need further help with this.

    Raoul
     
    imDanOush likes this.
  18. luiscalcada

    luiscalcada

    Joined:
    Oct 2, 2016
    Posts:
    2
    Hi all, thanks for the very advance tool. Was good purchase

    But I'm trying to create something very simple.
    A simple dirt road that branches out in certain parts. Is this possible? For the love of me, this is the simplest scenario and I'm failing to do it.


    Would you be kind to tell me if this is possible and the easiest to achieve it?
    Thanks so much in advance.
     
  19. raoul

    raoul

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

    Glad to hear you like the tool!

    What exactly did you try? Because you can acheive this with the dynamic T-crossing prefab. But for the best results the dirt texture on the T-crossing must be more or less symmetrical.

    Otherwise you can do this using custom prefab models exactly modeled/textured the way you want. The final demo project wil have examples of this.

    Thanks,
    Raoul
     
  20. luiscalcada

    luiscalcada

    Joined:
    Oct 2, 2016
    Posts:
    2
    Hi Raoul,
    Thanks for the help. Yes, I did try to use the t-crossing prefab...but couldn't get it to work :(
    Also, what do you mean "The final demo project wil have examples of this." ? Where can I access it, to see how I can make it?
    Thanks so much in advance for the help.
    Luis
     
  21. raoul

    raoul

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

    Which of setting up a dynamicT crossing is causing difficulties?

    With "symmetrical" textures I meant that the left half should be a mirrored version of the right half. This way the textures on the t crossing will connect nicely. More crossing layouts will follow so you can also use asymmetrical textures which will be useful for dirt textures. As mentioned this can already be achieved by modelling the T-crossing, this gives you full freedom regarding the look you are after. You can import the model in the system and use it the same way dynamic crossings work.

    The final demo project is what I am working on at the moment, the final bits for the v3 release. It is not yet available. The current demo project in the beta project is provisional, simply showing different features of v3. It includes for example a custom prefab with an asphalt / dirt T crossing (the main demo scene). The final demo project will include a lot more variations, textures, side objects, etc.

    Thanks,
    Raoul
     
  22. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Awesome. I just tested it and this is so magnificent. I actually didn't get the question you've asked but if I don't change rotation in the 3DS Max and set the "up axis" in the FBX Exporter settings to "Y" then there is not a problem.

    Three things:
    0) How to connect two same roads (instead of one big road for one connection to another, how to use several - same -roads between those connections)

    1) Those white things that are shown in the image below, are light reflections that are caused by the normals and I don't know how to fix them.
    So there are two pictures here, one with and the other is without edges for the boundaries. The one which has the edges is better but still there are normal errors.

    2) I can't update the original mesh for the custom connection, therefore I should make one new custom connection which is annoying for creating a large scene. I magine moving one vertex for a custom connection requires creating a completely new custom connection and then I should replace that with every single old connection which takes a hell of time for large scenes, I recommend doing something for this issue would be cool.



    Thanks Raul for this magnificent asset. I love it. :) :)
     
    Last edited: Oct 3, 2016
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi D4N005H,

    Good to hear you got that working!

    Indeed you can experiment with the export options. For both side object and custom connection prefabs we usually export the models to .obj which suits perfectly well for this type of models and they usually import better, no rotation issues.
    Do you mean, how to join two roads of the same road type? Select both markers that should connect by pressing Shift when selecting the second marker. Afterwards you will see a "Join Roads" button in the Inspector or do Shift + J.

    What are these white surfaces? Are they part of your model? Or are these the white surfaces generated by EasyRoads3D visualizing terrain deformation? In the case of the latter what does your custom prefab look like? Also, in that case it is Edit Mode only, these white surfaces will not be visible in Build Mode.

    You can update already created connection prefabs by dragging the newly created prefab (/EasyRoads3D/Resources/custom/prefabs/) on the stage of the Custom Prefab Editor window. Or are referring to updating existing instances in the scene? At the moment they will indeed not update automatically after changes to the source prefab because this uses the same system as the dynamic crossings system. Also, normals of vertices that match road verices at connection points are averaged so these meshes have to be unique anyway. However, all instances share the same prefab ID, so technically it is possible to update them but that is not implemented yet. I will add a note to do that before the v3.0 release.

    Thanks,
    Raoul
     
    imDanOush likes this.
  24. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    I meant the light reflections, those are the light reflections. When I re-imported the model as Obj file, those artifacts got removed (As seen below). So I think there was something wrong with the FBX settings.
     
  25. raoul

    raoul

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

    Ok, so these surfaces are part of your custom prefab. By default the original mesh info is used but in the Mesh Editor window so I am not sure what is causing the diference between FBX and OBJ unless there is a difference in the Unity import by itself. You also have the option to recalculate the normals and tangents in the Mesh Editor window.

    Additional feedback, I am still not sure how you will use this custom prefab. It seems there are multiple objects not necessarily part of the road / connections. In that case, the generated prefab works as a Unity prefab. After creating it, you can temporarily drop it in the scene, add more objects (usually traffic lights etc.) and do: GameObject > Apply Changes to Prefab. This way you can keep the model itself to the bare minimum when importing it in the Mesh Editor window.

    Thanks,
    Raoul
     
    imDanOush likes this.
  26. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Loving Easy Roads v3, but only just getting back into using it. This may be a simple answer; I'd like to make the depth of the roads thicker so there is a step. Do I need to add sides for this or can it be done without? update1.jpg
     
    Tinjaw and 600 like this.
  27. raoul

    raoul

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

    Good to hear you like v3!

    Great screenshot! But It sounds like this is about adding and edge to the sides of the road which is not clearly visible on the screenshot.

    In that case, I mentioned this before recently on this page. Currently this is not yet supported for standard roads and the dynamic crossings system, it will be added in v3.x. You can however already do this using custom road shapes / custom connection prefabs based on your own meshes. An example of this can be found in the main demo scene of the package, the single lane road part of the small custom road network with the more complex T crossing and roundabout.

    Thanks,
    Raoul
     
  28. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    That's great to know. I will take a look at the example as this is what I'm looking for right now.

    In a previous game engine it had a built in road tool with decal or mesh base roads which also had a depth (scale option so you could embed the mesh into the terrain), a 3rd party modification tool enabled the editor so you could create a shape by drawing it and applying it to the sides, for example a slope, or a barrier and textured parts of it by reference. It could also be used to create tunnels or bridges and could just be a one off based on each section of road or repeated throughout. Just an idea - it may save a lot of time.
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Do you mean something like this (copied from the very first post of this thread):



    On the left side a side object is used to procedurally create a terrain surface mesh for more detail (you cannot really achieve this with the heightmap based terrain object itself), on the right a wall side object is used. This is just an example, with the built-in side objects system you can do all sorts of things like this including creating the geometry for tunnels and bridges.

    Thanks,
    Raoul
     
    Last edited: Oct 5, 2016
  30. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    yes, something like that, but with the side objects system you need to create the meshes first in an art program, not just draw them in a GUI, apply the textures to each face and get the results within a couple of minutes?

    In the Shape Editor with trace object is probably just as good, but you'd still need the object or mesh already created. Not an issue though, its all good. :)
     
    Last edited: Oct 5, 2016
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    There are 3 types of side objects:

    1. Mesh Type of side objects: these are instantiated along the track, think of lamp posts, tree lines, etc. but also for example speific types of walls

    2. Procedural Type of side objects: indeed based on your own models. The source mesh will be repeated and adjusted according the spline shape, guard rails, walls in general, powerlines, etc.

    3. Shape Type of side objects. You mentioned this but the trace option is optional. You can draw shapes by double clicking on the canvas, assign vertex colors for custom shaders, snap specific vertices to the terrain, etc. That is how the side objects in that screenshot were created, done within 1 minute :) Apart from the blocks on top of the wall, no external models are involved.

    Thanks,
    Raoul
     
    Last edited: Oct 5, 2016
    julianr likes this.
  32. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Awesome! Spoilt for choice there.. just working on some of the options now. Thanks for that.
     
    raoul likes this.
  33. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Yes exactly.
    Yes, I agree that. It's okay with Obj, so I keep using that instead,though.
    Thanks for the feedback. Actually those objects are not seperated, I was exprimenting with it so I could understand the Easy Roads V3 behaviour better. I hopefully will share more realistic examples soon.

    Awesome asset. 5/5.
     
    raoul likes this.
  34. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,255
    This scene shows EasyRoads3D Pro with LB Lighting, LB WeatherFX and LB Screen Space Ray-tracing Reflection. We're adding an option to allow Near or Far pixel reflections which can be configured at runtime. See here for more info.

    LB1.3.4_ER3_wetroad5.png

    The fence in the scene was created using a procedural side object consisting of a single model containing 3 meshes - 1 for the concrete base, one for the poles (vertical and horizontal), and one for the meshing. The reason we have 3 meshes in one model is that we wanted to use 3 separate materials. When using a procedural side object, each mesh needs to start and end at the same (in this case) y-axis point. To do that, we extended the poles and fence meshing "mesh" in the model using verts and edges without faces. That way it still works correctly with the procedural side objects in ER3 but looks correct in the scene. We still have a little work to bevel the ends of the concrete base but this is just cosmetic.

    We "could" have used a Mesh (Side) Object for the fence but it would not have aligned correctly on curves. BTW - thanks Raoul for your help on this!
     
    Tinjaw likes this.
  35. raoul

    raoul

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

    That should not necessarily be required. What is important is that when using Start / End segments, each mesh that overlaps the respective Start / End Z offsets should have vertices on these offset positions so the system can cut each mesh at the same offset position. Or did you mean something else?

    Because of your smooth wall element, indeed your fence will look better when using the procedural side object type. With some small adjustments to the mesh you could create a similar look as the wall in the beta package which is using the Mesh Type of side object, that way the individual instances will align better in curves. This is just feedback, for racetracks you do probably want a smooth wall along the track for which procedural side objects works better.

    Thanks,
    Raoul
     
  36. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    This is magneficent. As you can see it even adjusts the width road automatically. Well done.

    A suggestion, please do something so that we can manage the order of the custom connection prefabs in the inspector. This way, we can manage +200 custom connections much easier.
    A Feedback, When using custom connection with only one connection, it is not possible to use terrain deformation, could be good to enable the feature when possible.
     
    Last edited: Oct 6, 2016
  37. raoul

    raoul

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

    Yes, as long as the connection vertex count matches, you can attach roads to a connection with a different width. By default this will adjust the road width on the last triangles. Additionally, you can change the road width per marker (the N key switches this option on/off). If you change the shape on the last marker to match the connection, the width change will be more gradually.

    Indeed managing the display of both connection prefabs and side objects is on the list. It is not yet decided how this will work. For connection prefabs easiest would be to list this according the folder structure. Dynamic and Custom connection prefabs are stored in /Assets/EasyRoads3D/Resources/dynamic prefabs and /Assets/EasyRoads3D/Resources/custom prefabs. The user can add sub folders in these folders to categorize the prefabs. These folder will be displayed in the Inspector crossings/connections tab.

    Terrain deformation for prefabs configured with only one connection indeed does not work well at the moment. I will make a note to look into that.

    Thanks,
    Raoul
     
    Last edited: Oct 7, 2016
    imDanOush likes this.
  38. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Two more feedbacks (and I think that would be all).
    1) It is not possible to select these two vertices in the connection editor window, To select them I should rotate the object but it is not possible (Image is shown below).
    Also Whenever I click/Zoom/change the value of "Stage Rotation", the whole model gets vanished and I should re-open it.

    2) When I join two roads, they become one road - which is fine - but I sometimes want to split a road into chunks OR place two roads in a way that they look like one road, This is also a necessary option for the memory optimization which I suggest to add it to this awesome asset.
     
    Last edited: Oct 7, 2016
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    There are no known issues with the "Stage Rotation" slider other then some visual issues for GUI handles for existing connections. The functionality should be fine though, by rotating the mesh you should be able to select the two connection vertices. What exactly do you mean with this? After which exact sequence of actions does that happen?

    Select a marker and look in the Inspector for the "Split Road at Selected Marker" button near the bottom of the Marker Controls. Or use the shortcut Shift + J after selecting the marker, this works for both joining roads and splitting roads depending on how many markers / roads are selected.

    Thanks,
    Raoul
     
  40. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Ok thanks but... here came another question as soon as I started to use EasyRoads seriously (for a real project)... here comes the terrible bugs. I know it is in beta, though.

    Here is a problem (of many) that stopped the development of the project by itself.
    These custom connections are EXACTLY the same but as you could observe for the 2nd (left) connection, none of them have green dot... why?! :|


    And there are thousands of errors like being unable to rotate the connections (sometimes not always), the object in the EasyRoads editor window get vanished sometimes (if I zoom or click somewhere), it is near impossible to use a RTP shader for roads But the first problem I've written here is much important than these.

    UPDATE: Sometimes when I update the connection via the easyRoads window, the problem gets solved.
     
    Last edited: Oct 7, 2016
  41. raoul

    raoul

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

    Am I right that all these error are all related to the same prefab for which obviously something is wrong?

    Are you instantiating all of them through the Inspector (crossings tab)?

    Do you have more of your own custom prefabs and does this happen with all of them?

    Does this happen for all instances of this specific prefab?

    Something is also wrong with the connection of the selected road with the left prefab. Can you send me the source model so I can test it myself? Ideally also the generated custom prefab in /Assets/EasyRoads3D/Resources/custom prefabs/, in a unity package including all dependencies. This way I will have the same setup as you.

    I know quite some people are using the custom connection system with their own models and issues like these have not been reported before so I do need more details, exact steps for a repro.

    The roads are ordinary game objects with a mesh filter and renderer attached, you can use any material you want. In what way do the RTP shaders not work?

    Thanks,
    Raoul
     
    Last edited: Oct 7, 2016
  42. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    No actually all of them (which I've made) are doing so, I haven't tested the standard (not by me) custom connections that come from the package.
    Yes, I do.

    Yes all of them, apparently.
    Yes it does, however some shows 2 dots, some shows one and some shows none (like the left one in the picture) while there should be three dots (like the right one in the image)
    Yes, here it is: http://www.mediafire.com/file/8pig6zmgtjwy3zj/D4N005H(2).rar .
    Well I made the model in 3DS Max and imported it as Obj and added connections and then I added them to the scene via inspector.
    There are Z-fighting effects and some of the roads gets vanished or darkened. Look at the image below.

    Only "Easy Roads Diffuse" works well.
    I am using the latest ER v3 with Unity 5.3.6 in deffered mode, though.
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    On reasonably flat terrains terrains you can use the "Raise" option at the top in the Inspector in Build mode, values of 0.02 - 0.05 should be enough. Note that there is a small bug with this in the current beta, you have to reset the value each time you switch to Build mode. This is resolved in the next beta.

    Furthermore, the EasyRoads3D shaders use a small offset (one line of code: Offset X, X) in the shader to deal with this. You could add that to other custom shaders you use.
    Objects are rendered dark in Unity 5 when you use normalmaps while the mesh does not have tangents applied. Do you have "Calculate RoadTangents" toggled on in the Build settings and optionally also in General Settings > Scene Settings?

    Have you tried the custom prefabs part of the package? Do you have the same issues with these prefabs?

    Thank you for the zip. It contains the unity assets folder structure with separate mesh assets and prefab assets. This will not work well. I will try the source models tomorrow (it is 1am in the morning where I am).

    It would be useful if you could email me a unitypackage with the prefabs in /Assets/EasyRoads3D/Resources/custom prefabs/ including all dependencies. My email is in the _Readme file in the EasyRoads3D root directory.

    Thanks,
    Raoul
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @D4N005H, I tested your source models, they work fine for me (with your normal map and dirt texture using the adapted Unity standard shader part of the package and Calculate Tangents toggled on)



    I would recommend to prepare your custom prefabs so each connection is build from unique vertices. Right now the corner vertices are shared between connections.

    So in order to hopefully get a repro of your issues, could you send me this unitypackage I asked for (by email) with the generated custom prefabs you are using. Or the full project / scene stripped to EasyRoads3D assets (including the EasyRoads3D assets folder) and the terrain only if you want?

    Thanks,
    Raoul
     
    Last edited: Oct 8, 2016
  45. 600

    600

    Joined:
    Dec 18, 2013
    Posts:
    385
    Hello Raoul,

    Is this a bad practise? I have intersection models sharing corner vertices and had no issues for now, but can it lead to bugs/problems later?

    Thanks!
     
    imDanOush likes this.
  46. 600

    600

    Joined:
    Dec 18, 2013
    Posts:
    385
    Now I’m thinking I’ll just extend those connections a bit further and make them unique anyway, will be easier to set up in the Editor too… Thanks for the tip :D
     
  47. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Aha, thanks. I've made a shader in ShaderForge sucessfully for this case. It exactly behaves like your shader. You can download it here and include it in your future ER unity packages. This is a shaderForge asset which is really handy for people who use the node editor. Download the shader here: http://www.mediafire.com/file/n9owwuksslphe64/DanooshEasyRoadsShader.shader .

    Awesome, everything including the problem that I talked about last night, is now fixed.
    No, but now everything is fine.



    Okay, amazingly after I re-installed EasyRoads, all the problem gone. That is very wierd. I'll send those files if again they drive me nuts. Everything is fine now. Here is an image of them with the custom shaderForge shader appilied to them:


    And if you want, include those custom connections in the package as well as the shader, if you want. I think they are useful for others,too.

    Thanks for the instant replies.
    Best.
    Danoosh.
     
  48. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    This is what I did for some of my own custom connection, But according to my previous post, there is not a problem with sharing vertices (till now, though).
     
    600 likes this.
  49. raoul

    raoul

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

    If it is working well, it is working well... :)

    Indeed it is recommended to extend the connections. This way connections will have unique vertices but also keeping terrain deformation in mind and your scene specific terrain heightmapscale. That way the crossing prefab is more "spacious" covering a larger area of the terrain.

    Another reason to extend the connections is that most likely future versions will support some form of dynamic bending on custom prefabs as well. This will require additonal vertex rows over which the bending can take place.

    Thanks,
    Raoul
     
    600 likes this.
  50. raoul

    raoul

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

    So all issues are gone now?

    Yes, should this happen again, a repro project would be very much appreciated!

    One thing, in your screenshot the road texture does not align nicely with the texture on the crossing prefabs. You can use the "Flip Texture" option in the Inspector for the selected road to fix that.

    Thanks,
    Raoul
     
    imDanOush likes this.