Jump to content

Weeding out contours and maintain height data


mchizz
 Share

Recommended Posts

Hi there,

 

I am currently trying to model the topography of stoke-on-Trent in the UK for a university project. I have managed to obtain all the height data and loaded in to AutoCAD. I intend to model the terrain in either sketchup or 3ds max but for me to be able to do this without either program crashing I need to reduce the number of vertices in the contours.

 

This seems to be a big problem for a lot people when modelling terrain from contours and there are tons of posts about how to weed out these vertices. I have used the lisp routine weed2 which is great except it resets the height data to 0 and effectively flattens the contours making it useless when importing to max. I have tried to use a lisp routine called pldiet but unfortunately it won't recognise my contours. I think this maybe something to do with the contours not being lightweight polylines? The polylines are pretty much straight from digimap, they were tiled but I have arranged them and removed unnecessary data like the text.

 

Does anyone know of a way to reduce these vertices but maintain the height data so that I can create a terrain in 3ds max or sketchup :-)

 

If this has been covered elsewhere I apologise, I have searched hard for topic that discusses the height values of the poly lines but so far failed in finding anything useful. With deadlines looming its something I need to sort out ASAP

 

Thanks for taking the time to read this post and any help will be awesome

 

Regards

 

Marc

Link to comment
Share on other sites

Once you bring the splines into 3dsmax you can apply a Normalize Spline modifier. This lets you specify the spacing between vertices and generally makes for a neater terrain model too. Best to try it on a small test spline first though before applying to your contours to get the spacing you want. Otherwise max can freeze up if trying to create too many vertices on a large spline.

Link to comment
Share on other sites

Thanks for the input stef

 

I gave it a go with a few poly lines and it worked great but tried again with a chunk of my map but max crashed on me again.

 

I haven't got an overly powerful computer so I do think the key here is to reduce the vertices in cad before importing into max......but then again I'm definitely no expert :-)

 

Any other suggestions will be appreciated

Link to comment
Share on other sites

Hi

 

We use a plug in for AutoCAD called Key TERRA-FIRMA which is a ground modelling package.

 

There is an option to optimise and reduce vertices in polylines which is how I do just what you're requiring.

 

If its just a one-off I can certainly do it for you.

 

Cheers

Link to comment
Share on other sites

s_tether,

 

Thank you for the generous offer, this would get me up and running with my project which would be a massive help! i have uploaded the dwg file to my dropbox for you to download if you find the time to take a look.

 

https://www.dropbox.com/s/2cwkx4l2zxreuxe/Just%20Contours.dwg

 

If you cant generate the terrain with these contours then i'd appreciate any tips as to what i could be doing differently, the contours are as i have download them from digimap.

 

Thanks again

 

Marc

Link to comment
Share on other sites

When importing a DWG in to max you can choose to weld the vetices that fall within a distance threshold you set. Did you try this?

 

I'll have a go to and upload a max file if my machine can cope with the contours. Once the contours are in then you can use a good script called populate terrain which will create a nice grid of your contours! It's great.

Link to comment
Share on other sites

Si,

 

thanks mate, this is brilliant, just what i need. The computer i'm at at the moment doesnt have max so will check that file out later. Did your plugin reduce all those vertices? Cant thank you enough for this, i was pulling my hair out to try get my computer the co-operate with me :-)

 

Andy, for future reference, this option to weld the vertices, does it appear in the list of import options after you select the dwg file but before it actually loads the file in to max?

 

Thank you both for your help!!

 

Marc

Link to comment
Share on other sites

Hi Marc.

 

Yes it does indeed! But it will probably show you a quick import progress and then stop for a while, if not forever, as it's welding the vertices!

 

I'm leaving my machine to process the Populate Terrain idea i mentioned using s_tethers maxfile. If it completes I will upload it tomorrow for you. It will be a 50m x 50m grid of the terrain. Fingers crossed!

 

UPDATE: Here is the maxfile with the 50x50m grid. If it helps.

Just Contours 50x50m

Edited by cg_Butler
Added attachment
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...