algorithmic modeling for Rhino
Hello All,
I'm semi-familiar with grasshopper and have a general understanding of lists and data matching, but not a spectacular one.
The attached images show a portion of an .xyz point cloud that was brought into rhino via a python script and then exploded with the intention of creating a mesh surface. The cloud represents the inner surface of an actual natural rock formation/tunnel.
For those interested - https://en.wikipedia.org/wiki/Tonto_Natural_Bridge
I have had other successes with python, .xyz point clouds, and the Delaunay Mesh component, however those were all relatively flat ground situations.
I want to achieve a cave or tunnel with the mesh but when I attempt that, points begin to connect in all directions creating an audacious mesh that'll melt your face off (see attached image 03). I assume this is because GH does not know how the points relate to each other, just that they exist in space.
Does anyone have suggestions on how to get the triangulation mesh to occur ONLY along the tunnel and not across it? Perhaps Delanuay is not correct?
-Thank you for your time,
Danny
Tags:
As you have noticed already Delaunay works on "flattish" point collections.
In this case: (a) either try something the likes of MeshLab (best free stuff around but with MANY bugs) or (b) try Modo (best subdivision app by a million miles) or (c) a Ball Pivot approach geared with some custom control upon what to make and what to skip (not required if the resolution is fine enough).
The latter (initial algorithm developed for reverse engineering in the notorious IBM Labs) is doable within GH but (obviously) requires coding. That said not all Ball Pivot type of solutions work fast enough (dealing with 1K points IS NOT the "same" when you have 10++M points on hand) and without serious bugs.
Plan Z (maybe the best): Find a pro friend who's in the laser scan business and ask him to do it for you (hopefully gratis).
Peter, Thanks for the reply.
I'm using MeshLab right now and was able to import my point cloud as a .txt, I just converted it from .xyz, the xyz format point cloud wasn't showing up in MeshLab. Anyways, I did some Poisson Disk Sampling, and am now attempting the Ball Pivot Reconstruction...Could you explain the concept of the radius / increasing the radius of the ball, it seems to be creating far more faces that vertices.
I set the Poisson Sample world units at .25, I did a ball radius of .15 which returned 2000 some very tiny surfaces very quickly. I upped the ball radius to .24 and its at 33% complete with 505,000 faces.
-Thanks for the recommendations and your time.
-Danny
Well
With regard the "classic" Ball Pivot algo read (or Goggle the subject):
http://www.research.ibm.com/vistechnology/pdf/bpa_tvcg.pdf
http://www.sci.utah.edu/~csilva/papers/tvcg99.pdf
In general ... after IBM released the thing to the masses (that actually founded/ignited reverse engineering) several "variations" appeared trying to speed up things. I'm not aware of the approach/algorithm used in MeshLab, mind ... thus is difficult to comment inputs VS results. On the other hand a high performance PV thingy is worth a lot of cash (for more than obvious reasons).
That said most people believe that coding is the Holly Grail of things by definition; that's far from the truth: it depends upon the quality of the code (meaning: speed + bugs + a gazillion other things).
I have 2 (strictly internal) C# that do that and the difference in performance (and N of bugs) is astonishing.
Hello Daniel,
what is the purpose of this mesh? visualization? do you need just sections of the geometry? i am asking because maybe you can work on the point cloud directly. If a mesh is mandatory it is going to be heavy, just like the point cloud, if not heavier to process. A quick test in rapidform for 1,2mil points yields a 1gb mesh.
As for mesh lab, there are resources that can get you step by step from point cloud to mesh, with lots of explanation for each. If you haven't located any, i can later add some links.
what you total point count of the scan?
best
alex
Pieter when you say internal what do you mean? where do you keep em? on second thought, forget it i don't want to know.
Alex,
Yes the purpose is visualization. Essentially a digital ground surface. My process in rhino was to explode the point cloud and try to work the points in Grasshopper to form a mesh...extremely heavy. The images I included were only a fraction of the actual cloud.
This (the point could and mesh attempt) is all somewhat exploratory. Ideally in Rhino I would have an accurate representation of the natural area, then reference in a footbridge that I also modeled in Rhino. Then create a scene by scene fly-through animation.
I found the MeshLab resources and I'm currently working through them. It is yielding smoother results with the Poisson Disk Sample and Ball Pivot Algorithm.
I have several versions of the same point cloud scan. Some denser than others.
The mesh I am working in mesh lab is the 5.9 Million Point Mesh which I Poisson Disk Sampled down to about 1/6th of that. Which still looks like it has enough resolution.
-Danny
Great, if it is for visualization and some analysis for referencing your design volvox is the way to go, like Anders suggested. I believe it has all the features you might need, bypassing the meshing of the point cloud. It is super quick, compared to what you have seen so far in Rhino, to load and display point clouds, as it works on multiple threads. Amongst others you can section the point cloud for referencing your footbridge, decimate it as needed for creating the enviroment, denoise it, clip and save parts of point clouds etc. You can right click the cloud components, giving you access to dynamic preview of the cloud, so that it does not drag in viewport while panning and zooming and at the same time controlling the "thickness" of the points in viewport, in case your camera gets close to the point cloud. It is a matter of visual preference.
I think that even 200mil points can be loaded with volvox.
Some references
12million points
13million points
13million points (right click dynamic settings low thickness)
13million points (right click dynamic settings high thickness)
15 million points (around 20sec!! to l0ad)
My pc (i7 3820, 32gb ram, gtx670 4gb) felt comfortable working with up to 15 mil point clouds. But that has to do with hardware along with your patience while working.
All clouds have been loaded as .txt files where the mask describing the info was x,y,z,r,g,b,u,v,w. Depends on how your data is in-text formatted.
You can check fly through animations all done with gh and Volvox here
(starting @~2:20)
best
alex
Great! This looks very promising.
I have .xyz files. I've been converting them by just changing the file extension to .txt
I know I have the xyz coordinates in the .txt file, but the format seems to be x y z (then a 4 digit number) I'm not sure what that is describing.
This is an example one of the lines in the converted .txt
310157.26000000 1210185.10000000 4504.44000000 4823
I am still able to load this into MeshLab, Rhino, etc but there doesn't seem to be an rgb color associated with the points... Any Ideas?
I was informed that there would be color in the point cloud. I know our surveyor can see it.
-Thanks for your help,
Danny
there is a handy preview xyz component that displays the first 100 lines of your cloud. There is no need to convert is to txt, file path for load and display can point to a .xyz file. You need to see if there are in the initial .xyz file color information. This before any edit in other programs, since sometimes color values can be committed without us noting it.
If color values are missing you need the file your surveyor is looking at, exported with color info. Format supported are many in volvox, txt, xzy, e57.
best
alex
Alex,
See attached jpeg. Volvox brought everything in beautifully and very quickly, however, as you can see in the preview of the .xyz file, the space deliminator was ignored.
so x y z
310157.26000000 1210185.10000000 4504.44000000 4823
becomes xyz
310157.260000001210185.100000004504.440000004823
which causes a strait line of points as you can see.
It seems to do this with both the .xyz and converted .txt. Since this same file used to have spaces and bring in a cloud, do you have any ideas as to why the spaces are no omitted in Volvox?
-Thank you,
Danny
Have you checked that your file is indeed delimited with space or other? editpad or similar editor can open big txt files.
Your values are a bit strange. They seem to high for coordinates, unless they are georeferenced, which seems to be the case. But even so they have many zeroes in the decimals. The 4823 value does not make sense either. you need to contact the surveyor and ask for specific export from their side, stating what delimit you need, how many floating decimals, color values or not etc.
can you upload a small portion of the data set? normally it will have a header noting what each value per column is.
Dave Reeves did an implementation of the Ball Pivoting algorithm that might work for you.
Edit: If your point data is too messy or dense, you could use the Volvox plugin to clean/reduce prior. Volvox can also voxelize the points, outputting a solid mesh, might also be an option.
Thanks Anders, Ill give this a shot.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by