Learn Spark AR Studio

Everything you need to know to create an interactive augmented reality experience.

Clear
Back

Texture Compression in Spark AR Studio

Before publishing an effect you should experiment with different compression settings, to make your overall project size as small as possible. A smaller project size can improve the number of impressions your effect gets.

Any compression you apply in Spark AR Studio won't affect your original files.

Learn about:

It's also worth taking a look at our guide to optimizing effects, for other techniques to help reduce the size of your effect.

Types of compression in Spark AR Studio

All files are automatically compressed when you add them to a project. Spark AR Studio will use the automatic compression setting to find the best type of compression for each texture, for all devices - according to the image's contents.

If you want to compress textures in your project more, or less, you can either:

  • Adjust the compression setting for every texture in your project at the same time, in the project’s properties.
  • Adjust the compression settings for individual textures.

We recommend adjusting the compression settings for all textures at the same time first, then experimenting with individual textures if you need to.

Editing compression for all textures at the same time

You can do this in the project properties:

  1. Select Project in the Menu bar.
  2. Select Edit Properties....
  3. Select Compression.

The Compression Method will be set to Automatic. This setting finds the best type of compression for each texture, for all devices - according to the image's content.



Adjust the slider to apply more, or less, compression. The higher the quality, the less compression will be applied. It's best to experiment with this option before adjusting settings for individual textures.

You can change the Resolution for textures in your project here too. This will set the maximum texture size. A lower resolution can speed up compression and result in lower file sizes, but it will impact the quality of images.

It’s best to experiment with the Quality, before adjusting the Resolution.

Editing compression for individual textures

To see and adjust the compression settings for individual textures:

  1. Select the texture in the Assets Panel.
  2. Go to Manual Compression in the Inspector.

You’ll see options to edit how compression is applied to the texture on iOS, Android and Older Android devices:



Check the box next to the device type that you want to edit compression for, and select a compression option from the dropdown list next to Format.



You’ll see different options for each device type.

Depending on the type of texture you're compressing, some Formats will look better than others. Selecting Smart will apply the same compression method as in the project properties - automatically finding the best type of compression for the texture.

iOS

The following compression options are available for iOS devices:

  • Passthrough - Uses the original file, as it is.
  • PNG - When this option is selected and the Quality is set to high, lossless recompression is used to ensure small file sizes. When loaded into memory these textures will take 24 or 32 bits-per-pixel depending on the presence or absence of an alpha channel.
  • JPEG - Optimizes JPEG files using MozJPEG. When loaded into memory these textures will take 24 bits-per-pixel, no alpha channel.
  • Smart - Optimizes PNG or JPEG files to the smallest possible size, depending on the image contents.
  • PVRTC RGB (2 bit) - 2 bits per pixel, no alpha channel.
  • PVRTC RGBA (2 bit) - 2 bits per pixel, with alpha channel.
  • PVRTC RGB (4 bit)- 4 bits per pixel, no alpha channel.
  • PVRTC RGBA (4 bit) - 4 bits per pixel, with alpha channel.

Android

The following compression options are available for Android devices:

  • Passthrough - Uses the original file, as it is.
  • PNG - When this option is selected and the Quality is set to high, lossless recompression is used to ensure small file sizes. When loaded into memory these textures will take 24 or 32 bits-per-pixel depending on the presence or absence of an alpha channel.
  • JPEG - Optimizes JPEG files using MozJPEG. When loaded into memory these textures will take 24 bits-per-pixel, no alpha channel.
  • Smart - Optimizes PNG or JPEG files to the smallest possible size, depending on the image contents.
  • ETC2 RGB (4 bit) - 4 bits per pixel, no alpha channel.
  • ETC2 RGBA (8 bit) - 8 bits per pixel, alpha channel.
  • ETC2 RGB A1 (4 bit) - 4 bits per pixel, 1 bit alpha channel. A pixel will be either fully transparent, or fully opaque.

Older Android

You can choose from the following options:

  • Smart - Optimizes PNG or JPEG files to the smallest possible size, depending on the image contents.
  • Passthrough - When this option is selected and the Quality is set to high, lossless recompression is used to ensure small file sizes. When loaded into memory these textures will take 24 or 32 bits-per-pixel depending on the presence or absence of an alpha channel.
  • JPEG - Optimizes JPEG files using MozJPEG. When loaded into memory these textures will take 24 bits-per-pixel, no alpha channel.

Max Size and Quality

Once you've selected a Format, you'll be see two more options - Max Size and Quality.

Change the Max Size option to limit the size of the texture. A smaller size will result in smaller textures, reducing the size of your effect. The Smart compression option will reduce texture sizes automatically.

You can't make the size of the texture bigger than the original, unless you resize it internally.

Editing the Quality setting applies more, or less, compression. This impacts how good the texture looks. The highest setting usually results in better quality effects - but devices will take longer to calculate the compression. For PNG and JPEG compression options, the quality setting effects the file size.

Previewing compression

You can test the appearance and performance of your effects after applying compression using the Spark AR Player app.

How to check the size of all textures in your project

You can find which textures are taking up a lot of space in the the Asset Summary. Then, you can decide where reducing texture size and applying compression will have the most impact.

To see the Asset Summary:

  1. Select View in the Menu bar.
  2. Click Show/Hide Asset Summary.

A list of all the assets included in your project, for each device type, will appear underneath the Viewport.

You'll see both downloaded and unpacked bundles. Unpacked bundles are the unpacked files, ready to be displayed. Downloaded bundles are the zipped up files that get downloaded to a device.

You can also see the size of each texture when it's select in the Assets Panel. The file sizes for downloaded and unpacked bundles are listed under Image Size in the Inspector:



Identifying and removing unused assets

You can also see which assets aren't being used in your effect in the Asset Summary. Removing these assets can improve performance.

Assets that are being used in the effect have a tick next to them under the Used column:

If assets are referenced in a script or the Patch Editor, they won't be shown as Used.

Remove any assets that don't have a tick next to them - unless you know they're referenced in a script or the Patch Editor.

To remove an asset:

  1. Right-click on the asset in the Asset Summary.
  2. Select Delete from the menu.

Learn more

Join the Spark AR Creator's community

Find inspiration, see examples, get support, and share your work with a network of creators.

Join Community

Frequently asked questions

Have a specific question? Maybe it's been answered.


Read FAQs
Was this document helpful?