Hi,
I was playing around with this code released by apple at WWDC20. when I sweep my iPad pro around my room multiple times, a dense point cloud can be seen on the screen. I would like to save this point cloud for further processing. I've searched a lot for the last week but couldn't find anything. Does anyone know how this could be achieved?
What I want to save for each point:
I was playing around with this code released by apple at WWDC20. when I sweep my iPad pro around my room multiple times, a dense point cloud can be seen on the screen. I would like to save this point cloud for further processing. I've searched a lot for the last week but couldn't find anything. Does anyone know how this could be achieved?
What I want to save for each point:
Coordinates
Normals
Color
Hello,
There are four pieces of information that you need to store to be able to recreate the point cloud for each frame:
Alternatively, you could store the information in the buffer which stores the ParticleUniforms, but that actually may cause a loss of information, since theoretically you could sample more points from the depth texture if you aren't running in real time. The sample you linked to only samples a certain number of points per frame, and only stores a certain number of points in the buffer.
Also note that points do not have normal vectors, if you would like to derive some sort of normal vector, then you will need to process the point cloud in some way to create surfaces, and then calculate the normals of those surfaces.
There are four pieces of information that you need to store to be able to recreate the point cloud for each frame:
The sceneDepth depthMap texture of the current frame.
The viewMatrix for the current frame and orientation.
The camera intrinsics for the current frame.
The capturedImage pixel buffer for the current frame (to color your points)
Alternatively, you could store the information in the buffer which stores the ParticleUniforms, but that actually may cause a loss of information, since theoretically you could sample more points from the depth texture if you aren't running in real time. The sample you linked to only samples a certain number of points per frame, and only stores a certain number of points in the buffer.
Also note that points do not have normal vectors, if you would like to derive some sort of normal vector, then you will need to process the point cloud in some way to create surfaces, and then calculate the normals of those surfaces.