Search Unity

Heatmap performance issue

Discussion in 'Unity Analytics' started by vdeloso, Dec 8, 2015.

  1. vdeloso

    vdeloso

    Joined:
    Mar 4, 2015
    Posts:
    10
    So, we're trying to utilize the Heatmap plugin, but generating our own heat maps at run time with our data. We've been able to generate heat maps using the HeatmapMeshRenderer, but run-time performance rapidly goes to a halt (~2 fps) as we get close to / above 2k points. Most of this performance hit is stemming from the camera renderer drawing transparent geometry.

    However, from the screenshots in the wiki section of the Heatmap BitBucket repo, Unity has been able to demonstrate that it's capable of handling way more than the current upper limit that we're experiencing. For example, in one screenshot there is a heatmap of over 57k points and rendering 7k of them. This is a stark contrast to our "safe" limit of 1k points currently.

    My question is what are we doing wrong with generating a heatmap where we're seeing this CPU rendering issue? I've included a very bare bones example script of how we're using the HeatmapMeshRenderer for generating a heat map.
     

    Attached Files:

  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    You're comparing apples to oranges, I'm afraid. 7k points (or even a great deal more) is not necessarily a problem in the Editor, but that's a ton of transparencies to push around in the runtime. The screenshots on Bitbucket are all displaying Editor heatmaps (which is, after all, the primary role of the system). You're going to have to be far more ginger with the heatmapper and the renderer if you want to make them perform at runtime.

    Check out the optimization tips here:
    https://bitbucket.org/Unity-Technologies/heatmaps/wiki/Optimization

    Additionally, consider avoiding transparency, as the cost in terms of rendering can be quite high.