Articles
The AR Library
The AR Library

Using AR Library

Use AR Library to import complete 3D objects, audio clips, patch assets, textures and scripts into your Spark AR Studio projects. It's a quick and easy way to start building your own effects.

Licensing and attribution

AR Library includes assets provided by Facebook and Sketchfab:

Attribution is provided automatically when people view the effect. You don’t need to provide attribution when publishing your effect

.

To see the license for each asset, select the asset in AR Library.

Opening AR Library

AR Library is a a tool in Spark AR Studio. Download and open Spark AR Studio to get started.

To open AR library, click the Library icon in the toolbar:

You can also open AR Library by:

  1. Clicking Add Asset in the Assets panel.
  2. Selecting Search AR Library.

AR Library will open in a separate window:

Finding assets

To find assets either browse categories in the menu on the left, or use the search bar.

3D Objects

3D Primitaves

You can use these 3D objects for prototyping. To find them:

  1. Open AR Library.
  2. Select 3D Objects in the menu on the left, then 3D Shapes.

Sketchfab 3D models

We've partnered with Sketchfab to provide a huge range of 3D models. Before you can download 3D objects from the library, you'll need to log in with your Sketchfab account. If you don't have a Sketchfab account you can create one for free.

To browse Sketchfab 3D models:


  1. Open AR Library.
  2. Select 3D Objects.
  3. Click View All.

To manage the Sketchfab account you're logged into AR Library with, click Preferences in the toolbar, then AR Library.

Importing 3D objects

When you've selected an object you'll see information about it under Specifications. For example, for 3D objects you'll see how many vertices it has or if there are animations included:

The specifications should help you make sure any assets you import follow our technical guidelines, so your effect works well on different devices.

To add the asset to your project, click Import Free.

Audio files

There's a vast range of loops and one-shot sound files included in AR Library, grouped into 3 categories so you can easily find the sounds you need to build creative sonic experiences. To find them:

  1. Open AR Library.
  2. Select Music and Sound in the menu on the left.
  3. Under Collections, browse the 3 categories:



Categories

Music: Sounds here are tonal and/or rhythmic with a musical nature. This category includes music loops, musical stingers, and instrument elements.

Sound Effects: This category includes sounds that work well as individual design elements, used to emphasize events like interactions and animations. For example, sounds from real and imaginary creatures and realistic sound effects like machines and tools.

Ambient Sounds: Either real or imagined, ambient sounds can set the mood in exciting and immersive ways. For example, by extending sound through loops. Files here include complex sounds blended into single files, letting you quickly create unique soundscapes that reinforce visuals.

Recommended audio file behavior

Next to the name of the audio file we’ve added a recommended behavior:


This is how we think the audio file will work best in an effect. There are 3 recommended behaviors:

  • Loop - For audio files that work well as seamless audio loops, added to the scene with a Single-Clip Controller patch.
  • Loop Layer - For seamless audio loops designed as part of a set of related loops to be played together and mixed between - for example, in response to interactions. Look for sequential files with the Loop Layer label to import a loop layer set into your project. Add them to the scene with the Single-Clip Controller patch.
  • One-Shot - For single, non-looping sounds commonly that work well when played in sync with animations, interactions and gestures. Add them to the scene with the Multi-Clip Controller patch.

Adding the audio file to your project

To add the audio file to your project, click Import Free.

Textures

Use environment textures to add realistic light to objects that use physically-based materials. To find them in AR Library:

  1. Open AR Library.
  2. Select Textures, then Environment Textures.
  3. Select the texture you want to import and click Import Free.

You'll also see the default Blender environment textures available in Spark AR library.

Find out how to use these textures to create the same image-based lighting that you can achieve in Blender.

Blocks

A block is a saved part of a project you can use again and again, export to other projects or share with creators. To find a block in AR Library:

  1. Open AR Library.
  2. Select Blocks.
  3. From the Collections or Browse section, select the block you want to use in your project and click Import Free.

Script packages

AR Library includes a range of useful script packages for adding more functionality to your code. For example, the cannon script package adds the appearance of gravity to objects, and the sparkar-head-rotation-trigger script package provides a function to enable firing events in response to head movements.

To browse and import script packages:

  1. Open AR Library.
  2. Select Script Packages.
  3. Select the package you want to install and click Import Free.

The script package will be listed in the Assets panel under Packages:

Adding script packages to your project

To add a script package to your project:

  1. Open your script file.
  2. Import the script package as follows, replacing spark-ar-library with the library you just installed:
// in script.js 
const library = require('spark-ar-library');
        

Patch assets

Patch assets are ready-made patch graphs. Use them to quickly add logic, visual effects and complexity to your projects. There are 2 categories to choose from:

  • Animation - use these graphs to add animation to objects in your effect.
  • Utilities - to quickly add common functions, like converting units of measurement.
  • Shaders - to add visual effects like gradients, patterns and colored filters.

To find them:

  1. Open the AR Library.
  2. In the menu on the left, select Patch Assets.

The patch asset will be listed in the Assets panel. Drag it into the Patch Editor and connect it to other patches to add it to your project.

Viewing imported assets in Spark AR Studio

When the asset is selected in Spark AR Studio, in the Inspector you'll see:

  • The name of the file.
  • The size of the file.
  • Its components - including any animations and unsupported components.

Adding imported assets to your scene

Add assets from AR Library to your scene like you would any other object or asset imported into Spark AR Studio.

Was this article helpful?