Before publishing an effect you should experiment with different compression settings to make your overall project size as small as possible. Smaller effects are quicker to load and this can improve the number of impressions your effect gets.
Any compression you apply in Spark AR Studio won't affect your original files.
It's also worth taking a look at our guide to optimization, for other techniques to help reduce the size of your effect.
To help decide which textures would benefit from compression, you can see the file sizes for textures in both downloaded and unpacked bundles for each device type (iOS, Android, Older Android).
This is shown in the Inspector under Compression, when a texture is selected in the Assets panel.
You can also find which textures are taking up a lot of space in the Asset Summary.
There are three possible compression settings in Spark AR Studio for each target device (iOS, Android, Older Android):
Spark AR uses automatic compression for all files when you add them to a project. This finds 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:
We recommend adjusting the compression settings for all textures at the same time first, then experimenting with individual textures if you need to.
Do this in the project properties:
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 Quality 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 slider before adjusting the Resolution.
To edit compression settings for each texture per device type:
You’ll see options to edit compression Format, Max Resolution, Quality and Method. The available options for Format vary by device type.
Keep in mind that texture formats such as ETC2 and PVR result in better performance in lower end devices, despite the larger file size.
The following Format options are available for iOS devices:
PVR formats on iOS have the best rendering performance, although they tend to have a slightly larger file size than PNG.
The following Format options are available for Android devices:
ETC formats on Android achieve the best rendering performance (although they tend to be a bit larger in size than PNG).
You can choose from the following Format options:
Max Resolution, Quality and Method
Change the Max Resolution option to select texture’s maximum dimensions (width and height) of the texture. A smaller size will result in smaller textures, reducing the size of your effect.
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 impacts the file size.
You can also choose a compression Method. These settings let you choose to prioritize either compression level or speed. For example, Fastest is the quickest method but the compression is the poorest whereas Best takes compression to the highest level but it is very slow to complete.
You can test the appearance and performance of your effects after applying compression using the Spark AR Player app.
You can find which textures are taking up a lot of space in the Asset Summary. Then, you can decide where reducing texture size and applying compression will have the most impact.
To see the 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 selected in the Assets Panel. The file sizes for downloaded and unpacked bundles are listed under Compression in the Inspector:
You can also see which assets aren't being used in your effect in the Asset Summary. Removing these assets can improve performance.
If there are unused assets in your project, you’ll see them under Review Unused Assets button.
Remove any unused assets unless you know they're referenced in a script or the Patch Editor.