blankblank blank

Archive for the 'AutoCAD' Category

3D Textured Models From 2D Photos With PhotoFly

Note: PhotoFly is now 123D Catch; click here for the main product page.

A few years ago, Microsoft make a big splash with Photosynth, a program that analyzes 2D photos of an area, computes their relative orientation, and lets you view them in a quasi-3D environment. Here’s a live Photosynth of the London Eye:

PhotoSynth actually calculates a 3D point cloud from all the photos…


… but the photo views are still in 2D, i.e. they’re not overlaid on top of the 3D data. And there’s no easy way to get the 3D data out; there’s a hack to do that outlined here that can do it, but it’s a pretty complicated process.

AutoDesk Labs has just released version 2.1 of their free program PhotoFly, which can take 2D photos of an object or environment and generate a full 3D model with a photo texture overlaid on top of it. This thing is jaw-droppingly amazing, not least for how easy it is to do:

1. Shoot photos of an object or environment from multiple positions. A simple point-and-shoot digital camera will work, though AutoDesk recommends a wide-angle DSLR for some applications. They have a full video tutorial on how to get the best results.

2. Install the PhotoFly Photo Scene Editor software  on your computer (Windows only).

3. Select the photos you want to use to create the model; PhotoFly will upload them to AutoDesk’s servers, which process them, generate the 3D model and texture, and then let you download them for viewing on your home computer.

I had some photos taken for PhotoSynth of an archaeological excavation of a pithouse I did back in 2008; I selected a number of them, and uploaded them to PhotoFly. Though the pithouse was reburied three years ago, I was able to see an incredible 3D reconstruction:


This isn’t just a static oblique view – this is a fully interactive 3D model. You can pan/tilt/rotate the model using the software in real-time. PhotoFly even includes a movie maker that lets you create animated “flythroughs” of the model; here’s one I generate from the pithouse model above:

All the 3D model and texture data is stored on AutoDesk’s servers; if you share the 3dp PhotoFly file with someone else who has PhotoFly installed on their computer, that data will automatically be downloaded to their computer for local viewing. You can try that with the 3dp file for the pithouse above, which I’ve put online for download.

What else can you do?

  • While the initial scene isn’t georeferenced, if you have coordinate positions for a spot in the scene, you can use those to georeference the entire scene.
  • You can use object with known dimensions to calibrate the dimensions of the entire scene, then do accurate measurements of any object in the scene.
  • PhotoFly calculates presumed xyz orthogonal (perpendicular cartesian) directions, but if you have a known horizontal or vertical direction, you can modify those directions to match the known direction.
  • You can export the 3D model and textures in a number of standard formats, including DWG, OBJ and LAS. You could then import them into a 3D-capable program like Blender (free and open-source) for editing or animations. Georeferencing and calibration data is included in the export.
  • If you use a OBJ file importer in Google Sketchup, you can load the 3D object into that program:


  • Export into Inventor Publisher Model format (ipm) for viewing on iPhone and Android devices (couldn’t get the Android viewer to work, though).
  • You’re not limited to 3D spaces; you can shoot and create a 3D model of an object like a sculpture, artifact, piece of furniture, etc..


  • Only works with unedited photos from a digital camera; no scanned photos, or photos modified in a digital editor. This is in contrast to PhotoSynth, which can combine digital camera photos with scanned historical photos.
  • AutoDesk says you need to take at least three photos from different angles, but I’ve found that’s way too few – you wind up with holes in your scene. Take as many photos as you can, and try to make sure that every spot you want in the scene is visible in at least three photos. And definitely follow AutoDesk’s shooting guidelines.
  • All the photos should be taken at the same time, and with comparable exposures, for best picture matching.
  • Sometimes, the program hangs up with a large number of photos to upload; in that case, reduce the number of selected photos and try again.
  • Sometimes, large chunks of the scene appear to be missing; selecting a reduced set of photos and trying again can sometimes fix this.
  • Sometimes, some photos can’t be correctly matched to the proper scene, and aren’t used. However, the Photo Scene Editor includes a utility that lets you manually match points in the unmatched photos to corresponding points in a matched photo. Tip: If you have a large number of unmatched photos, only manually match one photo that is representative of all the unmatched photos, then resubmit the scene for processing; more often than not, the addition of that manually-matched photo allows other unmatched photos to be processed.
  • While you have the option of waiting for a scene to be processed, or being emailed when it’s done with a download link, I recommend always asking for an  email; I’ve had occasions where a scene I waited to get processed got lost somehow.
  • Finally, while the program is free now, AutoDesk has only committed to keeping it free until the end of 2012; at that point, it may charge for some services, or discontinue it entirely. However, any scenes exported into another format (e.g. OBJ) can be kept and used in program that support that format.

