Skip to main content
Version: 3.9.0

Technical Optimization

Making sure your effect meets our technical requirements is crucial for distribution and usability. If your effect failed to pass the in-tool performance test or was rejected after submission, refer to the following recommendations to ensure it complies with our quality assurance requirements.

Effect QA Requirements

Once you've submitted your effect, it goes through an internal performance test and QA review. We'll check the following specifications to ensure your effect meets the necessary criteria for publication:

  • Effect package size: No more than 8 MB
  • Image size: No more than 1025 KB
  • Image resolution: No more than 1024 x 1024 px

To check the total package size of your effect:

  1. Open your effect in Effect House
  2. In the titlebar, click the Click to update button
click to update effect size

The effect size indicator refreshes with the package size.

effect size indicator
note

While an effect might pass QA, it's possible that it won't function as expected on less powerful devices, especially Android ones. If an effect incorporates high-performing features, it may trigger a warning message saying "This effect doesn’t work with this device." Many effects can't be used on certain Android phones because their devices don't support WebGL used in Effect House. Community Effects are compatible with most newer iOS and Android devices, but they won't work on devices as old as Samsung Galaxy J3, LG Leon H324, Huawei Honor 4X, and Cubot J3.

Best Practices for Effect Optimization

Some objects, components, and assets can lead to GPU inefficiencies and heavy resource usage. Consider simplifying your effect by using fewer high-usage features and following the best practices outlined below.

High Performance Features and Capabilities

In most cases, adding more algorithms to your effect can lower its performance. We highly suggest tidying up your projects by removing any assets or features you're not using.

Consider merging similar effects into a single component. For instance, combine all stretch effects into one Face Stretch object instead of having multiple separate Face Stretch objects.

Generative Effects

Generative Effects have very high performance impact. It's best to avoid mixing them with lots of other features or using more than one Generative Effect in your creation. Otherwise, you might experience a drop in frames per second (FPS), which could lead to a failed QA check.

Body Avatar Drive

Body Avatar Drive has a a very high performance impact. It's best not to combine Body Avatar Drive with other features. Otherwise, you might experience a drop in FPS, which could lead to a failed QA check.

Segmentation

Segmentation has a high performance impact. It's best to avoid mixing a segmentation object with too many other algorithms, such as Face Inset and Head Tracker. Otherwise, you might notice a decrease in FPS, which could lead to a failed QA check.

Skybox

Skybox has a high performance impact. Using a Skybox material with a high-resolution cubemap texture has a high performance cost. It's best to stick to just one Skybox instead of using multiple ones.

Face Inset

Face Inset has a medium performance impact. Adding more Face Inset objects to your scene can make your effect run slower.

Lighting Sources

You can use up to three lights in your scene. Just remember, adding more lights can slow down performance.

Text

We currently allow a maximum of 400 characters.

Asset Optimization

3D Assets

Learn about 3D assets preparation.

Model
  • Use triangle polygons and quad polygons for your models
  • For the best performance, make sure the total number of triangles in your entire effect is less than 100,000. Each model can have up to 50,000 triangles per FBX file, but it's better to keep each FBX mesh under 30,000 triangles for optimal performance.
Rigging
  • Each FBX file can have up to 50 joints
  • You can add multiple FBX files to your effect, and each one can contain up to 50 joints. This limit applies separately to each FBX file.
  • A maximum of 4 joint influences is supported

2D Assets

Learn more about 2D asset preparation. For optimal performance,follow these guidelines:

  • The suggested resolution is 512 x 512 px, with a maximum of 1024 x 1024 px
  • Each PNG file should be no more than 1 GB
  • Compress your assets to optimize imported 2D assets
  • The suggested FPS for an animated texture is 12 frames. Using a higher FPS may result in larger file sizes and reduced performance.
  • Limit the number of 2D layers in your scene. If possible, consider merging 2D textures together into a single layer.

Troubleshooting

Your effect might not pass the performance test within the tool or the QA check upon submission for various reasons. These include a low frame rate, higher memory usage (RAM), and increased CPU utilization. When creating and testing interactive effects, it's crucial to look into these potential causes of underperformance.

Frames Per Second

Frames per second (FPS) measures how smoothly an effect runs on a device, indicating the number of frames it can play per second. The highest supported FPS is 30 frames.

Low Frame Rate

