• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

Terrain from contours - improve on native 'from contours'?

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
99 Posts 18 Posters 19.5k Views
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.
  • F Offline
    fredo6
    last edited by 25 Dec 2012, 13:38

    I resumed some work on Toposhaper, in particular around the identification of contour zone and interpolation.

    Here is the current state on Brookefox' model, with various resolutions on a quadrangular mesh
    Toposhaper - Test 24 Dec 12.zip

    Brookefox contours - Toposhaper 24 Dec 12.png

    It still takes many seconds
    Toposhaper Test 24 Dec 12.gif

    Toposhaper Test 24 Dec 12 - 2.gif

    One issue I came across is about zones bordered by a single contour, either loop contour, or open to the outside. In the current version, I try to figure out a kind a simulated relief based on the surrounding elevations.

    Fredo

    1 Reply Last reply Reply Quote 0
    • P Offline
      pbacot
      last edited by 25 Dec 2012, 18:55

      This looks fantastic! I would think it should take more than a few seconds. Did you modify the Brookefox contours beforehand?

      Happy Holidays, Fredo! Thanks for sharing your gift. Peter

      MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

      1 Reply Last reply Reply Quote 0
      • F Offline
        fredo6
        last edited by 25 Dec 2012, 20:10

        Peter,

        I took the contours as they are shown on the video, which I think is the original model from Brookefox.

        If you have some contours model, please send them to me so that I can test the script in various situations.

        Fredo

        PS: The main issue I see in the utilisation of Toposhaper is that it generates a lot of faces. The good thing with quandrangular meshes is that they can be easily textured, since based on quads. I may have however to find a way to densify and undensify the mesh in function of the resolution really required by the relief.

        1 Reply Last reply Reply Quote 0
        • P Offline
          pbacot
          last edited by 31 Dec 2012, 05:54

          Here's a house site set of contours anyone can experiment with

          On another layer there is TIN provided by the civil, if useful for comparison

          I welded the contours with Curvizard. I hope that's helpful.

          Peter


          Topo test.skp

          MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

          1 Reply Last reply Reply Quote 0
          • F Offline
            fredo6
            last edited by 1 Jan 2013, 14:33

            Here is another contour set, also from pbacot:

            Fredo

            Toposhaper 31 .png

            Toposhaper 31 concave hull.gif

            TopoShaper 3.skp

            and the previous ones with the current state of the script

            Toposhaper 32.png

            Toposhaper 33.png

            1 Reply Last reply Reply Quote 0
            • F Offline
              fredo6
              last edited by 1 Jan 2013, 16:44

              @pbacot said:

              Here's a house site set of contours anyone can experiment with

              On another layer there is TIN provided by the civil, if useful for comparison

              I welded the contours with Curvizard. I hope that's helpful.

              Peter

              Peter,

              Thanks very much for this model, which is very helpful for me to progress on the script.

              Toposhaper samples the contours on a grid, and therefore it is not necessary to have extra-smoothed contours. On the contrary, when there is less segments in contours, the calculation is much faster.

              In the attached SKP file, you'll have the resulting terrains

              • for your original model, with high-definition contours
              • for the same model after simplification of contours by Curvizard simplify (17 degerees).
                You can see that the generated terrains are almost identical. The simplified model takes 3 seconds (see video) whereas the original one takes over 30 seconds.

              Toposhaper pbacot 01 Jan 13.png

              Toposhaper pbacot 01 Jan 13.gif

              TopoShaper pbacot model - 01 Jan 13.skp

              Fredo

              PS: There is still some work on the algorithms, for calculation of concave hull and extrapolating on the borders, and also some work to package a decent GUI.

              1 Reply Last reply Reply Quote 0
              • P Offline
                pbacot
                last edited by 1 Jan 2013, 19:25

                Fredo,

                Very good looking models! I suppose one can judge how it follows the contours by how much is buried or floating... and these look quite accurate, especially given that contours themselves are a more or less rough approximation of field conditions from point readings. (a further angle of the tool might be using other data like depth maps).

                I like that the created model uses all the extent of the contours and doesn't cut corners. The skirt is very nice. Have you got anywhere with adjusting complexity of the grid?

                All methods have trouble with the drainage ditches (the v-shaped contours). Perhaps these need to handled separately if one is in need of detail there. (this brings up something that I have experimented with a bit--how to "regrade" a portion of the mesh and join it to the original--or join two meshes). At least this tool gives a smooth result, whereas Sandbox can look all creased in the tight spots.

                I realized the first set of contours was quite fine. Surprising to me. This is from a civil in an old project. So it might be a good example of the definition created by some programs (the segments were tiny, a few inches long). I think your result is much more detailed than the TIN that came with the file.

                Happy New Year and THANKS for the fine contributions!

                Peter

                MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mac1
                  last edited by 2 Jan 2013, 05:30

                  IMHO there is a lesson to be learned.
                  One cannot grab data and try to use without first understanding its quality.
                  The OP info ,as I previously noted, was drastically under sampled in some areas. The sample interval( Both x , y and z) must be related to the gradients in that area
                  As an experiment I used a xy plane with a small grid( one dimensional), set that at each level of the contours and intersected to get additional points( just at the several elevation levels). The results look very similar to Pabcots. Would not want to do this in a production sense. It is too labor intensive and prone to errors.
                  The question I keep asking myself is: If it looks better is it?
                  I could not find anything in the quick net search to answer that ❓

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    fredo6
                    last edited by 2 Jan 2013, 08:17

                    @pbacot and mac1

                    Grid refinement (both densify and undensify) is possible, though complex to handle, but with a quad mesh structure, it means that it will break the regularity of cells, i.e. one cell will be split into 4 smaller quads, or 4 quads will be replaced by one bigger quad.

                    At this stage, I am trying to obtain a decent geometry with a regular grid in an acceptable time.

                    pbacot: thanks for the model. If you have others, they will be welcome to perform further tests and validation.

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      simon le bon
                      last edited by 2 Jan 2013, 20:11

                      (From first page)
                      http://sketchucation.com/forums/viewtopic.php?f=15&t=44282#p400386

                      @unknownuser said:

                      .../
                      You probably need to use some external software (I have seen one some time ago, but I don't remember the name. It has export capability to Sketchup, can handle crests and is fully specialized on this problem of terrain shaping)./...

                      Hi Fredo πŸ˜„
                      your Toposhaper looks very promizing πŸ‘ πŸ‘ β˜€
                      You were probably talking about Terragen
                      ( Terragen 2.4 Free Version Now Available)

                      Here a model made by Google Guy (G.G.):
                      http://sketchup.google.com/3dwarehouse/details?mid=f4350227d1c9debd6623100010a93a06

                      some really nice models by TaffGoch:
                      http://sketchup.google.com/3dwarehouse/search?tags=Terragen

                      http://i.snag.gy/NSHXP.jpg

                      Here from [url=http://wetbanana.deviantart.com/:6upgx29j]Wetbanana terragen gallery[/url:6upgx29j]

                      http://th05.deviantart.net/fs71/PRE/f/2012/347/d/e/rocky_cliffs_2_by_wetbanana-d5nxfwx.png

                      picked up into Terragen forums:
                      [url=http://www.planetside.co.uk/forums/index.php?topic=5763.msg59956#msg59956:6upgx29j]Re: Terrains For Google SketchUp?[/url:6upgx29j]

                      @unknownuser said:

                      For minimal effort your best bet would be to forget all about generating your own terrains and import real world elevation data instead. If I recall correctly you can directly import .dem files into sketchup. Try downloading some files from here and see if they work out for you.

                      [url:6upgx29j]http://seamless.usgs.gov [/url:6upgx29j]

                      The link appears to don't work πŸ˜•
                      but this one is ok (free topo download in pdf)

                      Illustrates available US Topos
                      [url:6upgx29j]http://viewer.nationalmap.gov/viewer/[/url:6upgx29j]

                      Historical Topographic Map Collection
                      http://nationalmap.gov/historical/

                      etc..

                      ++simon.

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        fredo6
                        last edited by 2 Jan 2013, 20:29

                        @simon le bon said:

                        You were probably talking about Terragen
                        ( Terragen 2.4 Free Version Now Available)

                        Simon,

                        That was not Terragen. I really need to find this software.

                        Fredo

                        1 Reply Last reply Reply Quote 0
                        • P Offline
                          Pixero
                          last edited by 3 Jan 2013, 08:36

                          Was it this one: http://www.geocontrol2.com/e_index.htm

                          Or maybe one of these: http://vterrain.org/Packages/Artificial/

                          Or Leveller here: http://www.daylongraphics.com/

                          Or Grome: http://www.quadsoftware.com/index.php?m=section&sec=product&subsec=editor

                          1 Reply Last reply Reply Quote 0
                          • P Offline
                            pilou
                            last edited by 3 Jan 2013, 11:33

                            @unknownuser said:

                            That was not Terragen. I really need to find this software.

                            Does this program was a "free" program ?
                            A plug or a complet program ? (MojoWorld , World Machine , Bryce 7 ...)

                            here maybe some little things? (in French and not aespecially for MAC! πŸ˜‰
                            http://www.igeomac.fr/igeomac/Applications_Mac.html

                            Scroll and see LandSerf ? Maybe not direct SU export but...

                            Frenchy Pilou
                            Is beautiful that please without concept!
                            My Little site :)

                            1 Reply Last reply Reply Quote 0
                            • F Offline
                              fredo6
                              last edited by 3 Jan 2013, 16:20

                              I think I found it, this is SimuTerra by COMPUneering.

                              See link there: http://www.compuneering.com/simuterra.php ;

                              It costs 200$ in Pro version and 100$ for an entry-level version.

                              It has some capability to export / import with Sketchup.

                              Fred

                              PS: there are interesting [url=http://www.compuneering.com/simuterraMovies.php:3g8iku5m]videos[/url:3g8iku5m] showing the capabilities of the software, including to draw roads and other landscaping decorations

                              Simuterra overview.png

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                mac1
                                last edited by 3 Jan 2013, 19:15

                                Fredo:
                                Excellent as usual πŸ‘
                                Looks like a great program. πŸ‘ I Wonder how it compares to others like Arcgis. Would take a lots of testing to find out.
                                I also like their emphasis on model preprocessing. Think that is where novices like myself get in big trouble trying to use questionable data. Ran into this in some searching;
                                "

                                • Contours should always point upstream in valleys
                                  Contours should always point downridge along ridges
                                  Adjacent contours should always be sequential or equivalent
                                  Contours should never split into two
                                  Contours should never cross or loop
                                  Contours should never spiral
                                  Contours should never stop in the middle of a map
                                  Liking to hit my finger with a hammer I tried this;
                                  Used you ploy segmenter to get more consistent points on the contour lines, ignored some info ref above. In most cases used 80 segs , but during process kept eye on entity info and for some short segs keep count down close to orginal. Needs to be redone to remove warts but looks more reasonable to me vs like orginal.

                                contours simplified-post._mac1skp.skp

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  pbacot
                                  last edited by 5 Jan 2013, 20:54

                                  Thank you Fred et al.

                                  Here is another set of contours for testing from a civil engineer's file. I had to set the heights in my CAD drawing. I think I got it all right. In some of the twisted minor contours, I had to use what logic I have at my disposal...

                                  I have not recurved these, and again they are higly segmented--and this seems to be a norm one would need to account for. So simplify (I can do this if there is a problem) and recurve as desired.

                                  Sandbox creates over 42,000 faces.

                                  Peter


                                  DN house contours.skp


                                  Screen shot 2013-01-05 at 12.54.09 PM.png

                                  MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    mac1
                                    last edited by 6 Jan 2013, 05:24

                                    I have been trying to understand what the general accepted criteria is for "TINs". One site I have found ,which seems credible to me, states the segment length should be > then contour seperation. The rational for that is to avoid " flat triangles ".
                                    Here are the links I found of interest. . Note the Harvard school link has good press for SU'
                                    http://www.ian-ko.com/ Under resources check out the solution center
                                    http://www.gsd.harvard.edu/gis/manual/contours/
                                    Note these are more GIS centric and thus not one to one applicable to the limited SU intent for their TIN implementation.

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pbacot
                                      last edited by 6 Jan 2013, 08:22

                                      For comparison here is a TIN (picture of it) provided in the same project. I think the engineers set the parameters for their needs. A SB skin made from the contours "looks better" than one from the TIN and shows some site features better (such as the dirt road winding down the slope). Still they must be from the same dataset.


                                      Screen shot 2013-01-06 at 12.20.47 AM.png

                                      MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                                      1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        fredo6
                                        last edited by 11 Jan 2013, 22:17

                                        @pbacot
                                        Here is a first result. Actually, considering that the terrain is rather regular and there are many contours closely spaced, I don't think it is necessary to have a very detailed grid (50 x 22 in the attached file).

                                        Note that I had to simplify the contours with Curvizard to keep an acceptable calculation time (here over 30 seconds, mostly related to the computation of the concave hull).

                                        DN house contours - pbacot - 6 Jan 13 - results.skp

                                        House pbacot 6 Jan 13.png

                                        House pbacot 6 Jan 13 - 2.png

                                        @Mac1
                                        I am not familiar with TIN algorithms, but it seems the one posted by pbacot does not reflect the fine granularity of the contours.

                                        Fredo

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          pbacot
                                          last edited by 12 Jan 2013, 03:42

                                          Yes, I noticed the TIN was pretty simple. I am not sure I have the subset of readings they had for this project (would be interesting to compare to the output). Without having studied the process, I am guessing that more advanced extrapolation goes into creating contours. The civil engineer may have created the TIN for some soils or drainage analysis--and it may be just sufficient for those purposes.

                                          Those terrains look great for OUR general purpose: showing the new construction in a simulation of the site. I would be curious to see it at a higher resolution of quads. I don't think 30 sec is that long, though I imagine the time goes up exponentially when you try to add a little more detail. As I noted there is a rough road on the slope, which can be made out in the contours, but not sure it registers on the final topo. Also there is part of a drainage ditch on the right. Such an area might want more detail, if ever a way is worked out for selective resolution in adjoining parts--or a way go back in a redo an area such that it can be joined to the rest....

                                          But this definitely is giving a clean looking (without the oil-canning) surface with good geometry. Thanks for the effort and sharing the great results!

                                          MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                                          Advertisement