How can I import terrain from DXF?

I'm looking for a way to import heightmap from a DXF or a way to export RAW terrain file from DXF file in order to use it in Unity and edit/manipulate it using Unity Terrain Editor.

Thanks in advance!

I don’t know if there is any better approach, but I would do something like this:

  1. Import dxf as a mesh
  2. Create terrain from script
  3. “Sample” dxf mesh by using raycast to find out heights and set them on your terrain

You should be able to do this in import time. After that you can modify your terrain in Unity Terrain Editor.

How I do it, is:

  1. I use Navisworks to make it a FBX.

If that doesn’t work:

  1. I use Autodesk Navisworks to make it Datasmith then in Unreal engine I convert it to FBX.

I export this → then in Unreal I use a texture-mapped z value of the object take an orthographic photo PNG at high resolution, black & white → and that’s a height map generated from the DXF.