Search Unity

MeshInstanceRenderer per instance colors

Discussion in 'Graphics for ECS' started by JakHussain, Nov 1, 2018.

  1. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    GPU instancing without ECS allows for users to set per instance colors using MaterialPropertyBlocks. But from the look of the MeshInstanceRenderer documentation an IShareComponentData is truly a single instance that's shared between Entities because only one exists per chunk.

    My question is, is it possible to get per instance values on renderers using ECS in it's current state? If not, will it eventually be possible or is it not possible by design?

    I need to visualise a point cloud of data where each point is an instanced sphere with a hue used to represent a value. Think temperature from cold to hot. Without ECS I can only manage to get about 10,000 objects on screen before getting performance dips but my use case could go to over 100k objects. I can run ECS examples on my machine with these kinds of numbers so it's not my hardware.

    Any help or example code would be appreciated!
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759