11

Is there a way to redefine a spline/bezier object into segments of even length or to tile the spline into a number of segments. (like the "normalize spline" function in 3dmax) example video

Or to be more general: I would like to model a terrain from a height map using contour lines. My approach was to import a .dxf, convert it to a mesh, then use the loft tool from the "loop tools" addon. But this doesn't work well because each segment has a different number of vertices (the result is often a "twisted" surface). Putting the "twist" option in a negative value didn't work; this only shifts the problem around the model.

So my questions are:

How do you model such a terrain (from the contour lines)? OR How do you redefine a spline in the way that I previously mentioned?

Keavon
  • 8,003
  • 17
  • 48
  • 84
Rosebarb
  • 493
  • 1
  • 6
  • 14
  • do you want the resulting polyline to have vertices spread equidistantly, and not spread according to their most accurate representation of the curve? – zeffii Jun 16 '13 at 09:45
  • if you could provide a small height-map sample file perhaps a different more automated solution can be found. – zeffii Jun 16 '13 at 09:49
  • 2
    you are right zeffi.vertices spread equidistantly is first solution. better one is that splines with different amount of vertices are redefined and got after normalization the same amount of vertices (regardeless of their lenght) – Rosebarb Jun 17 '13 at 05:04
  • 2
    spread equidistantly is possible in loop tools - "space" command , this one helps sometimes - to change amount of vertices will help much more getting clean results. sample file: https://www.box.com/s/2a1358j0u4zhn0iguxby – Rosebarb Jun 17 '13 at 05:24
  • i've been writing a script to redistribute points on a curve too, like the normalize modifier.. will post results soon. What i would really like to have is an excerpt of your original height map to see if the terrain generation can be automated. – zeffii Jun 17 '13 at 05:29
  • also of interest (and coming soon) http://www.graphicall.org/ftp/ideasman42/bridge_subd.png by ideasman42 (will ship with blender) – zeffii Jun 17 '13 at 05:49
  • 1
    here you go: original height map:(golf course in salzburg): – Rosebarb Jun 17 '13 at 15:45
  • 1
    "edit: i have to ask for permission to give this data." may last a day or two. – Rosebarb Jun 17 '13 at 15:57
  • A mockup heightmap with the same specs will work just as good so long as it represents the general content of such files. – zeffii Jun 17 '13 at 16:12
  • 1
    here it is: link problems you will face: open curves, up and downs in terrain, very different lenght of each curve, if you try to automate this - think about many single height points anywhere on map to add in more detail. – Rosebarb Jun 17 '13 at 16:26
  • sweet. let me look at this for a while! – zeffii Jun 17 '13 at 16:48

2 Answers2

5

Using the Bsurfaces addon

Terrain contour lines

  • To prevent twisting, Shift select a vertex form each contour that lines up nicely.
  • In the Tool Shelf, under Bsurfaces, click Set First Points.

Bsurface curve tools

  • Create a plane, select your bezier-curve and Shift select the plane.
  • Tab into edit mode, and delete the vertices (X,V) of the plane.
  • In the Tool Shelf, under Bsurfaces, click Add Surface and adjust setting to your liking.

enter image description here

enter image description here

Aldrik
  • 9,720
  • 22
  • 56
4

Blender contains the tools to do what your asking, they're just not all in the same tool.

To create more segments, you simply need to use the curve subdivide tool (W > Subdivide). Blender will automatically scale the handles to keep the curve from before. You can also use W > Smooth to smooth the curve down (this won't add or remove handles).

To remove unnecessary handles, use the Simplify Curve addon. Enable the addon, then go to object mode, select your curve and search for the Simplify Curve tool (in the search bar). There aren't too many settings, but they should be enough to do what you want.

I don't think there are any tools to remove handles evenly (other than doing it manually).

To create the surface of the ground, I would recommend converting your curve into a mesh (ALTC). That way, you can model in faces with triangles (something you can't do with curves). If you wan't perfect quads afterwards, you could always use the Remesh Modifier.

CharlesL
  • 15,316
  • 7
  • 53
  • 88
  • I try subdivide/remove vertices per hand. - but think about a height map in the size of 600+ soccerfields - in 1m steps- i will last weeks to remove and subidive by hand - problem is: when you start at bottom and go up it will not work at the end - than you go down and add some new points and at the end it will not work. I try the simplify curve tool too - but the results are broken - even on very smal curves. the tip with the remesh modifier is new. i will try it – Rosebarb Jun 17 '13 at 16:01