Optimizing your project
The following tips will help to ensure that your content, and subsequently the experience itself, is being optimized effectively.
Optimizing 3D models
3D Models are great for encouraging user engagement and interaction, but can increase the size of a project exponentially if not used carefully.
Optimize the geometry
3D models with a higher polygon count will produce a larger file when exported.
The model's polygon count can be reduced through manual optimization of the mesh.
Alternatively, many 3D software and online solutions (such as the ones below) offer built-in tools that perform basic mesh optimization.
Export texture files at a lower resolution
Even if a 3D model has a low polygon count, the texture files can still lead to the model having a large storage size. Finding a balance between a texture file's most suitable resolution and its file size is especially important when developing for certain devices.
For example, textures should be as small as possible for a mobile AR experience (e.g 512px x 512px) due to smaller screen sizes.
A 3D website on the other hand may benefit from a slightly larger texture (1024px x 1024px) as the difference in quality may be more noticeable, depending on the asset.
Although a balance (and trial and error) is important, we'd always recommend keeping the file size for assets as low as possible.
Useful 3D model optimizing tools
Below is a list of helpful websites or softwares which you can use to optimize your 3D models.
Click on the tool title to be taken to the relevant third party website.
3D optimization tool | Description |
---|---|
Blender | A free and open source 3D creation suite. |
Vectary | An online platform for creating and managing 3D models. |
glTF Report | A viewer, analysis, and validator tool for 3D models in the .glTF or .glb formats. |
RapidCompact | Convert and optimize 3D models. Free for non-commercial use. |
Optimizing videos
Videos help to boost user engagement, but can increase the size of a project if not optimized when preparing for exporting, or when being used in your project.
Most softwares have an Export for Web checkbox when exporting videos. Make sure this is enabled when exporting videos for web experiences.
Use streamed videos instead of local video files
If an imported video is particularly large, it will increase the overall project's final size too. To avoid this, videos can be hosted externally and streamed in to your project by using the video's hosted URL in the Source
property in a video component.
If videos are not particularly large, or streaming a video into the project is not possible, you can use the following tips to optimize your local video files.
Export videos at a lower bitrate
Video files have a bitrate property, which is the amount of data the file stores and processes over a set amount of time.
Reducing the video's bitrate will reduce its final quality, but will also decrease its file size.
Try exporting your video at different bitrates until you find an acceptable balance between quality and file size.
Export videos at a lower resolution
Videos that won't be the primary focus of a scene can be exported at a lower resolution, as a reduction in quality will be less noticeable.
We'd recommend that videos do not exceed 1920px in either dimension for the best compatibility.
Use custom dimensions to trim unused areas of the frame
The dimensions of videos which contain a large amount of blank space can be trimmed to remove unnecessary areas of the frame, resulting in a video with smaller dimensions and therefore a smaller file size.
Use shorter, loop-able videos where possible
Videos that are comprised of a short, looping section of video can be exported as a single looped section, and be set to loop within Mattercraft.
Useful video optimizing tools
Below is a list of helpful websites or softwares which you can use to optimize your videos.
Click on the tool title to be taken to the relevant third party website.
Video optimization tool | Description |
---|---|
Handbrake | A free and open source software for optimizing and converting videos. |
OpenShot | A free and open source video software. |
Adobe Premiere | Downloadable video editing software. Free trial then subscription fee. |
Shotcut | A free and open source video software. |
Optimizing images
Export images at a lower resolution
The resolution of digital images is determined by their pixels per inch (PPI) setting, which sets the image's pixel density. The higher this PPI is, the sharper the image will appear.
Reducing an image's pixel density value will reduce its overall resolution and result in a smaller file size.
In the diagram above, the UI content on the left was exported at 1024px x 1024px, while the UI content on the right was exported at 512px x 512px. Though the latter produced a significantly lower file size, the reduction in image quality is not noticeable due to its small scale relative to the scene.
The standard resolution for digital images is usually 72 PPI.
Use .JPG images instead of .PNG images
The .PNG
file format uses a lossless form of data compression, meaning that as a file's size is reduced, its original quality is maintained. This compression method results in larger file sizes than those exported to file formats that use lossy data compression, such as .JPG
.
The images above were exported with the same settings and resolution, with different formats. The image on the left is a .PNG
image with a file size of ~303 KB, while the image on the right is a .JPG
image with a file size of ~90 KB.
Useful image optimizing tools
Below is a list of helpful websites or softwares which you can use to optimize your images.
Click on the tool title to be taken to the relevant third party website.
Image optimization tool | Description |
---|---|
Photopea | An online image editor. |
GIMP | Free downloadable image editing software. |
TinyPNG | Online tool which allows you to reduce the size of your images whilst maintaining quality (and transparency). |
Optimizing audio
Export audio files at a lower bitrate
Audio files have a bitrate property, which is the amount of data the file stores and processes over a set amount of time.
Reducing the video's bitrate will reduce its final quality, but will also decrease its file size.
Try exporting your audio at different bitrates until you find an acceptable balance between quality and file size.
Trim long audio tracks
Long audio files that are comprised of a shorter, looping audio track can be exported as a single looped section instead. You can then use Mattercraft to loop the audio in your project.
Useful audio optimizing tools
Below is a list of helpful websites or softwares which you can use to optimize your audio.
Click on the tool title to be taken to the relevant third party website.
Audio optimization tool | Description |
---|---|
Audacity | A free and open source audio software. |
Cubase | Downloadable music production software. Free trial then one time payment. |
Logic | Downloadable music production software for Mac and iPad. Free trial then one time payment. |