Home Technical Talk

Track AND Terrain

polycounter lvl 8
Offline / Send Message
retmia polycounter lvl 8
Hello Guys/Experts ...
I have a question about the creation of a racetrack environment that I can't figure out. For a future car game project, I'm anticipating the best way to build a nice track (not only a track but a road network over a terrain) ... I've checked out as much youtube tutorials I could find about that matter but they were never totally convincing. For several reasons:

- Poly technique is really tedious : complete manual creation based on polygon editing ... it allows a total control of your wireframe but is really time consuming and not flexible at all. Plus there's an enormous work of unwrapping behind.
- Terrain approach is not very precise : a road (build with a renderable curve or a loft) is applied over a terrain, but the road loses its horizontality over its width wich is not what cars like to drive on ... there are some way to break the terrain around to compensate that, but then you get some poor topology.
- You can texture draw your road over your terrain, but that's the worst we can imagine : the polygon flow doesn't follow the track, wich will make cars bump on a sloped curve ... plus the border of the road will be too much blured.
- There are also some software that can do the job, but missing control and exporting way too high poly models ... and I would like (if possible) to only use 3DS Max (or Maya, or Blender).

I think the curve technique is a good approach as it's fast and flexible. You can build your track and then quickly export it from 3DS to Unity to check the driving feeling. Though it has some overlap on straight corners (that can be manually corrected after ... but maybe there is a way to avoid that / correct it fast ???) Anyway that's not a very big matter because I plan to build road intersections ... so I will have to do manual adjustments.
But as I plan to make an entire road network, I'd like to be able to do it as fast as possible, but also very very clean (keeping the polygon flow to follow the road)
+ If possible to also control the polygon flow over the terrain : a road with ditches on the side, crossing in diagonal a polygonal grid, will give some very poor results ... so that's why it seems to me important to have a good flow over both the road and the terrain.

So if you guys know some (really) good tutorial on track + terrain creation i'd love to find some answers.

Actually I found some pictures over the internet showing more or less that ideal :
That's what Bugbear's artists did on the first (good old) Flat-Out ... It's just brilliant how the flow follows both the track and terrain ... it's so beatiful and smooth that it even seems to be flexible (but I must be dreaming) ... Do you have an idea on how they appoached it ? How would YOU approach it !?

sahtF.jpg
oDOBJ.jpg
ftN6g.jpg
JXbBz.jpg

Pictures found here : http://community.bugbeargames.com/index.php/topic,25.0.html

Thank you in advance to any one who may be able to light on my lantern !
:):):)

