Taking screenshots

Take screenshots of what is currently visible in your 3D Viewer. Try it in the viewer on the right: move the model to a nice viewpoint, pick a background and take a screenshot.

  • PNG
  • Transparent or colored background
  • Includes any measurements
  • Also in the 2D Viewer
  • Server-side rendering

In the browser or on the server

In the browser, screenshot() on the 3D Viewer returns a PNG of the current view. Give the viewer a transparent background to get images that are easy to use in reports and presentations, or pass a color to use a solid background instead. The 2D Viewer has the same function, with an extra option to leave out the text labels.

BIM.works can also render images on the server, without a browser. Give one or more camera viewpoints and an image size, and the BIM.works API renders the model for you.

// In the browser: a PNG of what the 3D Viewer shows.
// With a transparent viewer background, the PNG is
// transparent unless you pass a color.
viewer3d.setBackgroundColor("#ffffff00");
const blob = await viewer3d.screenshot(
  { backgroundColor: "#ffffff" });

// On the server: render a model from a camera
// position (in meters)
const rendered = await client.render.render(
  "<VERSION_UUID>",
  { pixelWidth: 1920, pixelHeight: 1080 },
  [{ position: { x: 20, y: -30, z: 15 },
     target: { x: 0, y: 0, z: 0 } }]);
BIM.works Documentation

Documentation

All components have extensive documentation. Click below to open the 3D Viewer documentation.