4

I have a shapefile that I would like to import to Unity.

The shapefile is in 2D and I also have access to the data that it has through PostgreSQL.

My question is this: "Is there a way to transform this shapefile to a unity 3D visualization with latitude/longitude/height (these already exist as well but i can also input them one by one) in order to then add game objects on top of it? Obviously not use any code. Even if it is done with another program.

  • Modeling terrains with DEM files its posible with the majority of this kind of software, i can´t tell about Unity, but it must be one of the main tools. – oscar blanck Jan 17 '18 at 15:12
3

From the Unity website

Unity can read .fbx, .dae (Collada), .3ds, .dxf, .obj, and .skp files. Refer to your 3D modeling software documentation for information about exporting 3D files.

I thought there was a QGIS plugin that exported extruded polygons to wavefront OBJ format but i can't find it :( Maybe it was my imagination, maybe it was withdrawn.

There is a plugin for Blender that imports shapefiles. This lets you

  • create a triangulated mesh from contours shapefile
  • load and extrude buildings from a shapefile

Once in Blender, you should be able to export to any of the Unity supported formats. Look on YouTube, there are some videos on there.

Another one in that list is .dxf , which can be exported from QGIS. I've not tried this, though.

It's a shame Stanford PLY (*.stl) isn't supported by Unity, there are a couple of ways of getting those out of QGIS (a plugin, and SAGA) although I think they're for terrain meshes.

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.