After a relatively quiet winter season - I’ve had a few trips to the UK and Italy, but nothing too hectic - things are about to get much more busy. Looking at my calendar I see trips to Italy and the UK again, but also trips to Boston, L.A. and SF (thankfully all in one trip) and others to Amsterdam and Toronto. And it’s only going to get busier.
I’m actually really lucky to have been able to attend the Neuroscience and Design class during this period: only one of the 12 sessions looks like it’s going to be affected by travel (I’ll be dialing into one of the classes from Boston). It could have been far worse.
This week we had an exceptional Monday afternoon session due to a holiday in Italy this week, I believe, and then on Tuesday afternoon I headed across to Lavigny to meet with members of the CHUV's MySpace Lab (yes - it’s really called that, which I find very cool) and other visitors from the Neuroscience Lab at Lombardini22 and the University of Parma.
I didn’t take photos during the trip - I tend not to whip my phone out for selfies on the first meeting with people - but I did take a photo of the chapel in the hospital grounds.
Many thanks to Andrea, Anna, Giovanni, Giorgia, Federica and Ash for the warm welcome and the stimulating discussion. I was really fascinated to hear about everyone’s work, and look forward to discussing more in the future!
Back to reality, I’ve been preparing for the Autodesk DevCon in Amsterdam. I’ll be showing how we’ve been using WebAssembly inside Forma to integrate C++ components into the browser.
I was looking at the pathfinding implementation I’ll be showcasing during one of the demos - and looked at how it would work with a scene brought in for downtown Amsterdam - and I realised that while it worked nicely for Las Vegas (the last place I demoed it), the number of canals in Amsterdam made a naive approach of “just avoiding buildings” to make a lot less sense. I simply cannot recommend swimming across canals in Amsterdam.
I decided to figure out how to voxellise the road network coming from Forma and (optionally) use that as the basis for pathfinding inside Forma.
My friend Håvard Høiby came to the rescue with a snippet of code and an explanation for working with roads. I had hoped to treat them like a mesh - getting the triangles representing them, which I could then throw at VASA for voxellisation - but it turned out to not be quite as simple as that:
A road does not have a 3d representation in Forma. It has a Footprint which is the horizontal alignment discretized (e.g no real curves), and it has a TerrainShape which is the visual impression on the ground.
Here’s a simple function I created based on the code Håvard provided:
This will return the footprint objects for each segment of road. You can loop through them and get the “coordinates” property of each, and use the X and Y values to create your road. I actually added a width to the line - by figuring out the perpendicular vector and using that to create a series of vertices representing a segment’s corners - and then created triangles from there that I could pump into VASA.
Here are some of Amsterdam’s roads, voxelised and displayed in zebra striping:
From here it was a simple matter to use this voxel model as a basis for pathfinding.
I’ll be showing more during my DevCon session on May 20th at 3:30pm.
Hopefully see you there!