Rendering PointClouds with Changing Transformations

I am rendering pointclouds, where each pointcloud has a translation and rotation associated with it. So each point within a pointcloud is transformed by a rotation and translation to a global frame in which it is rendered. I could transform the points before sending them to the GPU and then just render them, but since the pointcloud’s rotation and translation can change over time I want to avoid having to remove the points from the GPU, apply the new transformation, then upload them again. I was thinking of storing a list of translations and rotations in a lookup table using a floating point texture. To render the pointcloud, my vertices would store the x, y, z coordinates of each point in a pointcloud’s frame and an integer, which would be an index into the lookup table of translations and rotations to transform the point into the global frame. When a new pointcloud is added I would have to delete the old texture lookup table and reupload an updated copy. I would be adding a new pointcloud of around 100,000 points about once per second.

Does this sound like an efficient approach? Is uploading a new texture every second inefficient?

[QUOTE=ClosedGL;1292144]

[ul]
[li]I was thinking of storing a list of translations and rotations in a lookup table using a floating point texture. [/li][li]To render the pointcloud, my vertices would store the x, y, z coordinates of each point in a pointcloud’s frame and an integer, which would be an index into the lookup table of translations and rotations to transform the point into the global frame. [/li][li]When a new pointcloud is added I would have to delete the old texture lookup table and reupload an updated copy. I would be adding a new pointcloud of around 100,000 points about once per second. [/li][/ul]
Does this sound like an efficient approach? Is uploading a new texture every second inefficient?[/QUOTE]

It sounds fine, if you’re trying to batch multiple point clouds together. However, if there is only one point cloud per draw call, you could just feed in a standard MODELVIEW transform for the rotation/translation of each point cloud. No need to transform the points before uploading them to the GPU; just do it in the vertex shader.

Also, there’s no need to delete the old texture lookup table. Just allocate it much larger than you need and then upload new contents to the existing texture when the lookup table changes. That’ll be more efficient.Also, you only need to upload new contents for the part of the texture lookup table that changes.