Stream Optimization

When optimizing for YOM, it's crucial to understand the distinct performance considerations for the stream, game, and server components:

  1. Stream: Focus on minimizing latency and optimizing video compression for smooth playback across devices.

  2. Game: Concentrate on frame rate, visual quality, and efficient resource usage within Unreal Engine.

  3. Server: Prioritize network performance, concurrent user capacity, and efficient data processing for multiplayer experiences.

Each component requires specific benchmarking and optimization techniques to ensure optimal overall performance.

Stream Benchmarking

To assess your stream's performance, click the "information" icon in the modal. This reveals a UI displaying:

  • QP (Quantization Parameter): Indicates the level of video compression applied.

  • Latency: Measures the delay between the browser and the game.

  • FPS (Frames Per Second): Shows how quickly the game renders.

  • Ping: Represents the distance between the game and server (relevant for multiplayer games).

Game Profiling

For optimizing the performance of your game, we have a comprehensive guide available: Download the YOM Optimzation Guide. It provides valuable insights, tips, and best practices to ensure optimal performance.

Profiling is crucial for analyzing performance issues and determining necessary optimizations. Here are key points to remember:

  • Profile early and often

  • Test on target hardware as soon as possible

  • Ensure your development team understands profiling basics

  • Optimize after profiling shows problems

Profiling Best Practices

  1. Minimize interference:

    • Turn off unnecessary features (e.g., TAA, V-Sync)

    • Disable Framerate Smoothing in Project Settings

  2. Profile in a build:

    • Use a test build when possible

    • Testing in a dev build can inflate draw thread with noise/interference

  3. If profiling in the editor:

    • Use standalone mode

    • Set the editor to NOT update in realtime

    • Minimize the editor window

General Profiling Process

  1. Identify bottlenecks:

    • Game Thread

    • Render Thread (GPU/CPU)

    • Use r.ScreenPercentage 10 to quickly check if you're GPU bound

  2. Use profiling commands:

    • stat unit: Shows largest numbers indicating likely bottlenecks

    • stat unitGraph: Displays line graph playback; heartbeats/spikes show repeating hitches

    • Other useful commands: stat fps, stat scenerendering, stat gpu, stat engine, stat streaming, stat lighting, stat RHI

  3. Analyze results:

    • Frame time

    • CPU Game Thread (Code or Blueprint)

    • CPU Draw (Object count, draw calls, culling)

    • GPU Render (Shader complexity, shader calls, overdraw, lights/lighting)

View Modes

Use these view modes to identify specific issues:

  • Shader Complexity: Shows shader cost and overdraw

  • Quad Overdraw: Reveals overdraw for simplification

  • Light Complexity: Displays the complexity of light

  • Lightmap Density: Shows texel density for lightmapping

  • Stationary Light Overlap: Highlights areas where more than 4 stationary lights affect objects

Best Optimization Practices

  1. Lighting:

    • Directional Lighting should NOT be stationary

    • Limit light actors per level area and keep light radii small

    • Disable shadow casting on unimportant assets

  2. Meshes and LODs:

    • Review meshes for polycount

    • Use LODs and Nanite

    • Use (Hierarchical) Instanced Static Meshes

  3. Textures:

    • Clamp max texture size of objects

    • Pack/compress greyscale textures in RGB channels

    • Use texture atlases for meshes

    • Keep Lightmap resolution as low as possible

  4. Materials and Shaders:

    • Use switch parameters in pixel shaders to turn off unneeded nodes

    • Check Material Instruction Counts (e.g., 350 for characters, 150-200 for environment)

    • Use trimsheets and shaders applicable to multiple assets

  5. Performance:

    • Disable Motion Blur

    • Avoid temporal effects like TAA

    • Remove as many transparent pixels as possible

  6. Asset Management:

    • Use Window > Developer Tools to merge actors into 1 asset

    • When texture pool is over budget, use r.Streaming.PoolSize value in MiB

    • Use a slush/dummy project to review marketplace content

    • Create a custom template as a clean slate for projects with tailored default settings

By following these optimization techniques and best practices, you can significantly improve the performance of your metaverse experiences. Remember to profile regularly and focus your optimization efforts on the areas that show the most significant impact on performance.

Last updated