Point indexes (PLY)
Posted: Thu Jul 14, 2022 9:54 am
Hi all,
I'm working on some animations with point clouds in a game engine (UE4), and there's a morph function which changes the location, point-by-point, of one point cloud to another.
The problem is that it just goes through the list (it only reads ASCII PLY files), moving the first point in cloud A to the location of the first point in cloud B etc.
I really need to be able to change this order, ideally sorting the points using a scalar field so that, for example, points move from denser areas first. I've been trying to work it out for hours, and I'm not even sure of the name of what I'm trying to do (classifying? indexing? re-indexing?) which hasn't helped.
I've tried every kind of operation, and it always saves the file with the points in the same order. The only two things that have worked are modifying the PLY file directly in a database editor, and going in and out of another format (this only worked once, so I might have imagined it) but there must be an easier way?
If I understand correctly, the 'Id' scalar field which can be added from the point indexes is just a regular scalar field named 'Id', and changing it (with arithmetic for example) doesn't actually change the original order, is that right? If so, how would I go about changing the order?
I'm sure this is a very basic question but it would be so useful if there was a quick way to re-order the points based on existing scalar fields, or even just to randomise the order.
Thank you!
I'm working on some animations with point clouds in a game engine (UE4), and there's a morph function which changes the location, point-by-point, of one point cloud to another.
The problem is that it just goes through the list (it only reads ASCII PLY files), moving the first point in cloud A to the location of the first point in cloud B etc.
I really need to be able to change this order, ideally sorting the points using a scalar field so that, for example, points move from denser areas first. I've been trying to work it out for hours, and I'm not even sure of the name of what I'm trying to do (classifying? indexing? re-indexing?) which hasn't helped.
I've tried every kind of operation, and it always saves the file with the points in the same order. The only two things that have worked are modifying the PLY file directly in a database editor, and going in and out of another format (this only worked once, so I might have imagined it) but there must be an easier way?
If I understand correctly, the 'Id' scalar field which can be added from the point indexes is just a regular scalar field named 'Id', and changing it (with arithmetic for example) doesn't actually change the original order, is that right? If so, how would I go about changing the order?
I'm sure this is a very basic question but it would be so useful if there was a quick way to re-order the points based on existing scalar fields, or even just to randomise the order.
Thank you!