2
$\begingroup$

i've imported DXF file of terrain contours, and im trying to figure out a way to fill in the contours to get a surface, but since its very complex, all tools such as fill/grid fill, bridge loops etc. don't work. So far the best outcome i got was using shrinkwarp, but to still there was a lot of imperfections.

Is there any solution other than do it manually?

Thanks :)

enter image description here

EDIT: So far, I've been having decent results with bsurface addon

with just shrinkwrap with just shrinkwrap

enter image description here with bsurface

$\endgroup$
3
$\begingroup$

I actually worked on a very similar project, and was frustrated by how difficult it was. I'll share the things I tried, and hopefully it will help.

EDIT: I remembered that I also had some reasonable degree of success by using image processing to convert the elevation maps into a grayscale height map, and then using the displace modifier to displace a high-poly plane. This is not a straightforward technique, though, and is very difficult to gauge the accuracy of. There's lots of weird math going on between the color of a pixel and the number representing it. Depending on how accurate/precise you need to be, this might be a tolerable option.

I had a hand-drawn contour map that I was fortunate to find easily scanned and converted to vectors. These vectors were relatively trivial to import into Blender as polylines. It looks like you already have lines in Blender. If they are curves, it'd be better for them to be polygon lines. But this is where the trouble began.

There are two main problems you're trying to solve. One is to fill in-between the contours with polygons. Secondly, we want those polygons to be reasonably well organized, so that they can be textured easily and rendered predictably.

I tried many different techniques to bridge from one contour to the next and the short answer is it can't be done in Blender. The primary hurdle with using the tools in Blender, is that the vertices used to define the lines need to be very carefully positioned in relationship to each other. Otherwise you get some very strange, and quite unhelpful results (as you might have experienced). It's possible to do this manually in Blender, but that is (as you might imagine) an ENORMOUS amount of work.

The only reasonable solution I came up with was Autodesk Revit. I think it's free, or there's a free trial, something like that (this was many years ago). As with most Autodesk products it's a pain-and-a-half to find and get installed. And once you do, it has more than its fair share of bugs. To make a long story less long, I loaded an image of my contours (you might be able to import yours, IDK), traced a line for each elevation, and then Revit was able to connect them into a 3D terrain surface. This is non-trivial, but unfortunately is beyond the scope of this website (because it's not Blender). If you need help with Revit, please get in touch with me. We can find a way to exchange contact info.

Unfortunately, the topology of the resulting mesh is horrendous, and makes texturing, sculpting more detail, and rendering quite difficult.

One of my early attempts to correct the topology showed some promise and might suit your purposes. I created a high-quality cloth simulation and draped a high-poly cloth over the mesh that came out of Revit. This is time consuming because of the simulation calculations, and it's prone to artifacts because the cloth can wrinkle in ways that don't represent the terrain, but it doesn't require any manual labor on your part. It's also limited in the kind of terrain it can accurately cover. High-relief terrain will be more difficult.

It looked like this: https://www.youtube.com/watch?v=lMH6fAW1G_4

What ultimately ended up working was actually using the shrinkwrap modifier to project a high-density plane directly down onto the mesh that came out of Revit. The right settings were important, though. Instead of using "Nearest Surface Point" or "Nearest Vertex," use "Projection." This will basically project the vertices of your high-poly mesh in exactly one direction (I did down, because I was already thinking in terms of laying a sheet on it) until they touch your target mesh. This ended up having reasonably good results, but required a lot of tweaking to get the right settings, and a fair amount of cleanup afterward.

I hope that helps.

$\endgroup$
  • $\begingroup$ Thanks for a very thorough reply, you are right, from what I've found out in similar discussions greyscale map is usually the easiest/most precise option, however, i dont know how to create a greyscale map just from the DXF file I have available. There is a way that Hurleyman mentions here: blenderartists.org/forum/… but it would still be a lot of hassle. I'll check the Revit you've recommended, but i'd still like to figure out some decent way to do it with blender. $\endgroup$ – Johan Apes Sep 29 '17 at 20:41
  • $\begingroup$ The idea with cloth is nice out-of-the-box thinking, i did some experiments with it too at one point but couldn't get the vertices to work as collison. So far I've gotten somewhat satisfiying results with bsurface addon and doing retopo of the curves converted to vertices. $\endgroup$ – Johan Apes Sep 29 '17 at 20:50
  • $\begingroup$ Yes, that Hurleyman is me ;-) And yes, it's quite a hassle, and not very precise (because software does all kinds of strange things to colors behind the scenes). Even the cloth solution still requires actual poly planes. I wasn't able to get it working with just the curves. $\endgroup$ – Matt Oct 2 '17 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.