Open TuomasK1989 opened 4 years ago
Hi. I'm not sure if I understand your question. What do you mean by "taking measurement"? I imagine you might mean selecting a point by clicking. In that case, my framework does not provide a way to do this. If you want to implement this yourself, you can iterate over the octree nodes and check which ones intersect the ray through the selected pixel. There is also a fancy GPU-based way to do this. Checkout chapter 5.3.1 of Markus Schütz's Potree-Master-Thesis for more info: https://publik.tuwien.ac.at/files/publik_252607.pdf (however I'm not sure how hard or easy it would be to implement this in Unity).
Hi, Thanks for the hints. that is exactly what I meant. What do You think that could this be on the development roadmap as I am a novice when it comes to coding this stuff? In my opinion this is a must feature that users can pick points and measure distances from surveyed point clouds.
I have now managed to get the node/gameobjects names that are intersecting ray. Now would need to get the point data that is inside each octree node. Can I somehow list all points that are inside a node using nodes name? Also I would like to use only rendered points so is this possible to do without reloading data into memory?
Hi! Here are some hints that might be useful for you:
Hi,
@SFraissTU Thanks for having time to answer to my question. At the moment I only have gameobjects and their names and I am trying to find a way how to access Node-object and the VerticesToStore. Can I somehow get Node-object with the gameobjects name?
Hi! Sorry for my late response. Yes that should be possible. The game object name has the syntax "[pointcloudname]/r[nodeaddress] ([#points])" In V2Renderer there is the attribute rootNodes. The root node of each point cloud is in there. You can iterate over the root nodes and check if node.metadata.cloudName is equal to [pointcloudname] to find the right root node. Once you have the right root node, you can find the right child using the digits of the address. If the address is empty, then the root node is the desired node. Otherwise, you can get there through the children. For example if the nodeaddress is "2431", then that node is rootNode.getChild(2).getChild(4).getChild(3).getChild(1).
Hi, I managed to get this work relatively fine. I added reference pointer to the node itself during the gameobject creation so that every gameobject has corresponding node component in it.
What would be the easiest and most accurate way of taking measurement (point xyz coordinates) from this point cloud rendering system? I guess raycasting is not working.