AutoDesk is still actively working on the program, so I’m sure some of these issues will be fixed eventually. But even with these drawbacks, it’s a pretty freaking amazing program that you should definitely check out.

Web-Based AutoCad Viewer/Editor

AutoCad WS is a free cloud-based service from AutoDesk (registration required) that lets you upload, view, share, edit  and download AutoCad files (DXF and DWG) online; there are also apps for remote viewing and editing on Android and iPhone smartphones. You currently can’t create a new file in the editor, but you can either create a DWG/DXF file using a free editor like DraftSight and upload it, or take a currently existing file, edit it to remove all features, then save it as a different name.

This is by no means a substitute for the full version, but it does contain a fair subset of the basic functionality, with drawing/editing/annotation tools, and layer support:


Even though one of the sample drawings included is labeled “Geospatial Sample”, there’s no native support for georeferencing or geospatial coordinates. If you load in a file with geospatial information, add/edit features, then save it, it will maintain the geospatial referencing.

If your file is in some form of Mercator coordinates, like UTM, you can calibrate/reference fairly accurately it against a Google Maps view in the app. Here’s a rough DXF outline of Indian Island in Eureka, CA, traced from a UTM topo map, and uploaded to AutoCad WS:


From View, I turn on a Google Maps background; this also brings up a control for aligning the drawing with the background:


The feature fills the screen, and obviously isn’t calibrated to the correct location. Using the Search Box, I can bring up the Google Maps view of Eureka, CA, then use the Place/Scale/2 Points/Rotate functions to align the outline with the actual island:


Pressing Apply locks the scale and orientation of the drawing data to the Google Maps view. Any new features I now add will be positioned correctly in the Google Maps view. Even without this Google Maps calibration, these new features would have the correct geographic coordinates and placement if I export the drawing file back to my computer.

Loading An AutoCAD DXF File Into A GPS Or Google Earth

A reader from Canada asks, “Is it possible to load an AutoCAD file (dxf?) into my Garmin GPSMAP 60csx?”. I don’t know of a free one-step solution, and if any reader knows of one, I’d appreciate. However, using some of the procedures described in previous posts on this blog, it can be done fairly easily.

1. Convert the DXF file to a shapefile using the MapWindow DXF To Shape Converter. Points, lines and areas will have to be converted into separate shapefiles.2. If the coordinates of the DXF are not in the native coordinate system for most GPS units (latitude/longitude, WGS84), you’ll need to re-project the new shapefiles from their current coordinate system (e.g. UTM) to the GPS native system using MapWindow.

3. Load the shapefile into the GPS using one of several programs available. Points and lines will be imported as waypoints and tracks, respectively, while areas will be imported as tracks that describe the perimeter of the area.

It’s even less painful than it sounds; should take no more than about five minutes to put a DXF file into a GPS, once you have all the software you need installed.

Addendum: You would also follow the same basic procedure if you wanted to display a DXF file in Google Earth, but instead of step 3 above, you would convert the shapefile created in step 2 into a Google Earth KML file using one of the converters I’ve posted about previously.

The Last Word (For Now) On Converting Google Earth KML Files To Shapefiles

Note 1: See this series of posts for info on converting shapefiles to KML format.

Note 2: The current version of the program has a bug that doesn’t let you select a file. The author has indicated on the website that a new version should be out soon, but until then, you may have to use the approach described in either this post or another post. Also available now is an online KML to shapefile converter.

In two previous posts, I covered several multi-step hacks for converting Google Earth KML files to shapefile format, since there wasn’t a single-step free approach to my knowledge. Well, there is now, and it makes the process a lot easier.

Continue reading ‘The Last Word (For Now) On Converting Google Earth KML Files To Shapefiles’

Converting Shapefiles and ArcINFO Coverages To AutoCAD DXF Format

Yesterday’s post covered converting KML files to shapefile format, with the intermediate step of converting them first to AutoCAD DXF format, then DXF to shapefile format using a MapWindow plugin. Seems like a good moment to post on a shapefile-to-DXF converter that can also convert ArcINFO coverages (derivable from ArcINFO E00 files) to DXF as well.

Continue reading ‘Converting Shapefiles and ArcINFO Coverages To AutoCAD DXF Format’

Another Way To Convert Google Earth KML Files To Shapefiles

Note: See this series of posts for info on converting shapefiles to KML format.

In the last post, I covered a mildly painful way to convert the vector data (points, paths, and polygons) in Google Earth KML files to shapefile format, while keeping at least the name associated with the points and paths. Today, I’ll describe a simpler and faster two-step process, but one that unfortunately doesn’t keep the name or any of the other KML data associated with the original shapes.

Continue reading ‘Another Way To Convert Google Earth KML Files To Shapefiles’