2D to 3D terrain
-
Hi guys, l have a task to do with a terrain, its in 2D and l need transform it to 3D, l´m try using from sandbox from contours, without sucess, so, it´s not a large topography, but the program crashes all the time, and l imported and welded all lines from autoCad...these lines has different heights.
Don´t know what to do!
l´ve serched in topics here, but no solution 4 me
Any tips?
Thx in advance! -
If you can possibly post the file, I'll have a look, because it sounds to me like you have taken the right steps, and the crashes sound odd.
The only advice otherwise is to be sure there isn't some random def point left over somewhere from the dxf import, and if the contours are grouped, try exploding them.
Otherwise, I'm not sure, because I have a similar approach, which works well even on huge terrains.
Hmmm.... -
Hey Dale, thx a lot to give me some advice, l'm already exploded the group, the strange thing is the file gets so big with simple welded lines, which kind of file you recommend to import dwg, dxf or what? Normally l use dwg, and this is my first irregular terrain and it's make me crazy, coz, i need drape all the buildings after that, l have a i7, and its take toooo long to subdivide the meshes (when it's not crashes).
Thx again Dale, and l hope you can give some new help.File:
-
Well this is interesting. I took your file, and deleted the sandbox skin, and did a "from contours" command, and it took about 6 minutes to generate the terrain.
A file like this would normally generate in under 30 seconds or so for me.
It's not that the size of the whole terrain is that big (95 m or so). hmmm again.
So what Did was deleted everything but the contours, and exported them to Vectorworks (my Cad program). I did this in both dxf and dwg format just to compareand had a thorough look to see that there weren't any hidden layers etc.
What was interesting is the dwg file of just the contours imported into Vectorworks with the mesh subdivided and looked like this
This is not what I would usually get, so it has me suspicious that the file may be corrupt.
The dwg file came in as just the exported contour lines.
I exported this file from Vectorworks back to SketchUp, and did a "from contours", and although it cut the time down to 4 minutes, that still seems too long.
So, I'm not much help, but it may be worth a try seeing if you can bring the file into Skp. in a dxf format.
Sorry. Perhaps someone else can jump in with some advice. -
The problem isn't really that the file is corrupt. The issue is that the original lines are made up of very tiny segments. Even though you welded the countours there are still hundreds of tiny bends in each one. Each of those bends forces sketchup to create another triangular face. That's why it takes so long and why the screenshot above is so triangulated and messy looking.
2 Options.
-
Create a new sandbox plane from scratch subdivided as you wish and use the smoove tool to pull the areas up until they reasonably match your contour lines, then delete the original contour lines.
-
Probably easier and more accurate but resulting in a slightly sloppier mesh would be to group the original contour lines and lock them. Then trace over them using normal curves or maybe Bezier curves (via the bezier plugin). Don't worry about getting exact, but get fairly close. Delete your original curves and use From Contours again based on your new linework. These lines will have far less segments and should look a lot better and not crash your system.
2a. You could do the same as above but just using lines instead of curves, just make an endpoint every 20' or so as you trace your lines. This will give a much rougher mesh but is much faster. You can then use subdivide and smooth on the mesh after using the From Contours tool to smooth it all out. This will probably reduce your slopes somewhat but should look pretty nice and might be accurate enough for what you're doing.
-Brodie
-
-
Great tip Peter. Forgot all about simplify contours.
-Brodie
-
Great tips. It's odd though I use weld quite often, but certainly don't seem to receive contours broken in so many small segments. Is there a reason for this?
(Usually I am sent this data from Surveyors converted by them to dxf) -
Weld doesn't really have anything to do with it when it comes to an issue like this. If you connect 2 arcs which are made of 3 (or 3000) unwelded or welded line segments you'll get the same number of triangles by necessity. Welding doesn't really smooth out all of those little segments you have, it mostly just makes each contour easier to select. So it's still nice to do, but won't be as helpful as you might think.
-Brodie
-
A follow-up on Mr. Brodie's advice (all I got to do is clean the whole house today, so why not?). I used SimplifyContours and massively reduced the complexity. I used 2 deg. setting You may want to play with that setting to make things faster. See if the attached is acceptable.
EDIT--I improved my method
- Select only the curves and group (There is one lone edge in the contours. Select that and put it in the group too.) This is to isolate the contours from the bounding lines. If you don't, SC will erase almost all of the drawing.
- Run SimplifyContours. Higher the angle setting the faster things are, and less detailed. But a low setting still greatly reduces the vertices here.
- Run Sandbox / From Contours.
- The way "From Contours" skips over straight areas in contours is evident. You may want to add vertices back to straight areas after viewing results and run FromContours again (I used TIG's AddVertex+.rb. )...or use another skinning method. You will see one contour where I was adding Vertices.
- May need some Smoove or other smoothing work to taste.
Hope this helps.
Peter
-
Brodie,Pbacot and Dale, l want thank you so much,l never realized about weld function, for me it's join the lines, but, just make it easier to select lol, in the original file imported it´s like thousands of dots in a line...how fool l am... and l forgot completely about simplify contours ( hundred plugins...bad memory). l'll follow the tips and l´ll take a look the file. Thank u guys so much for your time, your knowledge and your efforts to help rookies like me.
l´ve tested the tips and SC works perfectly, fast and precise, how dumb l was, but is watch and learn ( in that case remember about the plugin).You saved my skin.
-
I would suggest using fredo's bezier spline - use the "convert to polyline divider" tool. I use a dimension of about 1/4 to 1/5 of the average distance between contour lines for the length. This simplifies the curve, but still gives you enough points so that on the long straight areas you still get enough triangles. This also helps avoid having many triangles go to one point where the contours narrow (like a ridge) Hope that helps.
Andy
-
No problem abilio. It's nice to be able to share some experiences and learn some things in the process. I've never used andybot's tip about the polyline divider before either but that sounds like it could pretty helpful in a number of situations. I hope I can remember that one for next time.
-Brodie
Advertisement