Photo to 3d: Creates 3d models from photos using Node.js
Switch branches/tags
Nothing to show
Clone or download
Latest commit 1e2c6ce Oct 5, 2018

Photo to 3D (photogrammetry) sample

Platforms Node.js npm License

Forge API: oAuth2 Reality-Capture



This sample illustrates the Forge Reality Capture API's photogrammetry workflow:

  • Create a photo scene
  • Add photos to a scene
  • Generate a 3D mesh model
  • Obtain a download link for the model





  1. Forge Account: Learn how to create a Forge Account, activate subscription and create an app at this tutorial;
  2. Node.Js and basic knowledge of JavaScript;
  3. Visual Studio Code or any other code editor.

For using this sample, you need an Autodesk developer credentials. Visit the Forge Developer Portal, sign up for an account, then create an app. For this new app, use https://localhost:3000/api/forge/callback/oauth as Callback URL. Finally take note of the Client ID and Client Secret.

##Running locally

For localhost testing:

  • FORGE_CLIENT_ID and set it to above-mentioned Client ID
  • FORGE_CLIENT_SECRET and set it to above-mentioned Client Secret
  • FORGE_CALLBACK_URL and set it to https://localhost:3000/api/forge/callback/oauth
  1. Clone this project or download it. It's recommended to install GitHub desktop. To clone it via command line, use the following (Terminal on MacOSX/Linux, Git Shell on Windows):

     git clone
  2. Using the command line, go into newly created folder (make sure sure that the current directory contains package.json) and type:

     npm install

    to install all the dependencies.

  3. Using the command line, type

     node index.js

    to start the local server

  4. Open a browser and navigate to:



To deploy this application to Heroku, the Callback URL for Forge must use your address. After clicking on the button below, at the Heroku Create New App page, set your Client ID, Secret and Callback URL for Forge.


Watch this video on how deploy samples to Heroku.

Further Reading




Other samples:


This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Eugene Chua

Updated By