Search Unity

MeshTopology.Point not rendering, workaround?

Discussion in 'Web' started by TotalReality, Oct 10, 2019.

  1. TotalReality

    TotalReality

    Joined:
    Oct 13, 2016
    Posts:
    11
    Hello,

    I have already reported this problem as a bug and got reaction that is a known problem, but is not going to be fixed. The issue tracker: https://issuetracker.unity3d.com/product/unity/issues/guid/930371

    However would still like to render a pointcloud in WebGL so i'm trying to think of a solution to do this. What i could think of rigth now is creating a seperate mesh for each point but i assume this is gonna have a huge impact on performance since we are talking about 10.000.000 points that need to be rendered.

    Does anyone have suggestions that would help without affecting the performance?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    Have you tried using the ParticleSystem? I would not put all of them into a single system. Sub divide the points into areas and put each into the ParticleSystem. For extra performance you could then use BakMesh to extract a static Mesh version.
     
  3. TotalReality

    TotalReality

    Joined:
    Oct 13, 2016
    Posts:
    11
    I have not tried this.

    Let me elaborate more on what exactly i'm trying to achieve.
    I'm currently using BAPointCloudRenderer plugin which requires the Potree pointcloud format. I rewrote parts of the plugin to work with coroutines instead of threads. This is with quite good results, the loading is now done in coroutines and with UnityWebRequests. The plugin takes care of which part of the pointcloud needs to be rendered and loads this accordingly with a max pointcloud size of 10million (the total size of the current pointcloud i'm loading is 1.5 billion points). If i try to render the cloud with MeshTopology.Line it works with a decent framerate.

    I don't think i'll need to bake a mesh with the current method i'm using but i am going to try using particle systems for showing the loaded points.
     
    karl_jones likes this.
  4. TotalReality

    TotalReality

    Joined:
    Oct 13, 2016
    Posts:
    11
    It's been a while, but I managed to visualise the pointcloud in WebGL with particle systems, and the performance is still good. I just take the meshes that gets generated by Potree and feed them to particle systems.