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. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi rpg_gamer, in my previous reply to your question I gave a couple of reasons when this can happen. Does any of these reasons apply to your situation?

    Can you show a screenshot if that is not the case?

    Thank you,
    Raoul
     
  2. rpg_gamer

    rpg_gamer

    Joined:
    Nov 28, 2012
    Posts:
    214
    it happens on windows 7... just looks like a corrupt image file, and unfortunately the unity window doesn't allow ctrl+alt+print screen :/

    sorry i didn't notice your first reply
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    EasyRoads3D was developed for a great part on Windows 7, that by itself cannot be the problem.

    But, strange, print screen or ctrl +alt+print works fine over here on Windows 7. Both when playing in full screen or windowed.

    You could add a button and do: Application.CaptureScreenshot("screenshot.png");

    But since you mentioned the texture looks distorted only halfway through, this sounds like a similar issue as what can happen on iOS. Have you tried checking "iOS Platform" in "General Settings" and rebuild the road? This fixes the distorted texture issue on iOS, perhaps the same works in your situation as well.

    Are you in the position to test this on another computer? Also, what is the length of the road and what are the uv settings in "Build Mode"?

    Thanks,
    Raoul
     
    Last edited: Mar 23, 2014
  4. Kognitive

    Kognitive

    Joined:
    Mar 14, 2014
    Posts:
    7
    Hi Raoul. I purchased Pro a week or so ago and I think it's an excellent tool with many strengths. I am having a few issues though.

    I'm building a race track with it and I'm finding some limitations with your marker (node) smoothing algorithm. No matter how much I fiddle with the node positions it's impossible to get rid of the little 'wrinkles' that appear at some nodes in many of the curves and straights. I'm trying to create very precise curves - some with a constant radius, others with varying radii and all with elevation changes too. I've seen your posts suggesting adding more nodes or moving the nodes to more equidistant positions but this only solves the problem in a few specific cases, and can take hours of fiddling. Moving a node even the tiniest amount can cause a ripple to appear meters away between the next two nodes. It's not the most efficient method for defining accurate curves in my opinion. It is fine for general sweeping roads across terrain but for race tracks it's just not accurate enough. Please consider adding bezier curve/nodes as an option as that is the most efficient way to define curves that I know of and would make EasyRoads3D a more complete tool.

    Another problem I'm having is that my road objects sometimes jump back into edit mode when I simply click on them in the hierarchy, but at other times they don't. I'd like them to stay built until I actually click on the mountain button. Any ideas how to avoid this problem?

    Also I'd like to download your side objects package but I can't find my serial number anywhere. Where do I find that?

    Looking forward to the new features in V3 and here's hoping bezier's will be in there :).
     
  5. raoul

    raoul

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

    Glad you like it! As we are working hard on getting v3 out, I don't think we should spend time now on changing all this in v2. In V3 you will be able to create perfect straight road segments and constant radius corners / bends. At the moment no bezier's yet, but I can look into that once all is working.

    Yes, the road jumping back to Edit Mode, that is another thing that will not happen anymore in v3. In v2 this happens after you saved code changes or after you played the scene. This is to protect the original terrain data stored in memory. That is why it is recommended to use the Cam Fly over slider as much as possible to explore the road directly in scene view.Also, when you are ready creating the road, you can "finalize" the road. This will remove the editor objects, the road will no longer fall back to Edit Mode. But as said, all this is handled differently in V3, the road will not fall back to Edit Mode unless you want that.

    For the side objects example package, please have a look at the _readme file in the root directory of the imported package.

    Thanks,
    Raoul
     
  6. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    What would be causing the roads to render in front of my tree billboards? The roads are "final", btw. Not edit mode.

    http://i.imgur.com/jelnwla.jpg

    This doesn't happen with other objects, mostly. I have dozens of objects that don't render in front of billboards. But there is ONE (a banana tree asset). So I'm wondering if this a render queue issue? I don't really know too much about shaders sorry.
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi ShinfoK, I am not sure, did you double check the shader attached to the roads and make sure it is not the "Road Edit Mode" shader?

    Thanks,
    Raoul
     
  8. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Cheers for the reply, raoul.

    It's set to EasyRoads3D > Diffuse.

    I have a feeling that it may have been a shader I edited in the past due to having white lines around my tree billboards. But I honestly couldn't tell you what as I don't particularly remember what I changed.

    I know this is not your problem, so ignore if you like, but would you know the easiest way to reset those shaders to default and see if that fixes the issue?

    Edit: I reimported my standard assets... that unfortunately didn't fix the issue.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    You cannot remember which shader you changed? Are you using the default terrain tree billboard shaders or a customized version? I am not a shader expert either, so I cannot make any promises, but if you want I can have a look at your project.

    Raoul
     
  10. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Hey, I reverted back to my default shaders, and it did not fix the issue. I'm now using this custom shader: http://pastebin.com/MWADjKzx

    Still have the issue. So I'm guessing renderqueue? And my project is quite large, and my internet quota is getting very close to shaped so unfortunately I can't upload for a while :/ (yay, australian internet!).

    EDIT: Just repositioned my camera. It's also rendering on top of the actual terrain from longer distances too. I can see it "through" a mountain.
     
    Last edited: Mar 30, 2014
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi ShinfoK, that indeed doesn't look like the default terrain billboard shader. Have you tried this with the default terrain tree billboard shaders? And how are other objects rendering?

    The EasyRoads3D shaders are default Unity shaders, the only difference is that it uses an Offset to avoid z-fighting with the terrain. The values work well in standard situations. Depending on the nature of your scene / your camera angles, you might want to tweak these values a Little bit. For example use lower offset values and raise the road a little bit further above the ground. Unless you raise it + 10cm or higher this is generally unnoticable.

    What you see in your original screenshot with the treebillboards should not happen unless you are in Edit Mode when the edit mode shaders are used. I have never seen that happen with the runtime EasyRoads3D shaders. You can double check that in a fresh new project.

    Raoul
     
    Last edited: Mar 30, 2014
  12. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Hey raoul. Thanks again for keeping on this with me.

    Well as said in my last message, I reimported the default billboard shaders, and it still had this issue. And on top of that, it's rendering in front of the ground terrain, as shown here with the hills.

    http://i.imgur.com/Ib3nHKQ.png

    If I use the default unity shader "Diffuse", it renders as expected, and doesn't appear in front of trees or the ground. I might go through and try to find the differences between your shader and the defaults and create new ones based on them and apply them somehow.
     
  13. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Using default shaders and a slight offset on my gameobject seems to do the trick for now.
     
  14. raoul

    raoul

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

    The only difference between the default Unity diffuse shaders etc. and the EasyRoads3D shaders is the line:

    Offset x, x;

    The applied values are low and should only affect very short distances for terrain z-fighting. In the past 4 years, I have never seen this causing any issues with terrain tree billboards or roads rendering through mountains. Did you change the EasyRoads3D shaders?

    Did you try what I suggested in my previous post, do a quick test in a fresh project, clean new terrain, clean EasyRoads3D import and see if the same thing happens? I always do this sort of things when debugging issues and find / eliminate possible causes.

    Also, what exactly do you mean with " I reimported the default billboard shaders"? The terrain shaders are build in. The way I would test this with the default terrain shaders is by removing (cut/paste to outside the assets folder) any custom terrain shaders from the project so the internal shaders are used.

    Raoul
     
    Last edited: Mar 30, 2014
  15. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Hi, I saw your great tools, it's really impressive.
    I have two questions and I can't find the answer in the videos.

    1. Is it possible to add more than one object on the side of the road ?
    2. Is it possible to add one object in the middle of the road to separate the two ways ?
     
  16. raoul

    raoul

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

    Thank you!

    1. Yes, you can activate as many side objects for a single road object as you want.

    2. Yes, you can do that as well. See the below screenshot taken from the first post in this thread.



    In the above screenshot, the fences on the right and left and the palm tree lines on both sides are also procedurally generated according the road shape.

    Let me know if you have further questions!

    Raoul
     
    Last edited: Apr 8, 2014
  17. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Thanks for the quick and clear answer ;)
     
  18. PrettyFlyGames

    PrettyFlyGames

    Joined:
    Aug 30, 2012
    Posts:
    74
    Hey Raoul,

    Hope all is well!

    I've found an issue where the insert marker no longer seems to work properly. I'm on the Unity 4.5.0F1 beta version and using Easy Roads 2.5.5.1.

    What happens is that when I press insert marker its added as the last marker (same as add marker) and yes I click between 2 existing markers :)

    Any ideas how to solve that or is there something on your end that you can see?
     
  19. raoul

    raoul

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

    I just checked and it seems to work well until I tried inserting a marker between the last two markers. Indeed in that case it was actually added after the last marker. I haven't tested it yet on the latest beta but I think it is unlikely this is related to that version. Is this what is happening on your end as well or does inserting always results in the marker being added instead of inserted?

    Raoul
     
  20. chaozz

    chaozz

    Joined:
    Dec 9, 2012
    Posts:
    48
    Hi Raoul,

    I tried contacting you, but you haven't responded to my mail. I see you are very active in this topic so I figured I'd give it a try.

    I am using an alpha of Easyroads3D V3 you send me quite a while ago. It has it's obvious quircks, being alpha an all.. but I did manage to get my road network layed out in the end.

    Here it is: http://playsurvivalist.com/wp-content/uploads/2014/05/easyroads3dv3_alpha_roadnetwork.jpg

    Now the thing is, I can't finalize the roads for some reason. It starts, but after hours and hours, it still hasn't visually done anything. It does create objects under the Easyroads game object, but other than that it's a no go.

    Is my road network too complex? Too big? Or is my alpha just not ready to finalize yet?

    Can you please point me in the right direction. As soon as I am able to build the roads, I can move on with development of the game.

    PS: I am the Dutch guy from http://playsurvivalist.com :)
     
  21. raoul

    raoul

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

    When did you email me? I usually respond fast on emails, the last email I received from you was on April 14th.

    The old v3 alpha is indeed not stable regarding building the final network but when this process is not completed, you could try restarting the project. First mae sure the road network is in Edit mode and responding to changes. For example, move a marker and see if the roads update correctly. Then try clicking the middle tab again.

    As for the screenshot, that road network should not be a problem. If you want you can also send me the project and I will send it back with everything in build mode.

    Thanks,

    Raoul
     
  22. chaozz

    chaozz

    Joined:
    Dec 9, 2012
    Posts:
    48
    Hi Raoul,

    I have tried the restarting many times over. It's the only solution to get control back over Unity after the road tool becomes unresponsive.

    I will send you the project tonight. Thanks for a great service. Could you PM me the best email address to use?

    Best,
    Elmar
     
  23. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi Raoul,

    is there a possibility that your road asset override my terrain. Im 99% sure that somehow your road tool reverted the state (to an earlier one) of my terrain and override it. I hope you understand that i cannot upload every hour my terrain in the version control, and tools which change my data, my work, without asking, in a hidden way are highly dangerous! My last 2-3 hours work is gone!

    Im not sure that you can reproduce this. What i did was, that i clicked on the road asset unintentionally and it started updating the road asset. This takes for me too long (can be 1-2 min.) and i closed Unity and reopened it again. As i said, the last 2-3 hour work was missing.

    Probably it wasn't your tool, but if it was, then change this behavior. The first time i was successfully with your tool, and then this... :(
     
  24. raoul

    raoul

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

    Manual terrain changes are always permanent so this cannot be related to closing Unity and not saving the scene. I belief this is related to switching back to Edit Mode.

    First, this is the recommended workflow :

    1. create and complete your terrain as much as possible
    2. create the roads and test them switching between Edit Mode and Build Mode
    3. once everything looks good, finalize the roads. At this stage you will only have road meshes in your scene
    4. optionally adjust the terrain further.

    If you follow this workflow you will never loose manual terrain changes. Alternatively you can manually make changes to the terrain with the road objects in Edit Mode. BUT avoid working on your terrain with the road in Build Mode while you know you will switch back to Edit Mode at some time. In V2, switching back to Edit Mode means, restoring the terrain to its status before switching to Build Mode. This is done to avoid that the old road shape etc. is still visible in the terrain when moving a marker. But it also means that manual terrain changes are lost and I assume this is what happened on your side.

    In v3 terrain handling will be further optimized, you will be able to chose how to deal with manual changes when switching back to Edit Mode. But this is a tricky thing anyway, would you want to keep adjusted terrain heights near the road when you switch back to Edit Mode to change the road shape? Chances are that these manual changes will look less good because the terrain deformation has changed. That is why we recommend to wait with manually tweaking the terrain until the roads are entirely finished and ideally are also finalized so they will never switch back to Edit Mode.

    Also, you can deactivate the auto terrain restore in General Settings, activate Mulitple terrains (which does still work well with only one terrain in the scene) and switch off the Restore checkbox. But this is not recommended.

    Raoul
     
    Last edited: May 13, 2014
  25. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592

    Hi Raoul,

    i recommend you do not change the terrain in a hidden way. This is a well known programming rule!!! A company can sue you for compensation, that can be expensive. I don't want to freeze the road on my terrain, because there are always changes and after i dont want to recreate all the roads. This should be the standard behavior: "deactivate the auto terrain restore in General Settings", it is much more better then loosing the ability to change the road in later phases.

    What is worser, revert the meshes and textures under the road (if you remove it), or loosing all your work since the road was created? The first one is okay, for me and understandable, the second one is a dagger in the back.
     
  26. raoul

    raoul

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

    What do you mean with "i recommend you do not change the terrain in a hidden way"?

    As mentioned, EasyRoads3D does not change the terrain in a hidden way. It is all mentioned in the manual. It simply restores the original terrain when the road object is switched back to Edit Mode to avoid the old road shape being visible in the terrain or original tres no longer be part of the terrain after road shape changes. It is done to preserve the original terrain. If you do not want that, you can switch it off as explained in my previous post.

    I think it is debatable whether the restore option should be switched on or off by default. Imagine you spend a lot of time to create your terrain, you do a simple test road accross the terrain and you end up with that road shape in the terrain and also removed vegatation that you carefully added, all because of a road that was only done for testing purposes.... I do think that in general you do want to preserve the original terrain data when switching back and forth between Edit and Build Mode.

    It is one of those things that can be further optimized but I don't think there is a perfect solution that covers all situations especially the area around the road. let's say your vegation settings will remove all trees within a distance of 3 meters of the road. After this is done you decide to add some trees closer to the road almost at the same position as some of the original trees that were removed. Now you switch the road back to Edit Mode. You will end up with trees at almost the same position.

    in v3 terrain height changes outside the "road zones" will be preseved. Height changes inside the "road zones" will probably be optionally preserved.

    Raoul
     
    Last edited: May 13, 2014
  27. seriouss

    seriouss

    Joined:
    Apr 22, 2014
    Posts:
    2
    Hi mkgame,

    I have some trouble with the Terrain popping through EasyRoad road mesh on slopes.
    I tried to adjust the resolution sliders in the EasyRoad Editor and changing the terrain resolution Bias without success.
    I can keep my road over the terrain by pushing the Raise slider really high, but then my road floats over the terrain.

    I'm working on an android project and my unity project is configured accordingly, when I switch platform for PC&Standalone in the build settings the glitches disappear, so it seems to be a platform dependent problem.

    I don't consider using a 'bumped' road, if i could push it a little in-ground that would be even better :)

    Am I missing something ? Is there a way to keep my Road always over the terrain ?

    Thanks
     
  28. raoul

    raoul

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

    As this is for android and you mention this happens on slopes, what is the heightmp scale of yor terrain, terrain size and heightmap resolution?

    The Unity terrain object is grid based, the only way to manipulate heights and flatten the terrain according the road shape is by changing the height of the terrain points. EasyRoads3D does take the heighmapscale into account but especially on slopes and reasonable height differences over short distances it gets harder to accurately flatten the terrain on bigger heightmap scales. Is this indeed what is happening? Does this problem disappear when avoiding stronger slopes or using a higher heightmap resolution?

    The strange bit is that you mention this does not happen when building for PC Standalone which could mean this is shader related. But over the past 4 years this has never been mentioned before. Does this happen with the cam nearby or on road segments further away from the cam? In that case you could try different offset values in the shader.

    Raoul
     
  29. seriouss

    seriouss

    Joined:
    Apr 22, 2014
    Posts:
    2
    $PC.jpg $android.jpg

    Here are the two screenshots from the same camera angle, I only switched platform to android
    I'm using a heightmap resolution of 513, when i push it to 2049 it does help a little but the problem doesn't disappears completely with strong slopes.
    You can reproduce my problem with the default terrain by drawing a rollercoaster-like road.
    The glitches are mainly visible a close distance, increasing the offset in the shader also helps, but doesn't solves the problem completely.
    I can't flattern the path too much as I need strong slopes for my project.
    Thanks for your help
     
  30. raoul

    raoul

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

    Perhaps the Offset shader does have a slightly different result on android, I cannot test this myself.

    This indeed seems to be quite an extreme slope. In general a 513 heightmap resolution on a size of 2000 means an heightmapscale of about 4, 4 meters between terrain points. This is the accuracy level you will get. In general you will be fine but but keep this in mind especially for extreme road height changes over short distances.

    But does this always happen at the bottom? In that case,could you double check the following, the road has quite an extreme slope downwards to what seems to be the bottom of the terrain. Is that indeed the bottom where the terrain height matches the terrain object Y position? In that case, it could be that the spline curve actually slightly moves below the terrains Y position. Terrain heights are stored in decimals from 0 to 1. This means it is technically impossible to apply negative values and deform the terrain to below it's Y position. Could you try moving the markers at the bottom of the slope slightly upwards to make sure the road is always above the terrains Y position? But I am not entirely sure if this is what is happening because the far end part of the terrain that pops through the road seems to be a little bit higher above the terrains Y position.

    And, what road resolution are you using? The higher the resolution the more accurate the terrain deformation will be.

    Raoul
     
    Last edited: May 22, 2014
  31. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    521
    I think it is independent of the slope. I have similar things for my road on Android and it is not steep at all. I solve it by moving the markers around randomly until the terrain does not shine through anymore or adding something inbetween. I thought it is a general issue but when it only applies to Android (didn't test on PC) then this should be investigated.
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    I just tested this and indeed the results are already different in the editor when switching to Android build. Assuming the results on a actual android device are similar, it seems the offset in the shader has less effect. But contrary to what seriouss wrote, the terrain is at some spots partially visible through the road away from the camera. Close to the camera everything looks just fine.

    As it is already late over here, I will look further into this tomorrow...

    Raoul
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    It seems that z-fighting in general indeed can be an issue on Android. There are several threads about this on the Unity forums.

    First of all, Turning off “emulation” in Edit > Graphics emulation fixes the z-fighting issues in the Unity Editor although to me that seems a logical result but apparantly what you see is an emulation. Unfortunately I am unable to test this on an android device. Are the z-fighting issues on the actual device similar to those that can happen in the Unity editor? It is an older post, but some people mentioned that the z-fighting issues do not happen on the device itself, only in the editor, http://forum.unity3d.com/threads/104133-Crazy-Z-Fighting-in-Editor

    Here are some suggestions to improve the results in the Unity editor:

    - As mentioned in my previous post regarding this, avoid markers at or very near to the terrains y position (by default 0), you can do this by first flattening the terrain at for example 10 meters before creating the terrain. Or by simply raising the marker a little bit after adding it to the scene.
    - Raise the road a little bit further then the default 0.01 cm
    - Avoid strong slopes over short distances.
    - Increase the negative offset values in the used road shader.

    - In the various threads about z-fighting issues on Android suggestions are made to force 24bit depth for the display buffer in the Android player settings. Also suggestions are made to decrease the cams near and far clip planes. But I could not notice a difference in the Unity editor.


    To seriouss specifically, if you need extreme slopes and indeed there are also z-fighting issues on the actual device, then you could consider using the side objects system for the actual road. Have the terrain flattened according the original road shape but remove this gameobject or disable the renderer when finished. Instead create a sideobject to replace the road and move it a little bit upwards. Then use additional side objects on the left and right side of the road pointing sideways and downwards so they connect with the actual terrain after a specific distance.

    Depending on your terrain texturing, there are a couple of shader packages available that allows you to blend these meshes with the terrain for a fluent transition although I, myself, do not have experience with them so I cannot tell about performance on mobile devices. You could also blend the road shape into the terrain using one of the terrain textures (see Inspector controls when the road object is in Build mode) and use a similar texture on the two side objects connected to the road so they blend nicely with the terrain.

    Raoul
     
    Last edited: May 23, 2014
  34. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello,

    I was using side objects feature to make fances around residental buildings. I want to make prefabs with houses that have fences, trees, some grass and building together in a game object, so that i could just create from that prefab to earn some time.

    What i did;

    Made fence around building with easyroads.

    Put building and fence in a parent gameobject

    Made it a prefab

    It looks perfect in project panel, also if i drag it to screen, it works right as i want it to. Everything looks perfect.

    But if i want to modify the fence, and i click on either a marker or roadobject, the roadobject with all fences teleport to the first location I have built them. To the location i have initially drawn the prefab on. It means, whereever i create the gameobjects from prefab, if i click on roadobject, it teleports them to same area, where they were originally drawn. I guess easyroads saves the position of that roadobject before creating the prefab, and doesn't care of where i create gameobject.

    Here is an example of prefab i am creating.

    https://www.dropbox.com/s/isz0bvnf1ktb4yo/Screenshot 2014-06-04 21.07.49.png

    Thanks in response.
     
  35. raoul

    raoul

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

    I am not entirely sure where things go wrong for you. Do you mean you create a fence then you turn that fence in a prefab and afterwards you move these prefabs and want to modify marker positions? In that case, EasyRoads3D objects are always positioned at (0, 0, 0). This could indeed cause problems if you are actually repostioning them by moving the prefab parent object. I actually never tried that. Is that what you are doing?

    Or is indeed something else going wrong? If you want you can send a simple example project to my email or PM me so I can see myself what is happening.

    Thanks,
    Raoul
     
  36. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    I make all objects in that image a prefab. I store it in project folder. When building a map, i have prefabs like that ready to put in the scene. I just put the prefab to the scene, and this way, house, trees, walkway, bushes, some other props are put in the scene from a single prefab. It makes everything faster.

    I used to make fences manually with getting them in scene, and vertex snapping. It takes a lot of time and i decided to use easyroads so i can modify the fences much easier.

    But, i make the prefab, and when i drag it to scene, it looks perfect with everthing on it, including roadobject (the fences)

    But whenever i click the roadobject, Fence with roadobject teleports to the position it was originally created before being put in the prefab. Fences spawns to where i have built the fences the first time.
     
    Last edited: Jun 6, 2014
  37. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Easyroads saves position of markers in it's own hidden file or script as i understand. And whenever i click roadobject in my prefab object (which is in the scene) It teleports markers of fences to the position of where i have drawn them in the beginning.

    If still unclear i will record a video.
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    EasyRoads does not store marker positions or has hidden scripts that restores marker positions. But the main EasyRoads3D objects are locked to (0,0,0). So if you move the prefab and afterwards select the road object the code will verify if it is still at (0, 0 , 0). If not then it will be put back to that position and the markers will very likely keep their relative position to the parent so they indeed will move back to the original position. It seems this is what is happening.

    I don't think this locking is for a specific reason other then preventing that you accidently move the main object resulting in the full road moving and therefore not matching the terrain anymore.

    So if you really want to be able to move it, what you could do is remove the following line in Assets/EasyRoads3D/Editor/RoadObjectEditorScript.js. Do a Search > Find, for:

    Code (csharp):
    1.  
    2. if(target.transform.position != Vector3.zero) target.transform.position = Vector3.zero;
    3.  
    Does that help?

    Raoul
     
    Last edited: Jun 7, 2014
  39. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    That worked perfectly, thanks a lot :)
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Glad that worked!

    Let me know if you have further questions...

    Raoul
     
  41. fivearchers

    fivearchers

    Joined:
    Apr 17, 2009
    Posts:
    716
    Was going great making an awesome race track, but then ER pooped the bed or something and lost all my work going back quite a ways - like it lost some height map changes and all the texture map changes. Any idea on what might cause this and how i can prevent it in the future?

    edit: tried the restore function and it's now deleted all the trees too?
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hello fivearchers,

    Do you mean, you build the final road and flattened the terrain through the middle tab, then you made terrain changes without finalizing the roads first and switched back to Edit Mode? In this case, yes, in v2 the terrain will revert back to the the original state before flattening the terrain. This is to preserve the original terrain. let's say you want to modify the shape of the road, you don't want to have the old road shape still visible. That is why the terrainis restored.

    You can disable this "restore" function by enabling "Multiple Terrains" and disable the "Restore" option. But this is not recommended. The recommended workflow is, build your roads, switch between Edit and Build Mode to test the final road and terrain deformation. Once everything looks the way you want, you can finalize the road object and optionally you could keep a backup of the full EasyRoads3D object but disabled. This way the road will never fall back to Edit Mode and you can safely make changes to the terrain.

    With "Restore function" do you mean the terrain back up / restore function? When you create the first road object in a scene, the terrain(s) in the scene are auto backed up. When you use the restore option it will use that data. So if you changed the terrain afterwards and you did not manually update the backup, using the restore function will put the terrain back to the state when the backup was made. I assume that is what happened?

    So, if you always want to have a fresh back up of your terrain, use the EasyRoads3D terrain backup option after manual changes. You can also quickly create terrain backups by simply duplicating the terrain object in the project panel.

    Raoul
     
    Last edited: Jun 19, 2014
  43. fivearchers

    fivearchers

    Joined:
    Apr 17, 2009
    Posts:
    716
    OK good to know before I really do something important with it! Thanks!
     
  44. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    does this work for mobile does it batch the objects or make static if it is not using these it will not work for mobile devices
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi unitywlp. The final objects are ordinary unity game objects. You can make them static and batching will work just fine.

    Thanks,
    Raoul
     
  46. jeango

    jeango

    Joined:
    Dec 19, 2012
    Posts:
    109
    Hi Raoul,
    First and foremost, great asset, fills many needs thanks for that beautiful piece of work.

    In the fly over cam demo video http://www.unityterraintools.com/flyover_v2.php you add a bridge sideobject. It appears from the video that the bridge is only generated on bridge portions of the road (and also there's a start and end geometry to your bridge).

    I've tried to find a way to configure my side object to replicate that, but can't. whatever i do, side objects generate along the whole road. How did you do that?
     
  47. rob.whitten

    rob.whitten

    Joined:
    May 21, 2013
    Posts:
    3
    Does anyone else have issues with roads rendering over models when you move further away from them or zooming in and out by changing the FOV of camera? When I fly around the scene I see roads cover car wheels and buildings from different angles until move right up on them. I tried adjusting the shader to reduce the offset values with no luck. I just get roads flashing now. Anyone seen this issue or have any suggestions?
     
  48. LaJolly

    LaJolly

    Joined:
    Aug 12, 2014
    Posts:
    12
    Hello, I am running into a really unique issue. I was able to successfully create roads for a good few hours with the paid easyroads3D tool, but after creating around 80 roads (this is a HUGE scene), the roads suddenly started corrupting. When I select a road that I already created, the pre-view mesh I had created will pop out of the prefab/object that is automatically created when using the tool. This same issue of the mesh becoming detached will occur when I try to create a new road as well. I have tried re-starting Unity, re-starting comp, re-importing the easyroads3D package, and trying to create a road on a new terrain and nothing seems to work. Did I accidentally change some setting? Am I running into issues because of the massive amount of roads I have? Thank you in advance!
     
  49. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Hi there, I need to find a way to have masked areas on a road, part tar seal, part dirt. Is this possible?
     
  50. austint30

    austint30

    Joined:
    Jul 1, 2013
    Posts:
    72
    When I use Easyroads3d, I want to make a low poly road. I set the complexity to 5 and that was good enough, but when I finalized it it had so many polys that the road was just blue from selection box lines! Please fix this bug, omg the lag.