A low frame rate can make your effect look choppy. The following are some guidelines to help you avoid this:

  • Reduce the resolution, size, and number of images:
    • Compress textures
    • Keep sequence frames under 200 x 200 px
    • Aim for a frame rate of 8 FPS
    • Display no more than 50 images simultaneously
  • Reduce the number of texture sequence frames:
    • A large number of sequence frames playing simultaneously can lead to high CPU usage, which can impact the FPS
    • Use a maximum of 20 2D sticker sequence frames, with no more than 50 frames allowed
  • Reduce the number of rendered objects and rendering quality in the scene:
    • Be cautious with multi-materials, particularly PBR materials that interact with lighting effects
      • The cost of PBR materials increases as they cover more pixels. A plane filling the entire screen is four times costlier than one covering only 25% of it.
      • Each light and shadow in the scene compounds the cost of the material
      • Render objects in the front
    • Use the same material for similar models, like both shoes in a pair or earrings, to save resources
    • Consider using Unlit materials instead of PBR ones if your model doesn't require realistic lighting
    • Limit the usage of light sources and turn off shadows if they're not necessary
    • Reduce the number of models rendered in your scene and simplify them by decreasing the number of faces and refining the model resolution
      • Keep models under 12,000 triangles. To check if you're exceeding vertex limitations:
        • Scale down your model significantly within the scene
        • If the FPS remains constant, you're likely vertex-bound
        • If the FPS drops, you're likely fragment-bound, indicating that your shader is too demanding. In this case, reduce the number of lights, shadows, and shader features.
  • Reduce the number of face effects:
    • Keep the number of face effects to a maximum of 5
    • Consider the performance cost ranking when choosing face effects: Eye colors have the highest cost, followed by eyelashes, face mask, and then eye effects
    • When importing images, combine multiple effects into one layer or image
  • Reduce or avoid complex shader calculations:
    • Use the blur effect only when necessary, and turn it off when it's not needed
    • If your shader involves extensive image sampling, optimize the algorithm or decrease the size of the sampled image
    • Replace complicated shader algorithms with optimization algorithms that produce similar effects
  • Reduce the number of render groups

Memory Increment

Memory increment refers to the amount of memory that increases after loading the effect. If an effect has a high memory increment, it's more likely to cause the app to crash.

Increased Memory Usage

The following are some guidelines to help you reduce memory usage:

  • Reduce the resolution, size, and number of images:
    • Compress textures
    • Keep sequence frames under 200 x 200 px
    • Aim for a frame rate of 8 FPS
    • Display no more than 50 images simultaneously
  • Reduce the number of texture sequence frames:
    • A large number of sequence frames playing simultaneously can lead to high CPU usage, which can impact the FPS
    • Use a maximum of 20 2D sticker sequence frames, with no more than 50 frames allowed
  • Use fewer render textures in your project
  • Be mindful of your assets and textures. High-resolution textures and 3D models can use up a lot of memory.
  • Avoid using high-resolution assets, textures, and 3D models
  • Don't load multiple large sound files at the same time
  • Avoid complex physics simulations, as they can consume a lot of memory by storing data for numerous objects

CPU Cost

CPU costs are a key performance indicator that can't be optimized alone. The main factors affecting CPU costs are the complexity of algorithms and the number of objects in the scene.

High CPU Usage:

The following are some guidelines to help you reduce CPU cost:

  • Use simpler algorithms
  • Reduce the number of rendered objects and rendering quality in the scene:
    • Be cautious with multi-materials, particularly PBR materials that interact with lighting effects
      • The cost of PBR materials increases as they cover more pixels. A plane filling the entire screen is four times costlier than one covering only 25% of it.
      • Each light and shadow in the scene compounds the cost of the material
      • Render objects in the front
  • Reduce the number of texture sequence frames:
    • A large number of sequence frames playing simultaneously can lead to high CPU usage
    • Use a maximum of 20 2D sticker sequence frames, with no more than 50 frames allowed
  • Reduce the texture sequence image size:
    • Decrease the size of texture sequence images. Larger images require the engine to use more CPU to decode them.
    • Moderately increase the memoryLimit attribute of the sequence frame to 2,000,000
  • Simplify your visual scripting:
    • Optimize interactive effect loops
    • Optimize trigger events, especially those triggered frequently, such as the Update node
  • Be cautious with real-time physics simulations, especially in interactive effects with many objects or complex interactions
  • Remember that while most graphics rendering is handled by the GPU, certain rendering tasks can fall back on the CPU, especially in systems with integrated graphics