Optimize Your Experience


Optimizing your experience is the process of configuring your assets and Studio settings to keep your frame rate and performance levels high for devices with memory and graphics processing unit (GPU) limitations. This process ensures that nearly every user has the same gameplay and visual experience while they're viewing your environment.

Using the Environment Art - Optimizing .rbxl file as a reference, this section of the environmental art curriculum shows you how to review and configure your place file for optimal graphics, including guidance on:

  • Reviewing the physics and rendering parameters of each asset to confirm they preserve memory and engine performance.
  • Culling excess texture, geometry, or transparencies that unnecessarily increase the amount of calculations the Roblox engine must perform to render your assets.

While the Roblox engine handles most optimization work for you, you can assist in these optimization efforts by utilizing the Microprofiler to see where it takes more time to render specific frames. Using this information, you can make informed decisions about what assets need your attention in regards to their parameters or excess content.

Review Physics and Rendering Parameters

In Assemble an Asset Library, you learned how important it is to set physics and rendering parameters that allow your assets to retain their high visual quality across devices with memory and GPU limitations. However, it's common as you construct your environment to adjust these parameters according to an asset's contextual position and purpose within your experience. For example, much of the foliage in the final sample laser tag environment casts shadows despite a performance cost because it adds to the realism of the environment.

When you modify physics and rendering parameters, it's useful near the end of the development process to review all parameters to see where you can optimize a parameter while maintaining aesthetic goals and gameplay requirements. To illustrate, you can disable BasePart.CastShadow property for the foliage near the edges of the gameplay area to save on performance without interfering with a user's gameplay or visual experience.

Cull Nonessential Content

After you review your physics and rendering parameters, you can review the assets themselves to see where you can cull any nonessential content from the experience that doesn't affect your gameplay, such as identical textures with different assetIDs, complex geometry with a high vertice count, or transparencies that layer on top of each other depending on the camera view. The following sections detail what you can do to review this content, and why it helps optimization efforts.

Remove Duplicate Textures

As you transition between developing your assets and constructing your environment, it's common to iterate over meshes or textures as you find what's necessary for your aesthetic goals or gameplay requirements. If you don't convert your assets into packages, when you import these iterations into Studio, you're making unique assetIDs that the Roblox engine needs to reference as it renders your assets within the environment.

For example, if you were to import the following two fire hydrant meshes into Studio separately, even if they are exactly the same in appearance, the Roblox engine treats them as two objects with unique assetIDs. The more unique calls the engine needs to make, the more of an impact on memory and performance. For this reason, it's important to confirm when you're reusing an asset multiple times, each instance of that asset uses the same assetID so that the engine only needs to make a single call to render it repeatedly.

Two of the exact same fire hydrant with unique assetIDs. There is no visual difference but the duplicate assetIDs negatively impacts performance.

Optimize Geometry

If you find that you need to make more adjustments to increase frame rate across devices, it's useful to see where you can optimize your geometry by either:

  • Combining groups of meshes into a single asset.
  • Decreasing the polygon count of assets with geometric complexity.

Expanding on this first technique, every unique asset in your experience represents a draw call on the GPU in which it sends a signal to the GPU to call information in order for the Roblox engine to render the asset correctly. The more unique assets you have, the more draw calls the system needs to make. For this reason, if you have a group of meshes that make up a larger component in your experience, you can group them together in third-party modeling tools to reduce the need for multiple draw calls.

To illustrate this point, the final sample laser tag environment parents multiple parts and meshes together to create the large towers outside of the building. If you were to combine all of these individual components together, you could make it a single asset with only one assetID, and reduce the number of draw calls from 8 to 1. However, it's important to note that this technique removes your ability to freely change the visual and physical characteristics of each component, such as its position or material.

For example, in the following image, the left tower remains multiple assets under a Model object, and the right tower is a single asset. You can modify each component of the left tower individually, but when you modify the right tower, such as changing its color to black, it affects the entirety of the object. This is why it's important to only consider this technique near the end of your environment's development when you know where you can improve performance without affecting your aesthetic goals.

A front view of the two towers. The tower on the left includes multiple assets under a single model, while the tower on the right decreases the amount of assets by removing all texture objects.

Expanding on the second technique, assets with geometric complexity have more polygons, meaning they have more vertices that the engine needs to calculate as it renders their visual appearance. This means that assets with less complexity and fidelity are less costly to render, leading to an improvement in both performance and memory.

Delete Layered Transparencies

To provide a sense of realism to the environment, the final sample laser tag environment includes many meshes with varying levels of transparency, such as the foliage in the outdoor space, glass on the futuristic signage or planter railing. When the camera views multiple semi-transparent objects that are in front or behind each other, the Roblox engine must render the overlapping pixels multiple times to account for the transparent areas. This process is called high transparency overdraw, and it comes at a significant impact to performance.

For example, consider the following view of a planter in the sample environment. The engine must render the transparent areas of the leaves between the plant closest to the camera to the plant closest to the outdoor area in layers, equating to hundreds of thousands of overdrawn pixels. To alleviate some of this impact, it's important to review the layout of all semi-transparent objects in your environment, and ensure there aren't too many places where there are many layers of overlap, especially in large areas of the screen.

A Rthro avatar facing a planter with multiple plants with transparency between the leaves.
A side view of the Rthro avatar facing a planter with multiple plants with transparency between the leaves, and example layers of overdrawn pixels are highlighted to show where there is overdrawn in the environment.

When you finish reviewing all of your content to ensure it's optimal across devices, your experience is now ready for publication!