Importing GPS Tracks into 3DS Max

A GPS track imported into 3DS Max from a GPX File
A GPS track imported into 3DS Max from a GPX File

While playing around with 3DS Max 2009 for some of our GENeSIS work, I happened to notice that it’s now possible to use .net assemblies in MaxScript. My first thought was to use this for some of our agent based modelling work, but when Fabian Neuhaus asked about importing GPX files, I saw a really easy way of doing this.

The “System.Xml” assembly in .net makes parsing the GPX file extremely simple. A GPX file is nothing more than an xml file containing a list of trackpoints with a lat/lon and a time. The following script parses a GPX file and generates an animation of a box following a spline which follows the GPS track:

Maxscript GPX Importer

In order to use this, you have to run the script from the MaxScript rollout on the Utilities menu (click the hammer on the right hand side). Then click the “MaxScript” and “Run Script”. Point the file dialog to the file dowloaded from above and it should run.

The script creates a rollout window which allows you to browse for a GPX file to upload. After this is done, the file will be imported, resulting in an “Import Successful” message.

The only problems you might get are to do with the format of time recorded by the GPS in the track. If the import refuses to work, then you might need to change the time format as indicated by the comments in the MaxScript file.

One other thing worth mentioning is that the lat and long coordinates have been multiplied by 1000 in order to cope with a lack of granularity in Max. After producing this version of the script which loads data in the WGS84 coordinate system, I then created another version which reprojects the data into the OSGB36 system that Ordnance Survey uses in the UK. This means that we can match up the GPS tracks in Max with our own data on building footprints which comes from Ordnance Survey.

For movies showing the animated GPX tracks, have a look at the Urban Tick website:

Downloadable Preview – GENeSIS Exhibition Space

The following exhibition space is a proof of concept, looking at the ability to share and display city datasets and simulations within an interactive game engine. Available for download on both the PC and Mac (intel) platforms the space is the result of a few days work with the Unity Engine, it is intended to be viewed in the spirit of development rather than a completed product.

The room includes our first ‘crowd and delegate’ models direct from 3D Max, created as basic wander and avoid simulations they provide the building blocks of emergent behaviour within the cityscape.

City wide data sets can to be honest be very ‘dry’, the whole point of digital urban is to look at new ways to outreach, visualise and ultimately communicate urban data. The ability to include 3D models via ESRI ArcScene is a notable step forward, pictured below is the retail and office space in London measured on a 500m grid. We note some polygon issues here but these are known and we think we have a way to fix them – its to do with the way ArcScene exports, the model forms the centre of the exhibition space:

The room features various architectural models, including the Swiss Re building and the GLA in London, it also features a number of our latest output movies, the London LiDAR and Second Life Agents are of particular note.

The model is, as we mentioned, proof of concept, the next step is the addition of themed rooms and a more organised structure. We think the concept of virtual exhibition spaces is a strong one, so as ever any comments are most welcome…

Download the model for Windows XP/Visa (221 Mb zip file)

Unzip the file, open the folders and run the .exe file.

Download the model for Mac (222 Mb zip file)

Extract and simply run the .dmg file.

Use the mouse to look around, W/S move forwards/backwards, Space to jump.

CASA & CSAP S4 Modelling Tour Workshop

CASA (with our partners in CSAP at Leeds) hosted a two day workshop on the 8th and 9th January 2009. The first day was designed to showcase our use of new Web 2.0 technologies for mapping and visualizing information about cities; the second day involved technical workshops on simulation. The workshop  was part of the of the S4 European Spatial Analysis network modelling tour.
Over 150 people both from the public and private sector came to the event from all across Europe. The first day of the event was designed to showcase CASA’s use of new technologies for mapping and visualizing information about cities and was entitled “Geographic Information in a Web-Based World.” Talks ranged from introducing GMapCreator and MapTube which enable web-based mapping for sharing and visualising geographic information, to public engagement via the London Profiler, Public Profiler and the E-Society Classification websites. The geography and ethnicity of people’s names was explored which introduced the WorldNames and Onomap websites.
Other talks on the first day explored the use of MapTube and GMapCreator for Crowdsourcing near-real time spatial surveys and understanding crowdsourced geographical information via the analysis of OpenStreetMap. On a more data oriented side, there were talks on exploring urban data collection and mapping, analysing and visualising fine scale urban form and socio-economic datasets. The day concluded with a talk by Andrew Hudson-Smith from Digital Urban on Web 2.0 and neogeography in real and virtual spaces: from geocaching through to Second Life.

The second day of the workshop was entitled “Developments in Urban Models, Simulation and Spatial Analysis” and talks ranged from: rank clocks and scaling in city sizes, geodemographics, retail modelling, the need to capture urban form patterns and processes in agent-based models, pedestrian modelling, consumer behaviour, microsimulation and 3D visualisation and communication of agent-based models.
Click here to see the full program and to download the presentations.

Add Image