A pair of developers with a background in civil engineering wanted to develop an app to visualise a city’s pipe network in AR. Because their competitors were developing similar functionality, they needed to quickly build and release the feature. To increase their development speed, they chose Exyte.
Civil engineers need to keep in mind all of the infrastructure in the area of the project they are working on. It can be especially tricky with the “invisible” systems, such as the underground systems - water and sewage pipes included. The clients wanted an app that could pull pipe network data from a CAD file and display it as a 3D object visible in AR.
We decided to start with a prototype that works with an existing 3D model of a specific intersection (3D model generation from CAD data won’t be handled by the mobile device anyway). The app will detect a plane (the road at street level) and a known landmark to position and orient the 3D model, and then present the model at scale.
The project was done in 3 steps:
- We started with coming to an agreement about the 3D model format and a way to position it in the real world. We decided to use manholes as landmarks with known positions, and build a process that lets the user position a virtual manhole over a real one, and rotate the whole model to line up the real pipes with the virtual ones. Each model has information about its rotation in relation to North, and the app automatically rotates the model using the device’s compass data. The user can then manually adjust the North’s position (because the built-in compass can have significant error).
- Then we build the actual presentation logic for the AR pipes (knowing the position and rotation of the model), and a way to observe the model from the above, accompanied by the position of the user.
- After that we added an ability to add annotations to the model, visible on both the AR view and the overhead view. The user can specify the position of the annotation and its text. The annotations are persisted and visible on subsequent model opens. We also built the ability to import and export models, annotations included.
When positioning the model on a real location, precise rotation is important - you want the pipes to align well due to their length, any small error in the rotation gets multiplied tenfold when you get 15m from the origin. Initially we planned to use the iPhone's built-in compass, but it turned out to be not precise enough for our goals. We solved this by asking the user to point an arrow due North during the calibration phase, and used the compass only for the initial rotation of the arrow.
The ability to add annotations and tie them to specific points in the AR model was somewhat challenging because we wanted to always show the annotation markers, even if the point is behind the user’s back. So we added the ability for markers to stick to the edge of the screen when they leave the viewport, and indicate where the user should turn to see them again.
When displaying the AR model, it would often drift or slightly turn every so often, and this compounded with time. We had to rethink our model initialisation process and the usage of Apple’s AR anchors to stabilise the model.
Minimum viable product for visualizing the water and sewage pipe’s system in AR.
«We’re very happy with the product. Exyte was able to get a proof of concept out in about a week. We were very impressed with how quickly they were able to get through the first phase of the project. We’re nearly done with the app; there are just a couple of bugs we’re still working to resolve.»Read more on Clutch