# Cleaning up a Terrain object made from AutoCAD contours

**URL:** <https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685>\
**Category:** Off-topic\
**Created:** [June 24, 2011, 2:24pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685 "2011-06-24T14:24:54Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 24, 2011, 2:24pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/1 "2011-06-24T14:24:54Z")

</div>

So i typically import my topograhy from AutoCAD into 3dsmax. Then i create a Terrain object which I can then convert to a poly to work with. However, the terrain always makes a fairly cumbersome mesh with many very long triangulated faces that Max doesnt like. Can anyone recommend a method to either clean up the terrain or the resulting mesh? Maybe drape or cloth on top of the triangulated mesh? Or maybe a different way (script, plugin, etc.) for generating a landscape ground mesh starting with topograhic contours (in 3d-Z space) from a land survey map?

---

<div class="post-metadata">

**Author:** ![Dariusz\_Makowski\_Dadal](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@Dariusz\_Makowski\_Dadal](https://forums.chaos.com/u/Dariusz_Makowski_Dadal)\
**Post date:** [June 24, 2011, 2:28pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/2 "2011-06-24T14:28:38Z")

</div>

U can…add tesselate… and then tesselate again… and then relax…and then pro optymizer to lower the detail… and wuaila… weird way to get it right… 🙂 Other than that, bake a Displacement map, smooth it a bit and use as Displacement modifier on plane ?

---

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 24, 2011, 2:38pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/3 "2011-06-24T14:38:12Z")

</div>

So I tried that and it seems pretty good. But a question…Why tesselate and not just go straight to ProOptimize? Is it to increase the accuracy of the resulting ‘optimized’ mesh?

---

<div class="post-metadata">

**Author:** ![sea2stars](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/sea2stars/32/19013_2.png) [@sea2stars](https://forums.chaos.com/u/sea2stars)\
**Post date:** [June 24, 2011, 2:42pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/4 "2011-06-24T14:42:04Z")

</div>

I usually just Conform a plane over the resulting terrain object. I’ll also hit the topo with a Normalize Spline before creating the Terrain object.

---

<div class="post-metadata">

**Author:** ![tricky](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/tricky/32/56653_2.png) [@tricky](https://forums.chaos.com/u/tricky)\
**Post date:** [June 24, 2011, 2:45pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/5 "2011-06-24T14:45:11Z")

</div>

> [@Reflected Environment Set up- Tutorial](https://forums.chaos.com/t/reflected-environment-set-up-tutorial/32466/28):
>
> I usually just Conform a plane over the resulting terrain object.

Second that. Works a treat.

---

<div class="post-metadata">

**Author:** ![Dariusz\_Makowski\_Dadal](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@Dariusz\_Makowski\_Dadal](https://forums.chaos.com/u/Dariusz_Makowski_Dadal)\
**Post date:** [June 24, 2011, 2:47pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/6 "2011-06-24T14:47:42Z")

</div>

Can u guys explaint that a bit more ?

Tesselate coz I dont know how even is ur model… if u bat topology then tesselate and pro opty might even it up a bit…

---

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 24, 2011, 3:03pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/7 "2011-06-24T15:03:20Z")

</div>

SO…

Import AutoCAD contour lines…normalize spline modifier (1 segment length only)…create terrain object…convert to poly…ProOptimize (25%).

Does that sound right? it seems pretty good. The normalize spline seems to help create a more normal looking mesh. Good tip! I end up setting Pro optimize to as low as 25% and it seems good without changing too much of the mesh.

---

<div class="post-metadata">

**Author:** ![Neilg](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/neilg/32/7044_2.png) [@Neilg](https://forums.chaos.com/u/Neilg)\
**Post date:** [June 24, 2011, 3:21pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/8 "2011-06-24T15:21:41Z")

</div>

Create plane… add edit poly, shift & drag the edges. Repeat for a bit, then add a meshsmooth.  
You can get it done suprisingly quick once you figure out how much detail you actually need and where.

---

<div class="post-metadata">

**Author:** ![Franx](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@Franx](https://forums.chaos.com/u/Franx)\
**Post date:** [June 24, 2011, 6:25pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/9 "2011-06-24T18:25:20Z")

</div>

What I do :

Import contour lines, apply terrain compound.  
Create a plane with needed subdivs and put it over the terrain object.  
Then use below script to project plane on terrain (Found it works better than the Conform object in Max)  
You get a perfectly topologized surface that is much easier to work with than the polygon mess produced by the Terrain compound object.

[http://www.scriptspot.com/3ds-max/scripts/topoproject](http://www.scriptspot.com/3ds-max/scripts/topoproject)

---

<div class="post-metadata">

**Author:** ![sea2stars](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/sea2stars/32/19013_2.png) [@sea2stars](https://forums.chaos.com/u/sea2stars)\
**Post date:** [June 24, 2011, 6:52pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/10 "2011-06-24T18:52:50Z")

</div>

Sweet link. I’ll have to give that a try.

---

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 24, 2011, 7:29pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/11 "2011-06-24T19:29:35Z")

</div>

> [@I need this material in VISMAT for sketchup...](https://forums.chaos.com/t/i-need-this-material-in-vismat-for-sketchup/35413/5):
>
> What I do :
> 
> Import contour lines, apply terrain compound.  
> Create a plane with needed subdivs and put it over the terrain object.  
> Then use below script to project plane on terrain (Found it works better than the Conform object in Max)  
> You get a perfectly topologized surface that is much easier to work with than the polygon mess produced by the Terrain compound object.
> 
> [http://www.scriptspot.com/3ds-max/scripts/topoproject](http://www.scriptspot.com/3ds-max/scripts/topoproject)

Awesome tip. Very cool! It works like a charm. Took a little trial and error for me. I will have to check for accuracy but it looks close. If nothing else, the resulting quad mesh instead of triangulated mesh is much easier to look at. Ha. Just look at the screen capture…

 ![](https://europe1.discourse-cdn.com/chaosprd/original/4X/5/c/0/5c0a5bcee1d11025bae622ca53fe5f619f67c4e2.jpeg)

---

<div class="post-metadata">

**Author:** ![Dariusz\_Makowski\_Dadal](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@Dariusz\_Makowski\_Dadal](https://forums.chaos.com/u/Dariusz_Makowski_Dadal)\
**Post date:** [June 24, 2011, 7:48pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/12 "2011-06-24T19:48:52Z")

</div>

Where u guys get the terrain from? Is there maybe some database for it?

---

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 24, 2011, 7:56pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/13 "2011-06-24T19:56:35Z")

</div>

A terrain is a Max compound object that is made from imported AutoCAD polylines (at least thats how I use it). You can draw the polylines manualy and then import them into max…

---

<div class="post-metadata">

**Author:** ![plastic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/plastic/32/11567_2.png) [@plastic](https://forums.chaos.com/u/plastic)\
**Post date:** [June 30, 2011, 8:17am UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/14 "2011-06-30T08:17:49Z")

</div>

I shouldn’t be teasing, but I can’t help myself 😉  
Here is something I’m working on:

---

<div class="post-metadata">

**Author:** ![Morne](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/morne/32/11335_2.png) [@Morne](https://forums.chaos.com/u/Morne)\
**Post date:** [June 30, 2011, 10:02am UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/15 "2011-06-30T10:02:30Z")

</div>

> [@Call for more testers: The mighty bug hunt!](https://forums.chaos.com/t/call-for-more-testers-the-mighty-bug-hunt/35007/162):
>
> I shouldn’t be teasing, but I can’t help myself 😉  
> Here is something I’m working on:

As in a script that does it like a 1 click button? Or as in a project?

---

<div class="post-metadata">

**Author:** ![plastic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/plastic/32/11567_2.png) [@plastic](https://forums.chaos.com/u/plastic)\
**Post date:** [June 30, 2011, 11:18am UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/16 "2011-06-30T11:18:49Z")

</div>

> [@On another topic](https://forums.chaos.com/t/35510/2):
>
> As in a script that does it like a 1 click button? Or as in a project?

yes, a script.

---

<div class="post-metadata">

**Author:** ![Morne](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/morne/32/11335_2.png) [@Morne](https://forums.chaos.com/u/Morne)\
**Post date:** [June 30, 2011, 11:57am UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/17 "2011-06-30T11:57:12Z")

</div>

sounds good!

---

<div class="post-metadata">

**Author:** ![windrockwater](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@windrockwater](https://forums.chaos.com/u/windrockwater)\
**Post date:** [June 30, 2011, 1:23pm UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/18 "2011-06-30T13:23:58Z")

</div>

Tease! That seems similar to what the above mentioned script does. Are you creating a maxscript to do this? I will be a guinea pig if you need one!

---

<div class="post-metadata">

**Author:** ![plastic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/plastic/32/11567_2.png) [@plastic](https://forums.chaos.com/u/plastic)\
**Post date:** [July 1, 2011, 6:54am UTC](https://forums.chaos.com/t/cleaning-up-a-terrain-object-made-from-autocad-contours/37685/19 "2011-07-01T06:54:52Z")

</div>

I will be releasing a script, targeting end of august.  
The difference to the other script/method is that the borders stay congruent.
