Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    The example runtime scene works, aside from the road having no texture. The terrain already existed in edit mode though, unlike the ones I create during runtime.

    I don't know how much the piece of code below will tell you, but the error arise on the bolded line.
    _goTerrain is the terrain GameObject.
    _terrain is said game object's Terrain component.
    Each terrain comes in multiple levels of detail, which is why things are named "lod".
    RoadCollection.Road is a class for holding the data needed to create ERRoads. I don't think you have to give it any thought.

    if(_lodData[g].LODLevel == ActivatedLOD)
    {
    _terrain.terrainData = _lodData[g].TerrainData;
    _terrainCollider.terrainData = _lodData[g].TerrainData;
    _heightOffset = _lodData[g].HeightOffset;
    SetPosition();
    _goTerrain.SetActive(true);


    //TODO try making roads
    List<RoadCollection.Road> roads = _lodData[g].Roads;
    if(roads != null)
    {
    int count = roads.Count;
    EasyRoads3Dv3.ERRoadNetwork roadNetwork = new EasyRoads3Dv3.ERRoadNetwork();
    for(int j = 0; j < count; ++j)
    roads[j].BuildRoad(roadNetwork);​
    roadNetwork.BuildRoadNetwork();​
    }​
    }

    I don't know if I can send you more than this. It's a big and complicated project and I don't think I'm allowed to share much source code.

    EDIT: A close look at the error message show that the exception is in fact thrown from a function called in the ERRoadNetwork constructor:
    ERerror.png
     
    Last edited: Oct 17, 2017
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The constructor doesn't do that much, part of it is actualy collecting terrain data. But I cannot see how that results in nullReferenceExceptions.

    Since you confirm that the runtime example works well for you, this seems somehow related to your workflow including perhaps how you are creating your terrains at runtime.

    More info/data would be very helpful. Can you send a PM or contact us by email?

    Thanks,
    Raoul
     
  3. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    The error seems to have been caused by our workflow. I took out the simplest elements of our terrain creation process to try doing it outside our workflow in a test scene and it works aside from the roads not having a texture. I guess that with the API the RoadNetwork doesn't automatically import all the road types?

    I'm thinking that our workflow could be helped if we could explicitly tell the RoadNetwork what terrains to work on. What do you think?
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad to hear you made progress. I was asking yesterday to contact us so we can send you debug builds and trace the error so we can handle that better in any case regardless whether it was a result of your specific workflow.

    The road not having a texture probably means no material or a material without a texture is assigned. You can check that by selecting the generated road in the hierarchy. You can create both roads from scratch through the scripting API and assign a material or you can create roads by passing a road type (already including the material), something like:

    Code (csharp):
    1. ERRoadNetwork network = new ERRoadNetwork();
    2. ERRoadType roadType = network.GetRoadTypeByName("Dirt Track");
    3. ERRoad road = network.CreateRoad("Dirt Track 01", roadType);
    This works if you already have the road network object including all road types in the hierarchy. Otherwise you can create the road types through the scripting API.

    Inside the editor you can have all terrains updated or the selected terrain. I don't think this is yet added to the scripting API. Perhaps it would help if we have more info on your specific terrain workflow? What is it that causes the error?

    Thanks,
    Raoul
     
  5. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    Our terrain workflow is too complicated for me to share. I have trouble tracing it myself. I do not know what causes the error. I just know that the error occurs in the RoadNetwork constructor.

    I was already assigning a road type the way you suggested. I looked for the name "Default Road" which is a road type that I've seen in the list.

    I've encountered a different problem now. A section of the road behaves weirdly.
    ERWeird.png
    The crossing in the image isn't an actual crossing object. For now it's just two roads ending on a point that is shared with a long road which is the one that has been distorted. So, there's three roads sharing the point in the middle and the distortion happens on the node just before that on the road that goes through it.
    ERWeird1.png
    I lifted up the distorted node and it looks like this:
    ERWeird2.png
    It looks like a mathematical error that makes the road to shoot past the node and then it have to go back and realign with the node. Is there a setting that I can change to make it not do that or do you think that I have to prevent it by splitting the long road at the shared node and perhaps using a crossing?

    EDIT: I don't think a crossing would help. This happens even without the other two roads interfering.
    EDIT2: The road straightens out if I pull back the node in the crossing.
    EDIT3: The road straightens out if I change the control type to "Straight XZ" or "Straight XZY" for either the crossing node or the folded node. "Circular" causes a similar but different problem. Pulling down the curve strength of the folded node also works. I would like to be able to adjust the curve strength in the API.
     
    Last edited: Oct 18, 2017
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Do you want to resolve this? Once again, in that case, please contact us by PM or email so we can get that sorted out :)

    What is the status of this? Does this work now? If not, how are you creating your road network object? Is this already in the hierarchy in your scene before switching to play mode? Or are you creating an entirely new road network object at runtime? In the case of the latter the code snippet in my previous post, as mentioned, will not work and road types need to be created at runtime.

    Road shapes are generated based on marker positions and the controller type (spline by default) for each marker.

    With that in mind, could you please provide more info? Was this created through code? What are the marker positions?

    Are the distances between marker positions significantly different? Marker positions don't have to at exactly equal distances when using the spline controller but if the distance betweenmarker 1 and 2 is 500 and the distance between 2 and 3 is 20, it can result in a distorted shape depending on the angles between markers.

    Edit 2 and Edit 3 seems to confim this?

    Thanks,
    Raoul
     
  7. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    No. My colleague assures me that I won't actually have to make the roads where I was trying to make them. I wanted to make the roads where the terrains were created so that I could see the results immediately, but we have a different and simpler workflow where we turn individual terrains into asset bundles for the sake of optimization and he suggest that I do it there instead. The main workflow is for creating large areas with changing levels of detail depending on distance from the player. It has to be able load and unload terrain as the player moves and do so without causing stuttering, so it's very complicated.

    I made a simpler version of the workflow that only reads a single terrain, similar to how our asset bundle creation workflow does it. That's where I'm testing the API now. I'll try adding the RoadNetwork in edit mode then... Result: It didn't work. The roads are still without texture. When I added the RoadNetwork I got the option to import side objects and road types and chose "yes" on both.

    Yeah, the distance between those two nodes were tiny by comparison with the distance to the node after the crossing. I found that I can set different control types for different nodes in code, but I would also like to be able to change the curve strength. I didn't find a way to do that, so I would like to request that functionality be added.


    I'll try to find a way to make sure that the roads get their textures. After that I will start considering crossings and road connections. For the crossings I'm going to have to make sure we create data that can be easily inputted into EasyRoads, so I'll have some work to do outside Unity. I've also been asked to prioritize a different task, so you might not hear from me for a while.

    EDIT:
    This code doesn't work:
    ERRoadType type = aRoadNetwork.GetRoadTypeByName(myType);
    ERRoad road = aRoadNetwork.CreateRoad(myName, type, myNodes);

    This code works:
    ERRoadType type = aRoadNetwork.GetRoadTypeByName(myType);
    ERRoad road = aRoadNetwork.CreateRoad(myName, myNodes);
    road.SetRoadType(type);

    EDIT2:
    This code also doesn't work:
    ERRoadType type = aRoadNetwork.GetRoadTypeByName(myType);
    ERRoad road = aRoadNetwork.CreateRoad(myName, type);
    road.AddMarkers(myNodes);
     
    Last edited: Oct 18, 2017
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Do you perhaps have terrain objects in your scene without terrain data assigned? That could cause the NullReferenceExceptions. I will make sure to handle that situation more properly.

    The code snippet I posted earlier works for me. No need for an additional:
    road.SetRoadType(type);

    Inside the editor you can control the spline strength per marker. This will smoothen the curves in these situations where the road shape gets affected too much because of too irregular distances between markers. I will make a note to add this to the scripting API as well.

    Thanks,
    Raoul
     
  9. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    I believe you are right! The function in which I was trying to create the roads was the function where we assigned the TerrainData to the Terrain object. The Terrain object is created earlier and thus there could be several Terrain objects in memory that has yet to have their TerrainData assigned.

    Is there something that is done in the SetRoadType function which isn't done in the constructor, or perhaps things are done in a different order? I don't know what causes it, but setting the type in the constructor simply doesn't work for me.

    Thank you. With that I will be able to check the distances between the nodes and set the strength accordingly.
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, there will probably be one last beta update before the v3.0 release. Let's see if that indeed fixes the NullReferenceExceptions in your specific setup. If you want I can also always send a test build.

    Is this also still related to the first image a couple of posts above, the pink road?

    Even if no road type is assigned, the road should not render in pink, the default road material should be assigned. Could you select the generated road in the hierarchy and the check the mesh renderer component for the assigned material. And if a material is assigned, does it include a texture?

    Thanks,
    Raoul
     
  11. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    Yes. The pink road is what happens when I don't add a road type in a separate call.

    Correction! It only happens when I try to add a road type in the constructor. Not adding any road type at all (not in constructor nor in a separate call) does automatically select the default road type as you say. Only trying to add a road type in the constructor causes the pink road.

    The pink road does in fact not have any material. The counter is 1, but the material is None.
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    There is a small difference when doing this through the constructor. This uses ERRoad.SetMaterial(), very similar to:

    Code (csharp):
    1. ERRoadNetwork network = new ERRoadNetwork();
    2. ERRoadType roadType = network.GetRoadTypeByName("Dirt Track");
    3. ERRoad road = network.CreateRoad("Dirt Track 01");
    4. road.SetMaterial(roadType.roadMaterial);
    5.  
    This also works just fine. How does that work on your end? Is roadType.roadMaterial perhaps null? In that case is this a road type you created or one of the road types part of the package?

    Thanks,
    Raoul
     
  13. BoSALL

    BoSALL

    Joined:
    Apr 19, 2015
    Posts:
    4
    is it possible to make a tutorial for rail tracks ? (how can I handel turnouts?) - wil the be a posibility to import an alligment?
     
  14. raoul

    raoul

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

    EasyRoads3D doesn't have railways integrated directly. It can be simulated through the custom crossings system like the example in the beta package. The 2nd customized road networks video (in the first post of this thread) shows this process for a railway crossing.

    Turnouts can be done in a similar way by importing a mesh model with the specific switch geometry. I think that also answers your alignment question?

    Thanks,
    Raoul
     
  15. kadu3d

    kadu3d

    Joined:
    Jun 25, 2014
    Posts:
    4
    Please, I'm desperate to test the free version but its not working in Unity 2017.2.0f3: "ArgumentExeption: Owner can't be an array or an interface." - No interface appears on the component...
     
  16. raoul

    raoul

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

    I just responded the below in the v2 thread to your same question:
    ------------------------------------------------------------------------------------------

    It seems you wrote a review earlier today with the same information. I already asked for more details, what is the full error message and when do you get it?

    Note that this is the v2 thread and the free version is indeed also v2. If this is only for testing before getting Pro, for the Pro version you want to use v3, an entirely new road system that cannot be compared with v2. https://forum.unity.com/threads/easyroads3d-v3-the-upcoming-new-road-system.229327/

    Thanks,
    Raoul
     
  17. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    SetMaterial doesn't work either. The ERRoadType's material is not null and it refers to a texture called "road2Lane_d".

    The ERRoadType is "Default Road" and is acquired this way:
    type = aRoadNetwork.GetRoadTypeByName(myType)

    road.SetRoadType(type) works.
    road.SetMaterial(type.roadMaterial) does not work.

    Is something done in SetRoadType that isn't done in SetMaterial?
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Both ways work fine for me :)

    I went through all the recent posts, I don't think you mentioned which build you are using. Is it a previous version or the latest 8.6 build? I have been testing this in the development project itself so perhaps I should test this in 8.6 if that is what you are using?

    Thanks,
    Raoul
     
  19. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    Any rough ETA on V3 final release..?
     
  20. raoul

    raoul

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

    The new v3 demo project will be released very soon together with a new website with tutorials. As it looks now this will happen within one or two weeks.

    The final v3.0 package only needs a clean up., so it will probably follow quickly afterwards unless serious issues are reported.

    One final beta update will also be available next week.

    Is there something specific you are waiting for?

    Thanks,
    Raoul
     
    Mayureshete and hopeful like this.
  21. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    I use 8.6. I also did the Force-Text thing.
     
  22. davidwandar

    davidwandar

    Joined:
    Aug 28, 2017
    Posts:
    4
    Hello,

    I am looking forward to try v3 in a project when released. I read there is a runtime-api, does this mean I in gamemode can create a road with lets say a Vector3[] as input?
     
  23. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    Will you also provide a simple tunnel object as a side object to make tunnels..?
    also is it possible to make multiple sections in the road which is already made before finalizing for occlusion purposes..


    I am closely following the V3 development, and i need to say the update over previous version is too good.

    I have bought this asset last year in march and i think now its time to use it.I am just waiting for the final version to release, so i could learn this package and start making roads..
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Without having tested it, this certainly looks like a 8.6 issue that has been resolved meanwhile. Although the textures are updated internally the actual materials on the mesh renderer are set to null in ERRoad.SetMaterial().

    I will prepare a new test build anyway today for someone else. I can send it to you as well if you want to try the current status of this.

    Thanks,
    Raoul
     
  25. raoul

    raoul

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

    You can indeed already do that in the current beta versions. Using the code snippet further above:

    Code (csharp):
    1. ERRoadNetwork network = new ERRoadNetwork();
    2. ERRoadType roadType = network.GetRoadTypeByName("Dirt Track");
    3. ERRoad road = network.CreateRoad("Dirt Track 01", roadType, markerPositions);
    markerPositions is a Vector3[]

    Thanks,
    Raoul
     
    davidwandar likes this.
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The demo project will not have a tunnel example. It is on the list, but a full working implementation is complicated.

    Tunnels involves two steps. The side object that creates the tunnel geometry. This is fairly simple, it can be made as complex as you want. An example of this will follow later. For quick results you can experiment with this using the shape type of side object.

    The second step is creating the hole in the terrain object. This is more complicated. There are several packages that can do that. The new demo project will actually have an example of this using the mask approach to cut a hole in the terrain for a sewer example. This is however horizontal which is less complicated then vertical masking required for tunnels.

    At the moment this can be achieved by splitting the road in multiple road objects with an I Connector between them to preserve the shape. More direct options will follow later but the end results will be the same, multiple gameobjects which is required for occlusion culling.

    Unless you are not in a hurry and busy with other aspects of your project you may just want to start using it as it is. The final release version will not be much different. As mentioned the new demo project will be released first, it can be used to get familiar with the more advanced features if that is what you were waiting for as well.

    Thanks,
    Raoul
     
  27. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    I am almost done with my current project, so will soon be digging in to easy roads, I will do my trial and error methods for tunnels, learning process is always fun.

    thank you for your quick reply...
     
  28. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    Sure! You want me to PM you my e-mail?
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    It is not too complicated. This can be done with both procedural and shape type of side objects. And you probably want to model tunnel start / exit geometry. Shape type of side objects will show fast results. Because the normals should point inwards you want to add nodes (in the shape editor window) from right to left or CCW, but you can always flip the normals.

    I will make sure to add some examples after the initial demo project release.

    Thanks,
    Raoul
     
    Mayureshete likes this.
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes please :)
     
  31. AndrewBeers

    AndrewBeers

    Joined:
    May 28, 2015
    Posts:
    13
    I am now having issues with the uv editor jumbling up my vertices from my intersection object when I extract a road. I attached images to this post with titles explaining what they are. Is it possible that my vertices are too close together in my intersection? I intend on simplifying the geometry in the future using re-topology and a more complex model. Will this help? Any idea what is going on here?

    Below is my custom intersection.
    This is my custom intersection.PNG

    Below I attempt to line up uv's using planar and copy from mesh.
    Using planar and copy from mesh.PNG

    Below I manually adjust vertices to line up with image.
    This is my manual vertex adjustment.PNG

    Below you see that the manual adjustment results in some funny application
    What it looks like after attempting to adjust uvs.PNG

    I fiddled with the vertices quite a bit and discovered that the are not in order as they should be. It is not clear which vertex is connected to which other two vertices.
     
  32. AndrewBeers

    AndrewBeers

    Joined:
    May 28, 2015
    Posts:
    13
    After reading the manual more carefully I think I know how to fix my problem. It looks like I cannot use one material for the intersection. I have to use a material for the central part and then the actual road textures for each of the outgoing paths.

    The center will have a different material than each of the roads coming off of it and the roads coming off will have exactly the material and texture to be used on the roads extruding from them. I did not realize I could use multiple objects in one.

    I just attempted this and it did not seem to work either.... darn..

    upload_2017-10-20_19-46-48.png
     
  33. raoul

    raoul

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

    This is custom prefab related based on importing your own meshes. It is hard to provide feedback without knowing the mesh and the exact connection settings.

    The vertices are close to each other but that shouldn't cause an issue unless they are extremely close to each other within specific offset margins like 0.001 which is probably not the case.

    There are a couple of different ways how you can approach setting up your own custom connection prefabs and you can use one material for the crossing.

    When using one material on the crossing and you do want to be able to use "Copy UVs from Source Mesh" , that material should also be used on the attached roads because the same UVs are used, note the bold underlined U which is what this is especially related to. Usually this results in for example the left part of the texture representing the road texture and the remaing area for the additional crossing elements.

    Or you can use a separate material/texture for the attached roads and set the UVs manually in the UV editor window.

    But in this case it is hard to tell from screenshots what may go wrong. Especially the last screenshot, what is that supposed to look like? Some times "Flip Road Texture / UVs" in the road Inspector can fix texturing issues.

    There are currently no known issues with setting up UVs in the custom prefab editor window.

    Would it be possible to have a look at the model and test it myself?

    Thanks,
    Raoul
     
    Last edited: Oct 21, 2017
  34. davidwandar

    davidwandar

    Joined:
    Aug 28, 2017
    Posts:
    4
    Great. I will try and give it a roll later this week. :)

    I can probalby find this out by testing, but does this functionality (supplying a Vector3[]) combine well with having the road stick to a terrain?
     
  35. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Hi raoul,
    I just got around to use the LOD-feature (again). This time the vertex color of the marker gets respected by the LOD meshes and they do not z-fight anymore. Good job.
    One minor thing though: where is LOD0? The LOD-group component only references LOD1, LOD2 and LOD3.
    Seems like LOD0 did not get an invitation to the party although it is a child of that very same road. :)
     
  36. raoul

    raoul

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

    When adding markers in Scene View they will snap to the terrain. This is not the case when creating roads through the scripting API, markers will be added according the supplied Vector3[].

    Or do you mean the full road snapping to the terrain? In the Inspector there is the option "Follow Terrain Contours". I just had a look, this is not yet available in the scripting API. I will make a note to add this and also add this to Road Types in General Settings.

    Thanks,
    Raoul
     
  37. raoul

    raoul

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

    Yes, vertex colors should now be respected by all LOD meshes.

    I have seen that situation of LOD0 not being visually present in the LOD Group component in the Inspector. I haven't looked into it because in scene view this appears to work well. When zooming in / out with a road selected the LOD transitions are displayed including LOD0. When zoomed in, the LOD0 mesh is visible. Is that not the case for you?

    Thanks,
    Raoul
     
  38. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    This is indeed the case if I zoom in very close. So close in fact that it does not represent our ingame camera view anymore.
    I quickly fixed this issue with a custom editor window script that I can hand the RoadObject transform of the RoadNetwork in question.
    The script then looks for LODGroup components in its children, gets their LOD structs and modifies the screenRelativeTransitionHeight of each of the 4 LODs like so:

    LOD[] lods = lg.GetLODs();
    lods[0].screenRelativeTransitionHeight = 0.4f;
    lods[1].screenRelativeTransitionHeight = 0.2f;
    lods[2].screenRelativeTransitionHeight = 0.1f;
    lods[3].screenRelativeTransitionHeight = 0f;

    lg.SetLODs(lods);
    lg.RecalculateBounds();

    This seems to do the trick. LOD0 is now visible much longer before getting replaced by LOD1... etcetera...
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Are those values similar to the LOD Level Bounds values in General Settings > LOD Groups?

    Because these are the values passed for screenRelativeTransitionHeight in the LOD Constructor.

    Thanks,
    Raoul
     
  40. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Similar but not the same. I first made ER3D create the LODs with its default settings. Afterwards I simply modified the screenRelativeTransitionHeight values of each LOD as described above.
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The default value for the first LOD level is 0.6 . But the slider min max values for the first LOD level were actually both set to 1, resulting in the first screenRelativeTransitionHeight value of 1. That is why LOD0 is initially not visible in the Inspector. This is fixed in the next update.

    Thanks,
    Raoul
     
    Marco-Sperling likes this.
  42. Astx

    Astx

    Joined:
    Apr 23, 2015
    Posts:
    9
    Hi raoul!
    Can you, please, expand OSM import with ability to check/import "motorway_link" type of the roads? And add ".XML" extension to import files. This type of files we can get with directly export at OSM site. Thank You!
     
  43. raoul

    raoul

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

    Yes, xml can indeed be the osm download extension. It is already added for file selection in the next update. I will also add a filter / road type selection for "motorway_link" although that might change in a later update when highway ramps are active.

    Thanks,
    Raoul
     
    Last edited: Oct 25, 2017
    Astx likes this.
  44. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    It would be great to have a similar looking UI in your LOD settings for the bounds as seen in the LODGroup component.
    At least having a color segmented slider beneath the settings would make it more clear to the user what he'll be getting after the roads have been converted to LODs.
    While I don't like Unity's slider (because of its inaccuracy to type in very specific values) it would simply build upon the already existing foundation of the editor user experience.
     
  45. raoul

    raoul

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

    I think there are no ways to do this directly through the unity EditorGUILayout class, but I will see if there is a way to simulate this. While the final values need to be passed as decimals, perhaps showing these values as percentages will already make it easier to associate with how this is visualized in the LODGroup component itself?

    Thanks,
    Raoul
     
  46. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul

    Is there a way to make with currently beta easyroad3d roads receive shadows from the trees by using easyroad3d/transparent/diffuse (NOT cutout) material ?
    I've seen a comment in this thread regarding this issue, but it seems unclear weather the current beta 3 version is capable of handling this case.

    Is there a demo scene that showcases the above case solved ?
    If so, where may we download it from ?

    Please let us know
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi tri-stratos,

    This is shader related. Indeed the unity transparent shaders do not receive shadows. There are some screenshots posted in this thread with dirt tracks, full transparency (NOT cutout) receiving shadows based on decal:blend. This is a workaround, the shadows projected on the "road" are as how they would be projected on the underlaying terrain.

    Example shaders of this are part of the new demo project which will be available very soon.

    Thanks,
    Raoul
     
  48. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul,

    Is this something feasible with the current beta build or need an updated shader that is under way?
    If it is, would it have been possible to collaborate with us, how may one set it up, while we wait for your example ?
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    A new beta update will be prepared in the next few days, I will add an example shader.

    Thanks,
    Raoul
     
  50. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul
    Please keep us posted here if possible with an according post regarding this for heads up