holoride
Search Results for

    Show / Hide Table of Contents
    ❮ Quality & Performance
    Framerate Optimization ❯

    Scene Generation and Update Time

    An essential optimization target is the total compilation latency of your procedural scenes. The compilation cycle includes downloading geographic features (Map Tiles) from map servers, parsing metadata, evaluating mathematical node modifiers inside the active Elastic Graph, deforming native Unity terrain meshes, and instantiating 3D game props.

    Because these operations run continuously in the background as the player moves, slow generation updates can result in the vehicle outrunning the procedural compilation boundary—causing the passenger to fly into an uncompiled, empty void.

    To maintain perfect synchronization on mobile devices, HMDs, headsets, and In-Vehicle Infotainment (IVI) systems, implement the following guidelines:


    1. Tuning Generator Extents and Resolution

    The performance footprint of procedural generation is directly proportional to the physical area and detail density configured on your ElasticSceneGenerator component:

    • Tuning ESG Extents: The extents parameter determines the total square area generated around the player. Because geometric complexity scales with area, cutting the extents by 50% quarters (almost 75% reduction) the computation required for OpenStreetMap-dependent nodes (such as the RoadNetworkMask and RoadNetworkSpawner).
      • Action: Set the smallest bearable Extents parameter that prevents background assets from popping into view too abruptly.
    • Tuning ESG Resolution: The resolution parameter determines the sampling density of terrain maps and height grids. Reducing the resolution by 50% quarters the calculations required by every map node in your graph.
      • Action: Set the smallest bearable Resolution parameter that still preserves important terrain features and road clearance details.

    2. Slimming and Re-Using Node Graph logic

    The most effective strategy to minimize generation latency is to keep your Elastic Graph slim and efficient:

    • Eliminate Redundant Subtrees: It is extremely easy to re-use identical node computations by branching a single output port to multiple consumer inputs. Avoid creating duplicates of similar nodes (such as multiple PerlinNoise nodes with slightly offset scales). Instead, compute the noise once and branch the output.
    • Harness Portals: Portals are a visual graph utility that let you route connections across the editor window without drawing long, messy lines. Portals are computationally free and should be used extensively to emphasize graph re-usability.
    • Optimize Node Evaluation Order: Always place expensive spatial operations after filters have pruned your coordinate list. For example, connect a RemoveByMap filter before feeding coordinates into a RotateTowardsGradientDirection or SetHeightsByMap modifier. This guarantees that expensive rotational math is only calculated for coordinates that survived the clearance filters.
    Tip

    Diagnostic Profiling with Verbose Logging:
    To isolate exactly which nodes are causing compilation delays in your active Elastic Graph, navigate in Unity to Project Settings > holoride > Enable Verbose Logging. When enabled, the Unity Console will log the precise processing time in milliseconds for every single node in the graph during evaluation. Use this diagnostic tool to identify and refactor expensive nodes—such as Pose Source nodes generating thousands of un-culled poses before filtering.


    3. High-Performance Spawning Alternatives

    • Prefer the PrefabSelectorNode: When spawning varied decorations, utilize a single spawner node connected to a PrefabSelector rather than instantiating individual spawners for different masks. This merges separate list queries into a single, highly optimized iteration cycle.
    • Harness GridSpawner for Dense Props: For dense environmental decoration (such as grass clumps, forest undergrowth, or loose rocks spaced less than 20 meters apart), always choose GridSpawner over PoseSetSpawner. The GridSpawner operates on highly optimized coordinate matrices, which is significantly more performant than running full list filter pipelines.

    4. Mitigating Worst-Case Network Latency

    In production, physical vehicle speeds can exceed the compilation rate of background map downloads. Additionally, cellular network connections can drop in tunnels or remote regions:

    • Constrain OSM Query Sizes: Ensure your custom Overpass queries (e.g. [building] or [amenity]) are tightly filtered. Querying dense global features inside cities can trigger massive map tile payloads, stalling the background compiler thread.
    • Implement Offline Fallback Graphs: Design a lightweight, internet-independent fallback scene setup (such as a simple graph evaluating Perlin noise hills with standard procedurally seeded forests). If cellular networks fail or the vehicle travels too quickly, the engine can transition to this lightweight fallback scene, keeping the player fully immersed until connectivity resumes.

    ❮ Quality & Performance
    Framerate Optimization ❯
    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint