Search Unity

Track BuildR - Generate race circuits within the Unity editor

Discussion in 'Assets and Asset Store' started by jasperstocker, Sep 26, 2013.

  1. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    I'll take a look into Racing Game Kit, it has a free version... :D
     
  2. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
  3. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
  4. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    It's up on the store!
     
  5. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Yay - so it is...
    So a word to the wise - there is no direct upgrade for tracks generated in 1.0.
    There is a simple but not direct process
    Email/PM me and I can walk you through it.
    Backup your projects obviously before you take the dive.
    Loops and jumps are here...
     
  6. cyberheater

    cyberheater

    Joined:
    Mar 24, 2014
    Posts:
    9
    Any chance you can put this on a promotion. Money is a bit tight at the moment.
     
  7. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    @cyberheater, I'm afraid it was on sale in February so I don't think it will be on sale for a while now.
     
  8. cyberheater

    cyberheater

    Joined:
    Mar 24, 2014
    Posts:
    9
    Thanks for letting me know.
     
  9. eightmode

    eightmode

    Joined:
    Jul 22, 2013
    Posts:
    5
    Hi Jasper,

    Just a quick question about the XML import option on Track Buildr. Can you import Google Earth KML files as they are based on XML?

    If it's not the case would you consider it as a suggestion for a feature in later versions?
     
  10. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    What would you want imported? I thought it was mostly for placing map reference markers and making tours of the world rather than any specific data.
     
  11. eightmode

    eightmode

    Joined:
    Jul 22, 2013
    Posts:
    5
    It's routes specifically, my apologies i should have mentioned that.

    The reason comes from a common workflow in Bob's Track Builder. To give you an example - I would first plot/trace a route of circuit or a point to point (such as a rally stage) in Google Earth, export the KML file and add elevation data, then import the KML file into Bob's Track Builder. This gives you a fairly accurate track to build on with relatively accurate elevation and track length.

    This link gives a step by step of what i mean: http://simtrackipedia.wikidot.com/making-a-rally-stage-with-height-data-in-btb
     
  12. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    That sounds like a great idea. I'll add it onto the list and look into implementing it. Thanks
     
  13. eightmode

    eightmode

    Joined:
    Jul 22, 2013
    Posts:
    5
    No problem, thanks for producing such a great asset. Unity has been crying out for a decent track editor for a while.

    If you need any KML file examples of tracks with the elevation data i mentioned please let me know, i'd be happy to send some across if it's of any use.
     
  14. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    That would be SUPER helpful - thanks! :D
     
  15. eightmode

    eightmode

    Joined:
    Jul 22, 2013
    Posts:
    5
    I've just sent you an email to the address on your site with a couple of examples attached - hopefully they'll be of some use :)
     
  16. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Great - thanks eightmode - I'll take a look
     
  17. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Good news everyone.
    I've got this working.
    Importing Google Earth KML files to create tracks will be in the next update.
     
  18. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Google Earth KML files are now supported and it's up on the Asset Store. I've also added Unity Material support on top if the Generated and Substance Procedural materials.
     
  19. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Excellent work Jasper. Just the terrain integration missing now, or not even terrain, just geometry to fill in the ground areas would help. :)
     
  20. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    @derkoi - that is indeed coming very soon.
     
  21. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks Jasper, looking forward to it.
     
  22. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Just a quick question, how can I change the height of the barriers around the track, not the colliders but the visible graphics? Thanks
     
  23. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Go to the paintbrush and modify the boundary height. It's on a per curve basis - but now I'm thinking it should have a track wide setting / override.
     
  24. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks, yeah track wide setting for the boundary height and track width would be a good idea.

    Also, I tried importing BuildR to add a few trackside buildings but I got a few errors relating to duplicate scripts. I'm not sure which ones to remove, from the Track BuildR folder or the BuildR folder but once I remove them, I get another error relating to a script being missing.

    Are they compatible with each other?
     
  25. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Hmm - they were compatible when I last checked.
    I'll look into this and get back to you
     
  26. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Dear Track BuildR people,
    The latest version I have cooked up contains the fabled terrain support many have asked for. I'm not 100% happy with it, but I think it's 90% there. I've also made a few more tweaks and additions. If you want to get a copy PM/Email me. I'd love to get feedback on the new version.
     
  27. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    So after all the requests and ugliness, only one person stepped up to try out the new terrain support?
    Pfffff ;)

    Anyway, a new version of Track BuildR is hitting the stores soon...
    ADDED Terrain Merge Support
    ADDED Fit Track to Terrain
    ADDED Stunt Mode options to allow easy one button click stunt part addition (loop, jump, twist jump)
    ADDED Preview options for forward/reverse and where the start point is.
    ADDED polycount display for track
    Fixed preview not accounting for track position
     
  28. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    I would of tried it but I've been on holiday all last week.
     
  29. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Hi all - you can now update TrackBuildR in the asset store to receive Terrain Support. I'd love you hear feedback and further suggestions
     
  30. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    TrackBuildR looks like it has come along nicely! I have a project I might do in the future where this could help, so I've been keeping an eye on it.

    In particular, I like the addition of the stunt support and the terrain support. My goal would be to make a fantasy freeway where cars in a mixed urban / natural setting can zoom along on crazily curved roadways.

    Part of the idea would be to integrate TrackBuildR with EasyRoads3D and/or Road Architect, so the transition from normal urban traffic to super-urban traffic would go smoothly.

    Anyway, good job! :)
     
  31. ChevolDavis

    ChevolDavis

    Joined:
    May 5, 2014
    Posts:
    3
    Great job jasperstocker on the asset! Track Buildr is really going to help me out in my game. Is there any simple documentation or a tutorial on how to use the Terrain Support?
     
  32. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Thanks Chevol Davis, I need to get round to this - hopefully this week. It's pretty straight forward though, at least I thought it was... :)
     
  33. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    Not sure if anyone else has experienced this:

    $oops.png

    At first I assumed the terrain code wasn't accounting for a non-zero Y position on a terrain but my terrain is at 0.
    I've spent zero time diagnosing this but it looks like it's only getting the exact area under the road surface correct, which is then being added to zero. Everything else that it's supposed to be merging is coming out zero.

    Also,

    Do I see code that attempts to deform the road to the terrain instead of the other way around? If so - awesome. I had suggested to another road system dev that they might want to consider adding a terrain height follow option with a max grade setting (possibly a randomization range on this as well). Such that we can simply place a track point on the surface of the terrain and have the road automatically follow the grade of the terrain (filling valleys and lowering crests as dictated by the max-grade) between two points. I'm guessing this would require having the system simply procedually add points (since multiple elevation changes between two points would not work in the current architecture.)

    But of course, I'm against glassy smooth roads so I'm always going to be looking for ways to add some interesting details - if the terrain follow/deform algorithm also sampled at multiple x-coords along the width of the road (such that a small hill on the right side of the road might produce a bump on the right side only) - that could be pretty tasty low hanging fruit.

    My last suggestion would be registering an undo for the terrain merge.
     
  34. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    I'm - I've certainly not - could you provide more details? What are your terrain settings? Is your track a 0? I'll have a play around myself but I have no idea what would cause this right now.
    In the terrain section there is a second section that fits the track to the terrain. It's not as complex as your plan but it'll get you started.
    As for smooth roads - would a simple noise addition be to your fancy - it's something I might add to the list...
    And Undo on terrain. I've had a thought that will be a good temporary solution - but the Unity undo functionality seems to be unstable when dealing with such a large amount of modified mesh data.
     
  35. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    Technically there is a fair bit going on with my terrains so I just created a blank terrain and was able to reproduce the issue (New Terrain > Transform 0,0,0 > Paint some height on it > Place Road (non zero height) > Assign Terrain > Merge Terrain). I could try a blank project if you can't reproduce it on your end - I don't think I have anything around that could cause this but you never know.

    $base.png

    Some noise generators might be a good addition but I'm afraid the reality is even a fantastic implementation will only get you so far. If you could offer a system to procedurally place pre-generated (bounded random scale, rotation, x-position, frequency) and/or manually place details like patches, pot holes, seams and such - you'd be operating on a world class level. Although almost none of us are in a position to laser-scan anything (ala iRacing), a similar system (with essentially modular details) is being used to great effect in BeamNG.Drive (they are using a heightmap + projection but it could work just as easily with a mesh). The days of a perfectly smooth road surface being acceptable for anything but arcade are nearly behind us.

    And yeah, Unity's undo does get fairly unstable, a quick and dirty compromise might be to just stop registering events at a reasonable count? That way you could still at least undo small changes.
     
    Last edited: May 21, 2014
  36. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    You will also probably want to add distances from the track to clear Detail Objects and Trees. Separate distances for details and trees. And to produce a slightly less perfect roadside I would suggest a random range for the distance with adjustable frequency and dampening. Also it might be fun to add gradient and noise for detail objects that you clear but, perhaps overkill.
     
  37. Danz112

    Danz112

    Joined:
    May 20, 2014
    Posts:
    39
    Hello!

    I just bought this, I have a problem: can you explain me how I'm supposed to use the KML function?
    Because I tried to make a route on google earth, then copied the result in KML code with the apposite button, and pasted the code on notepad. Saved the file as KML.

    Then I tried to import it in BuildR but it just creates two short segments. Then if I click on the first GUI Button it says that there are no track points, but I can't add them as before I can do that Unity crashes. I tried again but this time for example on the texture gui it says "There are no textures defined. Track will not enter render until this is done" - but there were actually.

    Oh and last thing: I had "loop" deselected. If I do the same thing while leaving it, it just doesn't create anything at all.

    Basically, it's possibly my fault that I did not get the KML route correctly I guess but I just wanted to make it known.
    edit: I just tried without going through the copy-past. Just right clicked on the saved route and went to "save as... kml". Same result.

    btw: not to be that guy, but you should update your documentation on the website... just a suggestion :)

    Thank you
     
    Last edited: May 29, 2014
  38. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    dear Andyzano,
    Thanks for your post, I think you just emailed me. I'll look into this as soon as I can.
    I'm that developer though - always behind on the documentation! :( sorry about that. I will update...
    Next few weeks are going to be mostly impossible to do much work as I'm moving countries with a 9 month old :S
    fun times.
     
  39. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    Just a small note that I'm in the process of moving countries at the moment so I'm going to be a little slower at replying to emails, fixing anything that needs attention and so on. I really appreciate your patience during this time but I'll be back to 100% by end of June
    Jasper
     
  40. ChronoRider

    ChronoRider

    Joined:
    May 7, 2014
    Posts:
    14
    Just bought this,

    When I try to transform the track with the standard Unity transform tool, if I click to the track builder it automatically resets the scale.

    Is there a way to fix this?
    E:
    Found the solution with track point, but having a lot of trouble with boundaries showing up in the middle of the track.

    E2:

    Found a way to fix the boundaries, have to adjust the control points
     
    Last edited: Jun 7, 2014
  41. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hi any way for mark track with gameobject maker for irds ia

    for (int i = 0; i < count; i++) {
    Vector3 npos = map.track.GetTrackPosition ( i/count);
    Vector3 nrot = map.track.GetTrackDirection ( i/count);
    GameObject obj = Instantiate (new GameObject(),npos , Quaternion.Euler(nrot)) as GameObject;
    }

    i got this but i look missing somethink's
     
  42. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    I think you'd want to use Quaternion.SetLookDirection and use the track direction and track up.
     
  43. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Yes ! as you know Quaternion is reputed for killing noobs like me so

    Vector3 nrot = map.track.GetTrackDirection (check);
    Quaternion nrot2 = map.track.GetTrackUp (check);
    Quaternion frot = Quaternion.LookRotation (nrot,nrot2.eulerAngles );

    give very strange result to close to the goal is already that's
     
  44. Danz112

    Danz112

    Joined:
    May 20, 2014
    Posts:
    39
    hey Jasper, sorry to bother again but... have you looked into the KML importing? I have not updated the tool yet so I don't know if you have fixed it but I bought it mostly for that..
     
  45. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    @Andyzano - update and let me know. It should be fixed but if not - ping me and I'll look into it :)
     
  46. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    and for me lol :(

    Vector3 npos = map.track.GetTrackPosition (check);
    Vector3 nrot = map.track.GetTrackDirection (check);
    Quaternion nrot2 = map.track.GetTrackUp (check);
    Quaternion frot = Quaternion.LookRotation (nrot,nrot2.eulerAngles );

    not look working perfect
     
    Last edited: Oct 5, 2014
  47. steel

    steel

    Joined:
    Nov 20, 2012
    Posts:
    8
    hi Jasper , i saw the video. Is it possible to replace the plane used for the crash barrier with a 3D model?
     
  48. jasperstocker

    jasperstocker

    Joined:
    Jul 7, 2010
    Posts:
    429
    It's not I'm afraid. It's on my list but I've not got around to adding it. Can't give a date when that would be added though
     
  49. steel

    steel

    Joined:
    Nov 20, 2012
    Posts:
    8
    okay.Thanks.
     
  50. emergki

    emergki

    Joined:
    Oct 15, 2007
    Posts:
    422
    @jasperstocker , I'm having these problems:

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(142,63): error CS0309: The type `TrackBuildRPoint' must be convertible to `UnityEngine.ScriptableObject' in order to use it as parameter `T' in the generic type or method `UnityEngine.ScriptableObject.CreateInstance<T>()'

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(166,51): error CS0309: The type `TrackBuildRPoint' must be convertible to `UnityEngine.ScriptableObject' in order to use it as parameter `T' in the generic type or method `UnityEngine.ScriptableObject.CreateInstance<T>()'

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(313,20): error CS0200: Property or indexer `TrackBuildRPoint.trackDirection' cannot be assigned to (it is read only)

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(407,64): error CS1061: Type `TrackBuildRPoint' does not contain a definition for `cant' and no extension method `cant' of type `TrackBuildRPoint' could be found (are you missing a using directive or an assembly reference?)

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(407,77): error CS1061: Type `TrackBuildRPoint' does not contain a definition for `cant' and no extension method `cant' of type `TrackBuildRPoint' could be found (are you missing a using directive or an assembly reference?)

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(407,47): error CS1502: The best overloaded method match for `UnityEngine.Mathf.LerpAngle(float, float, float)' has some invalid arguments

    Assets/TrackBuildR/Scripts/TrackBuildRPitLane.cs(407,47): error CS1503: Argument `#1' cannot convert `object' expression to type `float'

    What can I do?