This week took place the 3rd Autodesk Forge Hackathon. The past two years we were tempted to participate but renounced because of lack of time. This year, no more waiver, let’s do it !

Really good prizes will be gifted to winners of the following six challenges :

  • For the love of the 3D game!
  • Show me the Data! 
  • I feel the need, the need for Digital Twin!
  • Task automation is a state of mind
  • There is no place like ACC
  • Hack the planet!
https://forge.autodesk.com/blog/compete-prizes-2022-forge-hackathon

With our spirit of childhood, we decided to compete for the 3D game challenge. Our objectives were first to use most of Forge API / built-in functions as it’s one of the judging criteria and also to push limits of APIs. 

The week started with a fun meeting with others teams and Autodesk staff in Gather Town for the pitch day, Sanjana suggested our team name, guess what ? We named this blog after that : PIROmancy. 

Twitter @AfroJme

Here’s the draft of our game concept :

The idea was to create an isometric view game using the Viewer Forge (which is based on three.js R71). Most of the components we used came from the DataVisualization API toolkit :

  • SurfaceShading for the floor heatmap
  • Sprites for the gems
  • Streamline for the tornado and track the player path

The first step was to transform Forge into ‘game engine’ and it was pretty straightforward using the ToolInterface. The ToolController already implements an update function and keyboard events. Now let’s add some physics (we only need collisions for this game), and thanks to Detecting-collisions-in-the-forge-viewer and Integrating-ammojs-physics-with-autodesk-view-data-api we were able to quickly integrate Ammo.js in Forge.

Moving the player in the model with collisions

Second step, we can play with the DataVisualization API toolkit. For the floor heatmap, we created a grid of sensors with random values. Using linear interpolation between values with updateShadingSurface function, we ended with this nice effect.

Floor is lava effect

The tornado effect was made with Streamlines and gems were made using Sprite viewable API.

Streamline tornado
Gems made with sprite viewables

At this point, we had all the key elements to create our game. We spent all our remaining time to implement the game logic, change the Revit input model for a much appropriate one, replace player with a 3D glTF character, add sounds effect and music, and finally some UI improvements. 

Thursday afternoon we stopped developing the game to prepare the demo and slides for Friday.

Game demo

Now we are waiting for the results which should be announced during the Autodesk Universities. We hope this game pleased the judge. 

No time for rest, we need to prepare our travel to New Orleans for AU2022 !!