Search Unity

  1. Curious about what's going to be in 2020.1? Have a look at the 2020.1 beta blog post.
    Dismiss Notice

DOTS Huge Build Sizes

Discussion in 'Data Oriented Technology Stack' started by desertGhost_, Nov 30, 2019.

  1. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    115
    First off, I really like the new DOTS subscene workflows / async conversion and build settings.

    That being said I have run into an interesting problem with a test project I am working on. A built sample that I created has a massive build size with the streaming asset folder being 32.7 GB!

    I placed 10,000 trees (3 unique tree prototypes, materials support GPU instancing) on a terrain and extracted them using an editor utility I wrote into 224 different subscenes (there are about 45 tree instances per subscene). These sub scenes are loaded async around the camera at a configurable distance.

    Since there are only 3 unique tree prototypes (maybe 20 unique meshes at most), I would expect the build to be less than 2 GB.

    Anyone have any ideas why such a large build is being generated?

    Edit:
    I am using the built in renderer.
    Mesh optimization is turned on in the project settings.

    My build settings are as follows:
    ILCPP, release config
    Standalone Windows 64, Develop, Hybrid Build Pipeline
     
    Last edited: Nov 30, 2019
    tigerleapgorge likes this.
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,880
  3. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    115
    Thanks. Good to know.

    I just started on a system that was going to process cells of vegetation (cull it / select LODs / billboard based on proximity to camera and frustum using the job system) and render vegetation with Graphics.DrawMeshInstanced. I'll modify this system to instantiate entities for the vegetation at runtime (instead of drawing with Graphics.DrawMeshInstanced) and see how it performs.
     
    tigerleapgorge likes this.
  4. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    160
    Mr. Ghost:
    I instantiate over 100 million shrubberies at runtime for my game using GPU-instancing and the Job system for culling. It works well as a system with great performance, except that currently WebGL does not seem to appreciate instancing that much. The game's total size is under 30 mb.

    Demo here:
    https://quakeulf.itch.io/789

    Thread here:
    https://forum.unity.com/threads/fru...instanced-objects-with-the-job-system.752711/

    The code is still WIP but I am planning on making it public at some point if people are interested.
     
    Last edited: Dec 1, 2019
unityunity