Replies

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    ftN6g.jpg

    This one looks like the terrain is just a grid with the road merged into it. You could make a terrain with zbrush/world builder, make a grid deform to it, and then draw the tracks with curves on top of it, extrude the road surface along curves, play with the curves until they work well, and then merge them together.
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Well thank you but, is that what you mean ?? : [ame="http://www.youtube.com/watch?v=hmTQJa79apo"]Uru Modding - 3D Max Tips - Conform Mesh - YouTube[/ame]

    It's ... very far from what is achieved on these screenshotse. Road can't really be placed on top of the terrain, because it has to have a thickness of zero or an almost invisible thickness, to not look cartoony. Because if the road is on top of the terrain with a low thickness, terrain will pass through the road on some places, and the road will somestimes fly ...
    And again, a terrain based on a grid will do very bad results on diagonals cliffs and diagonals ditches, etc. That's why I'm impressed with their work because the topology litterally follows every form. It's more noticeable on the first screenshot.

    Maybe you mean cutting the mesh with curves ... but then you don't get the poly flow ... ?

    But if you know how to merge two topologies so the path of the road overides the terrain's grid, then I'm interested ...
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    In fact, simplified, the deal is to manage to merge those two forms, making the blue disappear under the yellow ... and by maybe auto merging the points on the border with a priority on the yellow so it remains preserved ... but I have no idea on how to do that ... :poly122:

    3eWK121.png
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    in maya you can deform geometry using a curve so i would build my road ontop of the terrian, use on of it's edge loops to create a curve, than use that curve with the wire deformer, to push and pull vertices of the underlying terrain mesh to the same level as the road.

    also real roads have thickness, so give your road some thickness so it can clip into the terrian a little with out z-fighting issues.

    if it is a dirt road with no thickness, than dont bother with a seprate mesh, just flatten out the terrian and use a vertex blend for a different texture on it.
  • Mitch Cosgrave
    Options
    Offline / Send Message
    Mitch Cosgrave polycounter lvl 17
    While working on Need for Speed Shift : 2 (iOS) we had a bunch of modular track pieces that we could snap together that consisted of accurate unit spacing. So, for instance we had straight sections consisting of 4, 8, 16, 32 units. We also had corners, chicanes in a similar fashion, but the point is that they were all modular in a way so we could easily make changes without having to re-model specific pieces.
    Of course there was some unique parts which we had to take into account, but for the most part the modular stuff worked really well.

    The key point of this workflow was that the designers could use these to block out the track sections and test them quickly for the gameplay/design stuff. Once the track was finalised by the designer we (artists) would go about filling in the terrain props and all the other roadside props. This usually consisted of modular props which we built aligned to those track pieces.

    Personally I loved this method compared to doing it uniquely the whole way through as we were able to make changes easily, and wouldn't lose huge chunks of work if there was a change to the level design.

    Hope I helped,
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Passerby : That's an interesting function that maya have here, I wish 3DS had a similar one, but it doesn't solve the polygon flow problem near the road, like it is done on the screenshots. Because there will be some on road action, and some off road action. And terrain is the key for smooth gameplay transitions. If the terrain has a polygonal "grid type" flow, then there will be some topological troubles on the diagonals ... let me show the problem :

    jGuhyss.png

    Mitch Cosgrave : I though about modular approach, but as I really want an organic feeling of the place, plus as it will be not flat at all ... I think it's not adapted, but for the building parts, then yes, I will definitely use some modular technique ! Also, the aime is to create a road network, that has to be filled with terrain, so some offroad is allowed when you choose to not follow the roads ...


    Maybe the only way is actually to make a manual retopology of whole the thing, with 3d coat or something ... To keep the polygon count low and have a nice polygon flow along strong terrain variations.

    Anyway, thank you guys for your answers :)
    Anyone has another idea ?
  • easterislandnick
    Options
    Offline / Send Message
    easterislandnick polycounter lvl 17
    On Split-Second we lofted a track which could easily be edited for play testing. Once it was locked down we converted it from spines to polys and then modelled new sections in-between the track snapping to the verts on the edge of the track. Hand modelling it means you can have a bit of detail track side where it is seen and reduce the polycount further away from the track. In third or first person racers its amazing how little detail you meed in the mid distance. It's all about what is directly either side and over the track. Think of them like detail tunnels! The very distance is usually low poly but has had some time spent on it in terms of silhouette and textures. World machine is good for distance mountains.
  • foosart
    Options
    Offline / Send Message
    retmia wrote: »
    In fact, simplified, the deal is to manage to merge those two forms, making the blue disappear under the yellow ... and by maybe auto merging the points on the border with a priority on the yellow so it remains preserved ... but I have no idea on how to do that ... :poly122:

    3eWK121.png

    I'm looking for a way to do exactly the same thing. If anyone has any ideas please share. THANKS!
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    You're aware that the terrain on those screen is heavily manually made ?
    Curve for the track, grid for terrain, conform/skinwrap, boolean, ant stitcher, elbow grease to adjust everything.
  • foosart
    Options
    Offline / Send Message
    Yes I'm aware of that. I'm not working on a race track. But I create golf course terrains. It would be great to be able to create a strip of quads like above, then automatically merge and stitch it to the underlying surfaces. This way I could break out sections in the terrain for sand, paths, etc.

    I currently create it all manually.
  • McGreed
    Options
    Offline / Send Message
    McGreed polycounter lvl 15
    Maybe you could make use of this script for it:
    http://www.itoosoft.com/freeplugins/glue.php
  • foosart
    Options
    Offline / Send Message
    Thanks, that is a nice tool for draping. What I need is something to merge the new surface with the old.
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    easterislandnick : Thank you very much for sharing the workflow and advices :)

    Noors : Thank you for the quick tips hidden in your comment ! :) Actually what you said was what I deeply wondered ... So that's really elbow grease ... ! There's no magic behind. I have the idea to try to combine a displacement map to a plane with a topology following the track and relief curves ... That's the cleanest and fastest thing I can figure out in my mind for now ... Will have to give it a try as soon as possible.

    Foosart : In the world of movies, it's quite easy to achieve that kind of objective in a matter of minutes, but in video games, we can't cheat or suppose things will work, because they won't, unless we solve every poly by hand ... but some people will some day give us the right tools to make it faster and better.
    I was telling to myself, I wish I knew someone at autodesk who could handle that ... but actually, Blender developpers are listening a lot the community, so that could be a serious solution to that specific need.......
  • foosart
    Options
    Offline / Send Message
    @Retmia, I couldn't agree more. Our team has been solving polys by hand for over a decade, but always trying to find ways to speed up the process! I agree, we need to find an insider at Autodesk!
  • foosart
    Options
    Offline / Send Message
    perna wrote: »
    wat
    per128_terrainroad.jpg

    conform compound object

    Conform Compound Object, is this a Maya function? If so where do I find it?
  • Eric Chadwick
    Options
    Offline / Send Message
    Anyone try patch modeling? The first few shots look a lot like patches or nurbs.
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    I agree with Noors, there is no 'easy' way to do this.

    There will be a lot of work just getting in there and adjusting things.


    I'd use a quad mesh that is sub-divided to generate the driving surface, you can then add road cambers, crown, various radius curves etc. It's quite easy to visualise and tweak.

    Mapping later is easy if it's a consistent quad mesh.

    To merge it into terrain I'd use a combo of ant-stitching with soft-selection and cookie cutting out the quad mesh into the terrain.

    I've used some of these techniques recently on a 20km real road quad mesh from laser scan and merging into OS DTM for the terrains and they worked ok.


    In the end though to get those great looking results like the screenies will take just good old man hours.


    I'd guess the most important thing here is just to tie down the layout and terrain quite early as concepts. You can only stay flexible and non-linear for so long.

    Dave
  • foosart
    Options
    Offline / Send Message
    Anyone try patch modeling? The first few shots look a lot like patches or nurbs.

    No, haven't tried that.
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    The first shots look more like isoline display sub-d meshes to me.

    Patches in Max are a nightmare to do this kinda job with. Handles galore!

    Also lots of tri patches would be needed.

    Dave
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    Here is what typical topology for a race track looks like:
    6b420c69aa7a5727c6ba167b3762013a.png

    If you have a specific terrain topology in mind, start with a rough out of the terrain. Then draw a spline on top for your track layout. Loft the spline and use the loft settings to control things like banking (if you feel it is necessary). Then it is just a matter of poly modeling the transition between the terrain surface and the track surface.

    The transition between mesh density on the edges of the track are handled with a script called "skip every nth"
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    AlecMoody : Waw, that's a quite promising approach !!!
    But still few questions about the process ...
    The terrain has to be created with a poly flow roughly following the track curve, is that it ?
    You create separately a track and a terrain and then collapse the points to merge them ? is that right ?
    You use the scrip "skip every nth" to reduce the poly count on the lofted road, and also to match the poly density of the terrain ?

    Am I understanding you right ?

    Anyway thant you very very much :), I'll give a try very soon !
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    Basically you make your road as a high density mesh as you see it in the screen shot above, using techniques like loft or sub-d mesh.

    You then make your terrain from a terrain model, or from a creative reference. Possibly making it with flowing polygons or just with a straight grid (at first)


    Once you are happy with the two parts, you then spend time to bring them both together in an elegant flowing way.


    Extruding out from the road edges and then reducing the mesh density to something approaching the terrain density then allows you to 'flow' the two meshes together in an elegant way. You might end up doing that blending over 20m or 100m. Or eventually blend the entire course so the terrain is now all a flowing mesh like those early screen shots.


    There is no button to make it look nice though, this is where just good old hard work and time result in a nice looking result, and the more complex your road/track side the longer it will take.



    I suppose a quick way to get nice looking results might be to build the terrain as a basic grid, sub-divide it so it's nice and smooth, then extrude out from the track and reduce the poly count and make the flow look nice while using WrapIt or some similar plugin to conform the extruded edges to the terrain mesh.



    There are many approaches. Really you'd need to be more specific on some details to know what might be better or worse approaches.

    If you are copying real life, or being creative, or have a client that might change their mind near the end and you need to be flexible etc.

    Cheers

    Dave
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Mr Whippy : Thank you for clarifying last few blurry points ! :)

    WAW, thank you guys, that is just freaking awesome ! :poly108:
    This is what I managed to do in a matter of minutes :

    UnlyxcK.png

    The Process :

    - Create a track along spline with a loft.
    - Extract the two borders of the road as splines.
    - Create Terrain using garment maker modifier with extracted splines, then use quadify mesh modifier.
    - Use Ant Stitcher to properly align the border points (with some manual ajustment needed as the poly density was not matching).
    - For the test I, applied two different noises on terrain and road to create relief, and then Ant Stitched them again with some soft selection.


    I'm very happy with the result as it is a real fast process for a quite satisfying render. Everything is not perfect (I would use SkipEveryNth on a final version / I would also sculpt terrain and then displace it on a clean flat topologized mesh), but with some work, I can now get quite close from what I want, and really spend time on the tracks design ! It's like feeling free !!! [ame="http://www.youtube.com/watch?v=Xk2uObQDKtw"]Freedom[/ame]

    PS : Once again if you have a better idea, or would do otherwise on the process, don't hesitate to share ! :)

    Thank you again everyone, I was stuck with that for monthes !!!
    Will show you the progress for sure when the projet gets on the road for good ;)
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    Also, this may not have been obvious in my first post but you want your nearby grass to be part of the directional tiling strip with the road. You will also generally have a narrow strip between them to handle the road to grass transition (either with a transition texture or any kind of blending system).

    example:
    b622e8551289852a7d8cd23c10a72904.png


    Also, there is no reason to use garment maker or sub-d. Build the road with the correct number of segments (easy to control in the loft options) and then cut into your terrain mesh to start making the transition.
  • 2cat
    Options
    Offline / Send Message
    2cat polycounter lvl 5
    I've worked on racing games for browser portals and we went with lofting splines using 3DS Max. You can then extrude and model the rest of the track's environment afterwards.

    Also, like AlexMoody said, tracks use a one axis tilable texture, while the environment uses a two way.
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    Alec, sub-d is preferable for some types of road.

    There are pros and cons to all approaches.


    This is why Retmia really needs to clarify on what the expectations of the track are.

    I've made loft tracks before but I've also dealt with a loft with over 100 cross-section splines and it gave me nightmares... in Max at least.

    There are a load of times I'd use a spline and be happy I did, and a load of times I've been happy I used sub-d to build a track surface.

    Dave
  • AzzaMat
    Options
    Offline / Send Message
    AzzaMat polycounter lvl 9
    I have done two racing games, one for PC and one for ouya. for PC I used easy roads, which is a plugin for unity

    http://www.youtube.com/watch?v=EwDpwVINY7g

    Which was really useful as it lets you draw easily adjustable tracks onto terrain and includes side objects. For mobile its too heavy so we ended up swapping the tracks out with model versions. Creating track sections is really good because it means you can find the perfect hair pin for your game and then reuse it. though it does mean the track can start to feel a bit repetitive (if you don't have enough variation) and its harder to do dips and hills efficiently.
Sign In or Register to comment.