Roblox developers now possess significantly more flexibility when generating PBR materials at runtime، The Roblox Geometry Team has officially released a new Studio Beta for the CreateSurfaceAppearanceAsync update, which drastically expands the capabilities of the AssetService method، Previously, developers were restricted to using EditableImages to create SurfaceAppearances during active gameplay، This limitation often imposed higher memory costs and more complex workflow requirements.
With this new update, the system now supports the use of DataModel Content and published Asset IDs directly within the API، This enhancement allows developers to mix various asset types for custom SurfaceAppearances, ultimately leading to reduced memory footprints، The engine can now transcode these assets into more efficient formats, facilitating a smoother and more optimized rendering pipeline for dynamic in-game customization systems.
How to Enable the Studio Beta
To begin experimenting with these expanded capabilities, you must activate the specific beta feature within your Roblox Studio environment، Follow these steps to prepare your project:
- Open your experience in Roblox Studio.
- Navigate to the top-left menu and select the File tab.
- Choose Beta Features from the dropdown menu.
- Locate the option labeled “Mixed Content for CreateSurfaceAppearanceAsync”.
- Check the box to enable the feature.
- Restart Roblox Studio to ensure the changes are applied to your environment.
Once you have restarted Studio, you can update your existing scripts that utilize the AssetService:CreateSurfaceAppearanceAsync method، The updated method allows you to provide a table of maps, enabling a hybrid workflow that combines EditableImage, DataModel Content, and standard Asset IDs (rbxassetid://) seamlessly.
Use Cases for Mixed Content
The CreateSurfaceAppearanceAsync update enables several sophisticated workflows, particularly for developers focused on character customization, dynamic vehicle systems, or interactive art tools، The flexibility to combine different asset types is key to these new possibilities:
- Mixing Existing Assets: You can create custom SurfaceAppearances by pulling together various maps. For example, you might use a dynamic EditableImage for a ColorMap (allowing for real-time tinting), while simultaneously pulling a pre-existing Asset ID for the MetalnessMap or RoughnessMap. This avoids the need to recreate static assets at runtime.
- Sharing Completed Artwork: By utilizing DataModel Content, you can share artwork more effectively. If you are building a painting tool, you can create a ColorMap and convert it into DataModel Content once the painting is finalized. This effectively distributes the completed work to all players on the server, ensuring the textured canvas is visible to everyone.
- Combining Asset Types: Advanced technical demos show that you can mix all three supported types—EditableImage, DataModel Content, and Asset IDs—in a single implementation. This is useful for complex objects that require both dynamic, generated textures and optimized, static assets.
Best Practices for Performance and Optimization
To ensure your experience remains performant, the Roblox Geometry Team has highlighted several best practices regarding this CreateSurfaceAppearanceAsync update:
- Prioritize DataModel Content: When you are finished modifying an image, such as a painting or generated texture, you should convert your EditableImage object to DataModel Content. This format is highly optimized for memory and performance. Furthermore, DataModel Content supports Texture Streaming and allows for proper replication from the Server to Clients, making it the superior choice for finalized assets.
- Understanding Server-Side Replication: Be aware that calling CreateSurfaceAppearanceAsync from the server using an EditableImage map currently does not replicate to clients. If you attempt this, clients will see a checkerboard pattern rather than your intended texture. Always consider the replication flow when designing your systems.
- Managing Creation Latency: When mixing DataModel Content or Asset IDs for the first time in a session, the engine performs an initial optimization step to create the optimal PBR material representation. This process may introduce a delay of a few seconds. Developers should be mindful of this “bake time” when designing user experiences that depend on immediate material swaps.
The Roblox Geometry Team is currently gathering feedback on this beta feature as they look toward a full release for live experiences، By integrating these new methods, you can significantly optimize your custom material workflows and provide more visually complex content for your players.
Source: Original report