Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

EasyRoads3D v2 is out – Road, rivers, procedural geometry for Unity

Discussion in 'Assets and Asset Store' started by raoul, Mar 18, 2011.

  1. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    Hi Raoul!

    Is it possible to use the EasyRoads3D API during runtime? For example, SimCity allows you to make roads inside the game. Can I do this with Easy Roads?
     
  2. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    Fantastic...i'm very happy that this feature is back...thanks Raoul.
    Edit: and also nicely integrated!
     
    Last edited: Jan 15, 2013
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    HI guys,

    @PyroStudios, I just replied to our PM with the same question

    @Max, thanks! I needed additional scene cam control for something else and finally figured out how to do that. I thought it would be a useful feature to speed up the development process in EasyRoads3D as well...
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    the new v2.5.0 is now also available on the Assetstore
     
  5. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hi Raoul,
    Is this version compatible with Unity 3.5.7? Because after I imported the latest version in, I get these errors :

    Assets/EasyRoads3D/scripts/RoadObjectScript.cs(334,47): error CS1061: Type `UnityEngine.GameObject' does not contain a definition for `SetActive' and no extension method `SetActive' of type `UnityEngine.GameObject' could be found (are you missing a using directive or an assembly reference?)

    Assets/EasyRoads3D/scripts/RoadObjectScript.cs(517,44): error CS1061: Type `UnityEngine.GameObject' does not contain a definition for `SetActive' and no extension method `SetActive' of type `UnityEngine.GameObject' could be found (are you missing a using directive or an assembly reference?)
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi I am da bawss, yes this is update also deals with some obsolete code in Unity 4. It will raise errors in Unity 3. I will prepare a new update on monday with version control so it will run fine on Unity 3 as well.

    But does that mean that you were able to download the package with Unity 3.5? I thought that was not possible with packages uploaded with Unity 4?
     
  7. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Download Manager Menu


    I usually checks the Download Manager menu from the Asset Store interface. And I updated EasyRoad3D v2 from that. Nothing, no error pops up when I press update from there.


    EDIT: BTW, I found this :

    Application.unityVersion
    http://docs.unity3d.com/Documentation/ScriptReference/Application-unityVersion.html

    Just in case if you need to check Unity Editor version so the correct version can be apply for user. eg. v3.5x version of EasyRoad3D for Unity v3.5x, and v4.x version of EasyRoad3D for Unity v4.x.
     
    Last edited: Jan 20, 2013
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Thanks for letting me know! The changes are only related to a couple of lines of code related to active and SetActive() for Unity 4. Something like the below should work

    #if UNITY_4_0
    // Unity 4 code
    #else
    // Unity 3 code
    #endif

    I will look at this tomorrow
     
  9. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Nice! Its fixed now :)
    Thanks!!
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, prepared support of the new version for Unity 3.5 earlier this week. the assetstore version is approved. Today I will update the scripts for the website download.
     
  11. Helkus

    Helkus

    Joined:
    Dec 20, 2012
    Posts:
    7
    Hey Raoul, Great tool so far btw, but I have a question

    I have a rather large level and we'll constantly be making updates to it, including the terrain, and will contain more than one seperate road object. I don't want to 'finalize' the road objects so all the markers are gone and the terrain is permanantly modified, but I also don't want all the objects floating around my scene.

    The solution I came up with is to have a duplicate scene _roads which has the terrrain object and terrain data, and use the 'save geometry' feature to generate models, I then position the models in the original scene. (luckily I can just position them at 0 0 0 and they're generated with an offset, nice! ) this way the terrain gets modified from the road scene and I have just the raw models running during gameplay. The idea here is I can change the terrain however I want, load the _road scene and re-apply the road changes to have the terrain properly modified, or if that's not enough, move the markers around a bit.

    The only problem I'm having is regarding terrain modifications and save/restore, If the terrain modifications are applied and I then change the terrain, when I go to edit the road and it restores the terrain I lose any changes I may have made to the terrain.

    How come the save/restore feature doesn't write like -1 or max_float or something into areas of the heightmap that would be unmodified by the road, then when you 'restore' it it could only apply the old positional data to the areas that were previously modified by the road? any of that exposed to script that I could change? Thanks.
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hey Helkus,

    Yes, that's right in order to preserve the original terrain the full terrain data is stored and restored otherwise the old road shape, possible splat texture or removed vegetation would still be visible (or missing regarding vegetation).

    If only one road object would be involved something like what you describe at the end would be easy to implement. In the current setup this gets a bit complicated when multiple road objects are rendered, restored in a differenr order, rendered again etc. That's why the full data is stored and restored.

    If more people support this, I can have a look at it in general. For you particular situation at this point the solution would be to duplicate the terrain in the project panel. Either use this terrain or the original terrain in your "real" scene. So now you have the original terrain data on file, the deformed terrain after building the roads and your current terrain that may have manual modifications. With this info you can restore the terrain and keep manual modifications by comparing height data changes after building the road. I am quite busy but if you give me some time I can look into this and send you a script. In a next update the deformed terrain could also be stored on file so duplicating the terrain object will not be required.
     
  13. jbh142

    jbh142

    Joined:
    Apr 27, 2010
    Posts:
    31
    Raoul can I do roads like this with sidewalks but have grass in between the side walk with the pro edition?
     

    Attached Files:

  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi jbh142,

    Yes, make sure the indent values of the road object stretch to outside the side walk. By doing this the side walk will be positioned exactly on the terrain just like the road. The side walks themselves are just ordinary side objects with 2 horizontal nodes. But I also see a little step. If you require this as well then you will never be able to deform the terrain with so much detail that the grass is above the road at the step height. So in this case I would recommend to build a seperare side object for the grass in between the road and the side walk as well, or a single side object with a grass / side walk texture / step texture.

    Also, if your question is, can I build the entire scene in that screenshot? Then this will also require crossings which is being worked on.
     
    Last edited: Jan 26, 2013
  15. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Hey Raoul, good work so far.
    I have a quesiton, i remember trying an old version of easy road, and i was facing one problem that make me stop using it.

    Basically, after finishing making the road for my racetrack (quite a long racetrack), when i started to bake, the EasyRoad object was considered as one single object and the baked shadow was stretched and ugly looking.

    Is it possible to separate the road in many small piece in order to get batter performance and better resolution for lightmap ?
    Having only one object make it quite bad for performance.

    Usually in racing games, the road is divided in many pieces, so the camera has to render only the visible parts of the road, and not the whole road all the time.
    Do you know what i mean ?
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hey jujunosuke,

    Yes, you can start new LOD segments per marker. Just select a marker and look in the Inspector at the bottom for something like "New LOD Segment". Instead of a single mesh now each segment will be added as a child of the "road" game object when creating the final road.
     
  17. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Amazing, thanks for the mega fast reply!

    Me and my friend are working on a racing game, and doing the racetracks from scratch on our 3d program is just crazy painful.......
    Thats why after seeing this thread again, i am really reconsidering Easy Road one more time for our project.

    The combination of Unity terrain tool + Easy Roads seems to be a big time and trouble saver for our project.

    Last question.
    Is road intersection still in Beta or is it available in the final product ?

    If we want the full package with intersection, how much is it ?
    Thanks!
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Intersections is not yet available. The last feature for the public release, roundabouts, is proving to be a bit of a challenge. After this is implemented, code optimization needs to be done and the last bugs / glitches need to be fixed. Then it will be released.

    Because roundabouts is taking longer the expected I have prepared a special temporary build for Unity 4. It will be available in the next couple of days, have to do some more tests... The next beta and v3 is included in a Pro license, so that will be $90 on the Assetstore or $89 on our website.
     
  19. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Very nice!

    Few last questions :
    That new v3 version running on Unity 4 may also work on older version of Unity ? Like 3.x ?
    If not, i need to think about switching to Unity 4.0 right now.


    Will we be able to use all the available features of the Easy Road Pro v3 with Unity Indie ?
    We are using Unity Indie for our prject, and we don't have Unity pro yet.

    That would be sad if we could not use all these features with Indie version of Unity.


    Thank you for your time!
    And sorry you probably already answered these questions somewhere else, but you have so many thread about Easy Roads, i can't read everything lol.
     
    Last edited: Feb 20, 2013
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    The new beta will be Unity 4 only but we have another version for Unity 3 available.

    Regarding EasyRoads3D there is not too much that needs to be changed between Unity 3 and Unity 4 so if more people request this Unity 3 can also be supported.

    All EasyRoads3D features work in Unity Free! And feel free to ask if you have more questions ;)
     
  21. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    You answered them all for the moment.
    I don't care about Unity 3, i will try to move to Unity 4 anyway..

    Thank you for the very nice and fast support.

    Best regards.
     
  22. napster

    napster

    Joined:
    Jun 15, 2012
    Posts:
    313
    Woww that looks stunning !
     
  23. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Will version 2 work with Unity 4? I really only need the river tool, not the other additions. Thanks!
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    @jujunosuke, ok, that sounds good, in order to get a Unity 3 supported build the project must be compiled in Unity 3 while the development project is in Unity 4. But as already said, if there are enough requests from other users we can always copy the scripts to a Unity 3 project and prepare a package for Unity 3...

    @Napster, thanks!

    @Teila, Yes, the current v2.5.1 is fully functional on Unity 4. The river tool inside EasyRoads3D is a bonus tool, it is not 100% optimized. depending on the nature of your terrain, after deforming the terrain to the river shape, the river bank may stick out a little bit above the original terrain. You can easily blend this using the terrain smoothing tools. Just thought I let you know because you mention that you specifically want it for rivers...
     
    Last edited: Feb 20, 2013
  25. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Raoul, thank you for the support, i have another question.
    It is about road texturing.

    Is it possible to add multiple piece of texture on the road width ?
    Like 4 pieces of asphalt texture on the road width ?

    Generally, using only 1 texture for the whole width of the track does not give clean result.
    The road feel stretched and does not have good quality when camera is close to the ground.

    I am sorry if my question are very strange details, but we are trying to bring the best quality possible for our racing game.
    So that is why i have very specific questions :)
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi jujunosuke.

    As long as the width of your road is within reasoanble standards there is no need for multiple textures / materials across the width of the road. What is the width of your road and what texture size are you using? Can you show screenshots of what this stretching looks like on your end?

    If you really want to use multiple materials across the width, you can change the width segments to, for example, 2. Export to .obj and and split the mesh in two mesh groups in a modelling app.
     
    Last edited: Feb 21, 2013
  27. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Some racetrack can have a length of 15 to 20 meters in real life, and spreading 1 texture on 20 meters might not be enough to get good quality.
    But i am just thinking about something that might work for us.

    Is it possible to put a shader instead of a texture ?
    If we use a a detail texture, i can tile the asphalt 4 X 4 and add the detail texture tiled to 1 (to add the white lines on the side of the tracks).

    screen example is from our current work (This is not Easy Roads)
    But i just wanted to show you the quality we expect.


    On our road, we have 4 texture for the width.
    2 pieces of simple asphalt in the middle and 1 piece of asphat with white line on the side of the road for each side.

    I also have s piece of asphalt texture with the starting grid etc...


     
    Last edited: Feb 21, 2013
  28. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Ok, i managed to get the desired effect with a diffuse detail shader.
    As expected the road disapear when camera is far away.

    Can you give us the code we need to add to any shader in order to appear on top of the terrain ?
    Like your easy roads shaders?

    That would be usefull.

    Or maybe add a diffuse detail and a specular or bump specular shader to the easy roads 3D shaders collection would be great addition.

    Anyway, we are going to buy the v2 almost 100% sure.
    We just hope we can do what we exactly want with it.

    Looks like a great product anyway. :)
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, the generated road is an ordinary game object with a mesh filter attached, so you can put your own materials / shaders on the road.

    Have a look at the shader code inside the shaders folder of EasyRoads3D. The line you want to copy to your own shader is:

    Offset -5, -5

    You can tweak the values to your liking. low values will work just fine on flat terrains. On more hilly terrains you might want to use higher values.

    The full version comes with 6 more shaders, bump specular, transparent etc. But as you see above, it is fairly easy to have your own shaders act similar as the EasyRoads3D shaders.
     
    Last edited: Feb 21, 2013
  30. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    I see, very nice.
    The last issue i have is quite strange.

    The fact of having the road collider + the terrain collider make my car acting strangely.
    If i am only on terrain collider or only on the road collider, my car act normally.

    The trick i am doing right now is just disabling the road collider because the smoothed terrain underneeth is pretty much the same shape, but i don't know if this trick will work on more complex cases..

    Do you have any idea about that ?
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Like I mentioned in my previous post, the generated road is an ordinary game object with meshfilter and mesh collider attached. As I don't know your car physics setup and what the exact strange behaviour is, I cannot really tell what is happening. Also because there is no history regarding this with EasyRoads3D generated roads. This is not related to the physics materials you are using on both the road and terrain, right?

    I don't know the current status but before there were issues with the car tutorial project physics, the car wheels sinking a little bit through the road. It turned out that this also happens on a plane primitive, so not specifically EasyRoads3D related. A quick dirty, but working solution, for that was putting the mesh collider a little bit higher. You could try something similar and see if the same thing happens?
     
    Last edited: Feb 21, 2013
  32. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Yeah, i think that basically, because the road is close to the terrain, physics calculation are calculated twice.
    I will try to find a solution for that.

    Anyway thanks for your feedback as always.
    I am sure that every issue I mentioned can be solved by some workaround anyway. So that should be ok for what we are doing.

    I have only played with the free version since now so we are impatient to try the full one and give you feedback on it!
    I hope it will help us on our project!
    Cheers!
     
  33. napalm44

    napalm44

    Joined:
    Apr 23, 2010
    Posts:
    14
    Hi Raoul,
    Long time no post! I had a quick question about sideobjects that I was hoping you could help with:

    1. Is there any way to LOD procedural sideobjects that are welded together? I am using a plane as my side wall in a racing game, so it is desirable for them to be connected and procedural, but the mobile project I'm working on can't handle the large poly counts of the single mesh with 18k + vertices. It would be AMAZING if these could be broken up into LOD segments. Doing instanced sideobjects creates a ridiculous amount of gameobjects and colliders considering the size of our tracks. Maybe there is another suggestion for how to handle this problem?

    2. Is there any way to make sideobjects match up, vertice to vertice, to the road object? We are exploring using EasyRoads sideobjects as our ground (allows for a more consistent look not reliant on Unity's terrain), but getting the "ground" to match up with the road itself is proving difficult, with lot's of overlap and unneveness between the two. Again, other suggestions are welcome.

    Cheers!
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    @jujunosuke, Ok, your welcome ask whenever you have further questions.

    @napalm44, Hi,at the moment side objects indeed do not have the LOD segments optons like the road itself has. It is on the list. meanwhile you could do 2 things. Export to .obj and cut the object in segments in a modelling app. This should be fairly easy. Or you could create duplicates of the side objects and use them on different segments of the track by enabling /disabling them for markers. Although this probably requires some tweaking of the marker positions depending on the side object type.

    Your second question, for the procedural side object type you have 3 options, build the side object according its own spline shape relative to the road shape or, "Clamp Left" "Clamp Right". This will do exactly what is says, the centerpoint of the side object will be vertice to vertice either on the left side or the right side of the road. That is what you need. If you also use other side objects like walls next to the ground it should look just fine. This way you can recreate something like in the image jujunosuke posted on this page. The other solution is to triangulate the ground to the road shape. I have got that working in one of my own projects. It is too limited to the needs of that specific project but I do intend to implement something like that for EasyRoads3D, especially for mobile.
     
    Last edited: Feb 22, 2013
  35. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    Hi Raoul, i have found an issue, it looks like the road doesn't close the right way most of the time.
    see screenshots below.


     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi jujunosuke, what is the setup of your road? What happens when you change some settings like the number of segments or resolution in "Rendered" mode. Does it update correctly?

    Otherwise perhaps you can send me the project (just the terrain and road(s)) so I can look at it?
     
  37. jujunosuke

    jujunosuke

    Joined:
    Apr 30, 2011
    Posts:
    190
    I don't know what's happened, but this problem didn't happened recently.
    Maybe i didn't refresh the road correctly ?

    Seems ok now.
     
  38. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Hi,

    quick question (of a newbie, admittedly, so maybe a no-brainer...): I am playing around with the free version for now just to see how things work in general, and projectors seem to not project on the road surface (but on all terrain or other meshes around). Anything I am missing to make that work?

    Thanks, habitoti
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi habitoti, that is probably related to the Offset shader which is used to render the road always on top of the terrain. First thing to test is, repace the offset shader for something like a standard diffuse shader on the road material. If that solves the projector problem, it is indeed the Offset shader that causes this. What you can try is, add this same line of code

    Offset -5, -5 (check one of the EasyRoads3D shaders for the exact values)

    to the shader used on the projector.
     
  40. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Excellent, that does the job!

    Thanks, habitoti
     
  41. napalm44

    napalm44

    Joined:
    Apr 23, 2010
    Posts:
    14
    Hi Roaul,
    Thanks for all the help thus far. I have what I think is an issue with the way easy roads generated UV coordinates for objects (specifically roads) that most noticeably rears it's head on iOS.

    Basically, I have a normal sized road that is generally pretty straight with some twists and turns. What I am seeing, and far more noticeably on iOS, is the road and side object textures distorting and flickering more and more as I progress through the track. At the beginning it looks totally crisp and clean, but by the end the weird distortions (below) begin to appear.

    Beginning:
    http://i536.photobucket.com/albums/ff328/reeda1283/image_2.png
    http://i536.photobucket.com/albums/ff328/reeda1283/image_1.png

    Towards End of Track:
    http://i536.photobucket.com/albums/ff328/reeda1283/image.png
    http://i536.photobucket.com/albums/ff328/reeda1283/image_1.png

    I have tried a BUNCH of stuff to resolve this:
    1. Setting UNity iOS to use 32 bit display buffers
    2. turning batching on/off
    3. using uncompressed textures, different resolution textures, textures with max anisotropy and trilinear filtering, po2 and npo2, turning mip-mapping off, changing tiling settings etc. The same effect also occurred with multiple different materials.
    4. Ensuring there is no overlap of object with close z
    5. implemented a custom shader with the highest levels of precision for all values (float4)
    6. Messed with EasyRoads UV settings, going both high and low (I am using 1 for geometry complexity FYI). At high values this seemed to delay the effect to further out on the road, but it still happens nonetheless.
    7. Breaking up the track into LOD sections (I was surprised that this didnt seem to do anything at all to how the texture displayed, even though i now had 6 road objects instead of 1.
    8. Started my gameplay at the end of the track. This told me that the issue was not a degradation in quality settings (I only have 1 active setting anyway) after a certain amount of playtime, but with the object/uvs/material settings themselves.

    So, as you I can see, coming here is my last resort. Once I tried the LOD chunks of track and saw literally NO improvement in the artifacting I began to suspect that the issue might be with the UV mapping itself. Perhaps the difference in precision on iOS results in small changes to a certain aspect of each UV, which over many vertices become
     

    Attached Files:

    Last edited: Mar 14, 2013
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi napalm44,

    Sorry for the late reply, for some reason I only today received an email notfication of your post! And with the massive number of posts in this section it is easy to miss out on posts!

    [EDITED]

    First thoughts are this is related to a low aniso level on the road texture. But you mention you are using the highest level right? The uvs on the road are in world space, I don't think there is anything unusual about it and I have never heard of an issue related to this over the last 4 years. Could you send me a simple example by email so I can replicate this issue over here?

    Also, how long is your track? Although I have never heard of restrictions regarding the length of a track it might help me doing some tests...
     
    Last edited: Mar 17, 2013
  43. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    i get this error when i stop of game on editor. i have a single road that is not closed (no loop). it is the latest version of easy roads pro.

    NullReferenceException: Object reference not set to an instance of an object
    Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
    Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
    Boo.Lang.Runtime.RuntimeServices.SetSlice (System.Object target, System.String name, System.Object[] args)
    Boo.Lang.Runtime.DynamicDispatching.SliceDispatcherFactory+<CreateSetter>c__AnonStorey12.<>m__4 (System.Object o, System.Object[] arguments)
    Boo.Lang.Runtime.RuntimeServices.SetSlice (System.Object target, System.String name, System.Object[] args)
    RoadObjectEditorScript.EasyRoadsGUIMenu (Boolean flag, Boolean senderIsMain, .RoadObjectScript nRoadScript) (at Assets/EasyRoads3D/Editor/RoadObjectEditorScript.js:89)
    RoadObjectEditorScript.OnInspectorGUI () (at Assets/EasyRoads3D/Editor/RoadObjectEditorScript.js:55)
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/Inspector/InspectorWindow.cs:863)
    UnityEditor.DockArea:OnGUI()
     
  44. Valois

    Valois

    Joined:
    Sep 5, 2012
    Posts:
    4
    Hi napalm44,

    I got the same texture problem with the road and guardrail towards the end of the track. I also tried a lot of stuff but it didn't work.
    My track is about 5km long. The only way I got the texture fixed was exporting the track and guardrail to OBJ and adjusting the UV inside a 3D software.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Atmuc, what exactly do you mean with "when i stop of game on editor"? After you played a scene and stopped it? Also, is this the latest assetstore version or version downloaded from our website? And how exactly does it affect the functionality?

    @ napalm44 / @Valois, I will post a script that will adjust the UVs to texture space. Let's see if that solves the problem you have on mobile.
     
    Last edited: Mar 18, 2013
  46. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    i got it from asset store. yes, click play (ctrl + P ) and click play again. i deleted road and created again. it works fine now. it would be useful to know solution without delete the road object.

    another question. when i create nodes they are on terrain surface. when i select and move a node, it deforms terrain when i click process terrain button of the road. is it possible to slide node on terrain surface?
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    @ atmuc, it is hard to say what went wrong without more info. In any way I am quite sure there is no need to delete and rebuild the road. As long as you have not "finalized" an EasyRoads3D road object it will switch back to "Edit Mode" after you Play a scene, stop playing the scene and reselect the EasyRoads3D object. This is to make sure the original terrain data is restored correctly. While working on the road it is recommended to use the Cam Fly Over slider in the inspector. This is useful to explore the road quickly and make changes if necessary. When you are finished creating the road you can finalyze it through the main EasyRoads3D menu or you can manually drag out the road game object and delete the EasyRoads3D editor object. This way the road will never switch back to Edit Mode.

    You mean, snap the marker to the terrain height at the new marker position, is that correct? I went through the docs to double check and indeed this seems not implemented. I will add it, let me know if you need this urgently, in that case I can send you a copy of the specific updated script so you can already use it.

    @napalm44, Valois, I did a test on a 15km road. UVs looked fine so I do belief this is a mobile issue. Below you can download a script that will adjust the UVs to 0..1 range and update the texture tilesize accordingly. Simply put the script in the Assets/EasyRoads3D/Editor folder. It will add a new item "Adjust UVs" to the EasyRoads3D menu. Select the road game object and run this script. Over here things look exactly the same as before running the script. I will do further tests for mobile once I get my iOS developer license etc. configured in my Macbook, just installed Mountain Lion, xcode etc... Anyway, I hope the script helps!
     

    Attached Files:

    Last edited: Mar 18, 2013
  48. Valois

    Valois

    Joined:
    Sep 5, 2012
    Posts:
    4
    Thanks Raoul.

    I also believe this is a mobile issue as in my case the texture issue only shows when I publish the game.
     
  49. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    it is not urgent, but if you send before release i can test it. it will be very useful for me.
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi atmuc, can you send me an email or pm with your email address? I was going to send you a PM with updated scripts for snapping markers to the terrain while moving them so you can test / use meanwhile. But it seems I cannot attach a file to a PM...