Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Point cloud intensity values across mesh

Discussion in 'World Building' started by jamesheaton, Oct 14, 2020 at 4:25 PM.

  1. jamesheaton

    jamesheaton

    Joined:
    Sep 11, 2020
    Posts:
    1
    Hi all,

    I appreciate this is a fairly unique problem, but any help would be much appreciated.

    I am using Unity to render a real-world environment from point cloud data collected by a laser scanner. This is a voxel-based approach where I have split the world into chunks, each containing their own mesh, which are displayed as the user moves around the environment.
    Each point is rendered as a cube, and I have performed the necessary optimisations to ensure that only the outside (uncovered) faces of the cubes are included in the corresponding mesh.

    I am now attempting to add improve the realism of this world. I was previously using a single texture for everything as I was solely focussed on getting the geometry / chunk loading correct.

    Each point in the point cloud (and by extension each cube in the voxel world) has its own intensity value represented by a short (Int16). I was planning on scaling these values in the range [0,1] and using these to represent a grayscale value for each voxel - this would be useful to highlight features e.g. some parts of the point cloud data have been collected from a road, and when viewing these intensity values in CloudCompare the lane markings and road signs are clearly distinguishable - I want these to also be visible in my voxel world.

    Unfortunately I am stuck here as I have no real idea how to display these grayscale values on individual faces in the mesh. I obviously don't want to use a different texture for each individual cube as I have millions of them, so I was thinking about using a texture atlas, but then I don't really know how I would go about creating this for the problem described above.

    Hopefully this all makes sense, any help / pointers would be greatly appreciated. Please let me know if you need more information or if I'm not making sense - I'm having trouble putting my problem into words myself!

    Thanks
     
unityunity