Search Unity

Best way to load stored vegetation instances in streaming world

Discussion in 'World Building' started by BIGTIMEMASTER, Jan 17, 2020.

  1. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Hello,

    I have a streaming world that consist of 100 terrains, each being 1km. Performance is fine there on the naked terrains.

    We use Vegetation Studio Pro to spawn instances of trees and grass across the terrain. These instances get baked into a storage object called Persistent Storage. This storage object is described as "serialized forced binary to save loading space and memory."

    There is a limit to how much instances we can force into each Persistent storage object. Over 4gb and it corrupts. 4gb will store about 20km's worth of vegetation.

    We tested having about 20 persistent storage devices, all being culled and enabled along with the terrain tiles from the same scene, but this is eating up a ton of memory.

    Would you expect benefit from loading the terrains from separate scenes, along with their associated persistent storage devices? Say, 5-10 km's worth of terrain tiles per scene? The benefit here being asynchronous loading, versus everything on main thread?


    This is what i will be testing tomorrow. But any tips and advice might save us some time and trouble.

    Thanks!
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    This sounds like there's no reason not to use runtime procedural spawning (i expect you didn't hand-place all that vegetation into specific places). Or is there a reason you're using the 'baked' persistent storage?
     
    BIGTIMEMASTER likes this.
  3. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    @Flavelius , you know, we did a lot of work and troubleshooting today and I honestly can't remember why we were trying to bake the vegetation versus leave it to runtime. Because i just tested with all 100kms present (not even streaming) and covered in runtime veg and performance was fine....

    I think we were hitting some hiccup when new terrains were loading in (with the streaming terrain script), and so we wanted to see if we could get around that. Maybe we just had nose to close to ground or something, but it kind of seems like a non-issue now.