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:

http://urbantick.blogspot.com/2009/09/gps-tracks-running-in-3ds-max.html

http://urbantick.blogspot.com/

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 (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

We have been running a series of experiments recently looking at crowd simulation, dynamics and particles in 3D Max. The aim is to visualise the complex systems that make up the city within an environment that allows both clear and easy visualisation and export capabilities to other packages such as Crysis or Google Earth.

While 3D Max is of use for crowd and particle simulation when it comes to modelling complex systems an external package is required, such as NetLogo. The movie below details our first steps here at CASA to export a basic traffic model from NetLogo into 3D Studio Max. The import script was written by our new PhD student, Ateen Patel and opens up a vast array of opportunities to both visualise and model the city.

NetLogo to 3D Max – Proof of Concept from digitalurban on Vimeo.

Music by The Tedd-Z Cookbook, Aerodrome (Funky Shuffle Remix)

NetLogo is a cross-platform multi-agent programmable modeling environment that is widely. It is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of independent “agents” all operating concurrently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals.(Nation Master Encyclopedia)

We will have more posts on complex systems and visualising the city over the coming weeks and months.

See http://gisagents.blogspot.com/ for more on modelling, agents and the city.

, ,