sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Proto] Generating Terrain from a Cloud of Points

    Scheduled Pinned Locked Moved Plugins
    46 Posts 21 Posters 4.0k Views 21 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      glro
      last edited by

      interesting research

      For organic modeling, it is promising

      but if someone looks for accuracy, there is no solution:

      to be more accurate, you need more points
      the more points ruby has to process, the slower it gets

      i noticed sketchup ruby gets very slow when the amount of data to process increases
      [anchor= goto=:2xytkhdb]http://sketchucation.com/forums/viewtopic.php?f=323&t=59921#p548175[/anchor:2xytkhdb]

      and my experience is that it is getting worse with sketchup updates; SU8 is much faster than SU14

      my guess is that the memory is managed more to make fast render, than answering to ruby questions as "if..., for e in ..."

      1 Reply Last reply Reply Quote 0
      • srxS Offline
        srx
        last edited by

        As we all know this would be VERY USEFUL PLUGIN. Thank you Fredo for all you are doing.

        www.saurus.rs

        1 Reply Last reply Reply Quote 0
        • jujuJ Offline
          juju
          last edited by

          This reminds me of the points cloud plugin.

          404 Not Found

          favicon

          (www.crai.archi.fr)

          Save the Earth, it's the only planet with chocolate.

          1 Reply Last reply Reply Quote 0
          • O Offline
            Openspaces
            last edited by

            Thank you in advance for a potential lovely plugin.
            Can't wait 😍

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              A land 'survey' of 'points' will typically use many 'key-points' - taken at clear changes of material, slope, plane etc - and then a general grid of other points - perhaps 5m sq...
              If you link the 'key-points' by clines are they respected in the smoothed mesh's 'edges' ?

              How does it cope with points that are coincident in xy but have differing z values? - e.g. where a retaining-wall has coincident top and bottom points varying only in their z - I know the delauney algorithm chokes !
              The ability to survey in proper 3d [wall-planes etc], rather than the pseudo-3d from a surveyed 'surface' cloud would be a great step forward.

              TIG

              1 Reply Last reply Reply Quote 0
              • fredo6F Offline
                fredo6
                last edited by

                @tig said:

                A land 'survey' of 'points' will typically use many 'key-points' - taken at clear changes of material, slope, plane etc - and then a general grid of other points - perhaps 5m sq...
                If you link the 'key-points' by clines are they respected in the smoothed mesh's 'edges' ?

                Then, I think it's better to use TopoShaper with the iso-contours. What can however be added is a small plugin to link the points of similar altitudes to form these iso-contours.
                If the points don't have similar altitudes, then we need to use Constrained Delaunay triangulation. Manageable, but again, it requires more calculation and thus takes longer.

                @tig said:

                How does it cope with points that are coincident in xy but have differing z values? - e.g. where a retaining-wall has coincident top and bottom points varying only in their z - I know the delauney algorithm chokes !
                The ability to survey in proper 3d [wall-planes etc], rather than the pseudo-3d from a surveyed 'surface' cloud would be a great step forward.

                Delaunay and many Terrain tools works in XY and interpolate the Z altitude. So walls, cliffs and other quasi vertical structure won't be welcome. Actually, In skecthup, it may be easier to manage first the natural terrain and then introduce the artificial structures by stamping and then push pull or via dedicated tools (plane road paths for instance).

                More generally, I think there are powerful dedicated tools for terrain shaping. So plugins for Sketchup and Sandbox could only be a helper for simple cases.

                Fredo

                1 Reply Last reply Reply Quote 0
                • fredo6F Offline
                  fredo6
                  last edited by

                  @juju said:

                  This reminds me of the points cloud plugin.

                  404 Not Found

                  favicon

                  (www.crai.archi.fr)

                  Yes, this one is the mother of all triangulation scripts (based on Delaunay), but I think it only generates the first-level triangulation.
                  By the way, I think TIG adpated the script to run in recent versions of Sketchup. See http://sketchucation.com/pluginstore?pln=TIG_points_cloud_triangulation

                  Fredo

                  1 Reply Last reply Reply Quote 0
                  • fredo6F Offline
                    fredo6
                    last edited by

                    @jiminy-billy-bob said:

                    You do everything in pure ruby?

                    Yes. This is pure Ruby. This is fine for small number of points.

                    I am actually quite impressed by the speed of Ruby. But indeed, with more calculations, it gets' slower.

                    The problem I have is that the Interpolation I use is O(M)O(N2), where M is the number of vertices of the triangulation and N is the number of cloud points. So no mystery, it does not scale well. Other interpolations don't give good results

                    The only possibility I see is to convert 2 calculation methods from Ruby to C (each method is 20 lines) hoping that it would speed up a little bit the calculation.

                    But I am too lazy to set up a C development environment, learn the C-Ruby bridging and make it work on PC and Mac!

                    Note that he triangulation is OK in Ruby. I can manage the calculation 10,000 triangles within 25 seconds, so it can stay in Ruby.

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • cottyC Offline
                      cotty
                      last edited by

                      🎉 👍

                      my SketchUp gallery

                      1 Reply Last reply Reply Quote 0
                      • jiminy-billy-bobJ Offline
                        jiminy-billy-bob
                        last edited by

                        I really recommend doing stuff in C++. Ruby was already pretty fast, but I've seen improvements up to 100 times faster. It's really worth it.

                        25% off Skatter for SketchUcation Premium Members

                        1 Reply Last reply Reply Quote 0
                        • fredo6F Offline
                          fredo6
                          last edited by

                          @jiminy-billy-bob said:

                          I really recommend doing stuff in C++. Ruby was already pretty fast, but I've seen improvements up to 100 times faster. It's really worth it.

                          Sure, that's a possibility to explore. With compilation it might be much faster, because the methods are pure calculation within a loop.

                          But even before I take care of performance, I must first evaluate if the algorithms are relevant for real terrains, which is the reason for my post at this stage.

                          Fredo

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            Anton_S
                            last edited by

                            Will be a useful plugin for drawing terrains!

                            Thank you, Fredo!

                            1 Reply Last reply Reply Quote 0
                            • KrisidiousK Offline
                              Krisidious
                              last edited by

                              would it not be simpler to make point clouds out of polyline topos and then compare the two?

                              By: Kristoff Rand
                              Home DesignerUnique House Plans

                              1 Reply Last reply Reply Quote 0
                              • fredo6F Offline
                                fredo6
                                last edited by

                                @krisidious said:

                                would it not be simpler to make point clouds out of polyline topos and then compare the two?

                                Good idea and actually I did it and obtain similar shapes, but a little rounder with the triangulator.

                                The probleme however is that using iso contour cloud points is already a strong guide to the skeleton of the terrain and therefore does not validate that with scarce points here and there you would obtain a similar skeleton.

                                Toposhaper is based on a linear interpolation whereas Triangulator is based on a directional polynomial interpolation, in order to avoid that each point of the cloud becomes an isolated hill or basin.

                                Anyway, I am not trying to demonstrate that an algorithm can find the good solution because this is anyway wrong mathematically. There are always many solutions.

                                Instead, I am just trying to check if the plugin would be useful to users and landscapers on real cases.

                                Fredo

                                1 Reply Last reply Reply Quote 0
                                • fredo6F Offline
                                  fredo6
                                  last edited by

                                  @krisidious said:

                                  here's some files from when I worked at a survey company. some of them are probably point clouds. I'll have to research to find out which. maybe you'll know by looking.

                                  I would need something in SKP. I have no Tools to pre-process and I don't even know what are the files.

                                  Fred

                                  1 Reply Last reply Reply Quote 0
                                  • sdmitchS Offline
                                    sdmitch
                                    last edited by

                                    @fredo6 said:

                                    @krisidious said:

                                    here's some files from when I worked at a survey company. some of them are probably point clouds. I'll have to research to find out which. maybe you'll know by looking.

                                    I would need something in SKP. I have no Tools to pre-process and I don't even know what are the files.

                                    Fred

                                    Attached is a skp file with both mass points and break lines that you can hopefully use for testing. I have hundreds of such models if you want or need more.


                                    Alaska_NW-DTM 129.skp

                                    Nothing is worthless, it can always be used as a bad example.

                                    http://sdmitch.blogspot.com/

                                    1 Reply Last reply Reply Quote 0
                                    • fredo6F Offline
                                      fredo6
                                      last edited by

                                      Sam,

                                      Thanks very much, very useful.

                                      Actually, I have tweaked the algorithm and got the tarrain below. So I think I may finally find heuristics to speed up the interpolation.

                                      sdmitch Alaska.png

                                      There are 1986 cloud points.

                                      The terrain is generated with 3069 triangles. The calculation took 18.5 seconds on my machine.

                                      It seems to be a quite large area and quite flat except a few hill and an overall gentle slope. I had to scale in Z a little bit however to make the relief more apparent.

                                      sdmitch_ Alaska_NW-DTM 129 _ trg.skp

                                      Indeed, if you are more samples, this is welcome

                                      Fredo

                                      1 Reply Last reply Reply Quote 0
                                      • sdmitchS Offline
                                        sdmitch
                                        last edited by

                                        Fredo,

                                        These models have much more relief. They are bigger with many more points than you would normally use probably. But none of the projects I worked on were small.

                                        Sam


                                        MyDot03DTM.skp


                                        Dem Contours.skp

                                        Nothing is worthless, it can always be used as a bad example.

                                        http://sdmitch.blogspot.com/

                                        1 Reply Last reply Reply Quote 0
                                        • BoxB Offline
                                          Box
                                          last edited by

                                          Fredo if you want, this is a text file of a pair of Scissor handles that I recently managed to import into SU using the above mentioned Points Cloud as a CSV file of over 250,000 points.
                                          It was very slow but worked and I was able to view the scissors in 3D as guide points. I didn't bother with triangulating the faces as it had actually taken several hours to import just the points.
                                          It is without doubt overkill in the terrain context but it is the type of file people will be wanting, if not expecting, to be able to click, copy and 3d print in the very near future. Feel free to ignore it as it was something I found on the web while looking to solve terrain and point cloud imports.


                                          Scissors_handle_points.zip

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            roland joseph
                                            last edited by

                                            I think it will depend on it's capability for detail. I don't find getting the raw terrain down is very difficult. It is all the detail that has to be built into it...i.e. garden beds, curbs, sidewalks, ditches, medians, grass edge transitions,...etc. For every minute I spend creating the ground, I spend ten on the detail.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement