Results 1 to 6 of 6

Thread: How do I turn a raster DEM file into a vector model (so I can 3D print it!)

  1. #1
    Guild Expert Facebook Connected Caenwyr's Avatar
    Join Date
    Apr 2012
    Location
    Flanders, Belgium
    Posts
    1,276

    Default How do I turn a raster DEM file into a vector model (so I can 3D print it!)

    Hi all! I guess the title says it all: I have a number of maps that have a DEM file underneath that I usually created entirely by hand by drawing contour lines until my head nearly popped off. I spent innumerable hours on these things, and since my brother (the one I'm currently creating this map for!) recently purchased a 3D printer, I started wondering if I couldn't get some of them printed so I can actually touch the terrain I so painstakingly created!

    One example of a DEM file, from my old Ostwyc map:
    Uyli-8Xg.png

    I already know there's a tool called Chitubox that will slice any 3D model for me so it's ready to be sent to the printer, but I don't know how to go from my raster file to a 3D model. Anyone has any pointers?
    Caenwyr Cartography


    Check out my portfolio!

  2. #2
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,244
    Blog Entries
    8

    Default

    You can get blender to make up a grid with a lot of squares on it. A fine grid mesh. Then you load up your height map as a texture and use it as a displacement map which offsets all of the points upwards. Then you have a 3D model which has all of the height represented from your image. Then you save it as a 3D model in an appropriate format (usual STL) for the slicer and print it.

    Alternatively some programs will take in a height map and then generate the rastered 3D path a cutter must take to cut a block of material in a CNC milling type of method which is how I did the one below from some local LIDAR data I got hold of. I wrote the program to do this but I know that many CAD/CAM apps will have some kind of import for doing this kind of thing.

    But for a 3D printer then you must have the model for the slicer so blender is by far the easiest way into getting that.

    I knew John had done it but could not find the thread:
    https://www.cartographersguild.com/s...ad.php?t=36499
    Post #12

    I havent watched this video but it looks like what you need to do:
    https://www.blendernation.com/2019/1...n-blender-2-8/
    Attached Images Attached Images
    Last edited by Redrobes; 03-12-2021 at 06:08 AM.

  3. #3
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,604

    Default

    The laziest approach for additive 3D printing if you don't have a huge amount of dynamic range is to print it as a lithophane. Admittedly, I was using Cura, which meant it was just a matter of dragging the basic raster image into the print surface and hitting go, but I would expect that other systems have similar options. It looks like lithophanes are an available option even for CNC milling systems.
    However, if you'd like more control over what you get or if you have lots of dynamic range on your image, the steps suggested by Redrobes will probably give better results.

  4. #4
    Guild Expert johnvanvliet's Avatar
    Join Date
    Jul 2012
    Location
    N 42.39 W 83.44
    Posts
    1,091
    Blog Entries
    4

    Default

    i am with Redrobes

    you can use Blender 2.9.2

    under edit / preferences / addons

    is " import image as a plane"
    activate it

    enlarge the plane X10 ( there is a bug if you leave it at a X1 scale)
    subdevide the plane about 1024 times , or there a bouts .

    ( on the right side of blender )
    under tools
    add a modifier called " displacement"
    --- see youtube videos on this , it is a little bit complected but NOT very hard to do

    set the strength so that it looks good ( i set it to 0.02 )

    Attachment 128873


    then save it as a stl file

    a 3d printer can read a stl
    Attached Images Attached Images
    Last edited by johnvanvliet; 03-13-2021 at 05:40 PM. Reason: edit screenshot
    --- 90 seconds to Midnight ---
    --------

    --- Penguin power!!! ---


  5. #5
    Guild Expert Facebook Connected Caenwyr's Avatar
    Join Date
    Apr 2012
    Location
    Flanders, Belgium
    Posts
    1,276

    Default

    Hey guys,

    Thanks a lot for all your tips and suggestions! I must admit that I haven't had the time yet to test any of this out. I know Blender is free, but I have zero experience with it so it will probably take a while for me to get my bearings, once I start fiddling with it. For the time being I'm a bit too busy but I definitely intend to explore this further once things slow down a bit.

    Quote Originally Posted by johnvanvliet View Post
    ...
    This is looking absolutely awesome. maybe I should download Blender already after all, so I can at least toy with that model you create a bit!
    Caenwyr Cartography


    Check out my portfolio!

  6. #6
    Guild Master Falconius's Avatar
    Join Date
    Jul 2013
    Location
    Israel
    Posts
    2,733

    Default

    3D coat offers an import option to import a height maps as a 3d model (import image as mesh). 3D coat did have a pared down 3d printer version geared towards 3d printing, but I don't know if that is still ongoing. I'm surprised the same doesn't exist for Blender, but yeah I'd just use Redrobes' and johnvanvliet's idea and use the displacement map option, it's free, relatively simple and people here can walk you through it if need be.

    To be clear. To turn on "import images as planes" you have to go to user preferences, and then the "add-ons" menu and search for "Images" and then turn on the check mark. Then you can add it just like any other object with the "shift-a" menu and going down to images, where you'll now see the option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •