How to create terrain from a single spline?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  04 April 2013
Question How to create terrain from a single spline?

The spline is a center line of a road that I traced carefully in Google Earth. I added elevation data to it, converted to DXF file and thanks to user rox44 I managed to import it successfully into Max 5.

Here's the line:

Now I would like to create some mesh for the road and some roadside (not more than 70m wide at each side of the road which is about 6km long). It's going to be a track for an old rally game.

But to be honest I don't know what method would be best in my case? I have a sample of original mesh from that game and it looks like this:

I suppose I don't need to create a 100% accurate copy of this mesh but I'm guessing it should be somehow similar at least - am I right? And the second (even more important) thing - I don't have a clue how to form that mesh so it would follow the shape of my spline path?

BTW, when looking for some information I came across this video tutorial:

It shows a method (one of many I suppose) of creating mesh for road or terrain. The problem is I'm not sure if I can use this method as the final mesh shown in this video is very dense. Can it be used for a game?

Also I would appreciate it very much if someone could tell me what are some other methods for creating meshes and which one would be best suited for my little project?
  04 April 2013
Spline shapes are great for creating roads. Choose the spline and on it's first properties tab, 'Rendering', check Enable In Renderer, Enable In Viewport, Generate Mapping Coords. and choose the Rectangular method. Play with the rectangular shape settings until you've got your basic shape right, also check interpolation settings from the next tab.

Everything else you can achieve easily by adding an edit poly modifier. Add edges where you need, and you can even select the middle polygons and add a tesselation modifier for extra detail on them only.

p.s. read your post more carefully. There are other methods of course. Maybe the Loft compound shape is what you need?

also you may need a normalize spline modifier on top of your base line if you encounter trouble.
TD / 3D Artist at Brink Helsinki

Last edited by ebee : 04 April 2013 at 09:49 AM.
  04 April 2013
I was playing around a bit with lofting along that spline path but it gives me bad, irregular mesh. I think the problem is my spline is not properly drawn. Here's a close-up on it:

It's because I draw it in Google Earth using many points to mark bands and a lot less for straight sections of the road. That's the only way I can do it. So it seems to me that I won't be able to use lofting method in my case.
  04 April 2013
Did you try the normalize spline modifier that I mentioned?

If that doesn't work, maybe you have to redraw the spline in max using bezier curves with less points.
TD / 3D Artist at Brink Helsinki
  04 April 2013
Try using the Optimize Spline script to optimize your spline data.

If its not already you might need to weld all of the vertex.

You can then try to loft your spline giving you better control over segments.
Or you could outline the spline.

If you find you spline does not conform correctly you can use subdivide to add extra detail but don't use too small a values.

You could also play with the terrain modifer.
Try not to use to many segements which ever method you use.

Hope it helps.
Portfolio -
Animation -
  04 April 2013
Thank you very much for your suggestions and hints regarding that spline and lofting. But to be honest, I'm not sure if this is the method I want to use in my case. It has two drawbacks - fixing/redrawing spline path, and UV mapping. Both those issues are too complicated for me as I'm new to Max (and CG in general).

I was thinking about another method - path deform. If I draw a section of mesh (as shown on image in my first post), and then apply just two basic textures to it (one for road, and one for roadside) I will have a clean, mapped piece of mesh (flat and straight). After that I could copy this section as many times as needed to cover the whole length of my spline path, join all those sections into one, and finally apply 'path deform' modifier. And this would hopefully give me a basic model of my terrain that I could start shaping up and mapping in much more detail. Is that kind of workflow possible? Or it isn't as simple as I would thought it is?
  04 April 2013
You can also approach it that way although you might find modelling 7km rather tedious!
If you do need to change the level of detail you will have to remodel it.

If you loft this path then mapping coordinates are generated for you.

Which ever way you approach it you will find it easier if you optimise your spline that way the detail is where you need it, in the curves.
Portfolio -
Animation -
  04 April 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 07:56 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.