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

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

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    99 Posts 18 Posters 19.5k Views 18 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.
    • brookefoxB Offline
      brookefox
      last edited by

      So 'from contours' doesn't care that the contours are curves, it looks for the endpoints within? Oh, now I see your 'perhaps'.

      Still looking for a skilled attempt with curviloft.

      ~ Brooke

      1 Reply Last reply Reply Quote 0
      • F Offline
        FinnGh
        last edited by

        Attached is an attempt at a site from contours using Curviloft. I'm not sure I'd call it a skilled attempt.
        It took a few attempts and you can see from the component structure that I had to do it in a number of stages as CL doesn't like it when the contours turn back on them selves.


        LaFloresta - CL.skp

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

          I don't think Curviloft can treat terrain shaping except in some simple cases. The reason is that it tries to match vertices of contours and does not provide overall C1 continuity between contours. And if you have mountains and circus valleys, Curviloft is stuck as each portion of terrain is determined by the shape of more than 2 contours (it would be the same issue with the native 'from Contour' tool).

          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).

          For a SU plugin, it is possible to handle some cases, but it is probably not very convenient. Here is an attempt I started some months ago but that I stopped because to get acceptable performance you would need to offload some pieces of the algorithm to C / C++ (I am lazy to write C extension which have to work in both Windows and Mac and have no experience in this field).

          TopoShaper simple.gif

          Fredo

          1 Reply Last reply Reply Quote 0
          • brookefoxB Offline
            brookefox
            last edited by

            Thank you, FinnGh, and Fredo, for all that you do. Your little ani looked flawless for what the routine was doing but I understand that if the data can be interpreted in multiple ways there likely will be problems.

            ~ Brooke

            1 Reply Last reply Reply Quote 0
            • EarthMoverE Offline
              EarthMover
              last edited by

              @unknownuser said:

              For a SU plugin, it is possible to handle some cases, but it is probably not very convenient. Here is an attempt I started some months ago but that I stopped because to get acceptable performance you would need to offload some pieces of the algorithm to C / C++ (I am lazy to write C extension which have to work in both Windows and Mac and have no experience in this field).

              [attachment=0:2l6fep6v]<!-- ia0 -->TopoShaper simple.gif<!-- ia0 -->[/attachment:2l6fep6v]

              Fredo

              To bad that never manifested. That's looks incredible Fredo!

              3D Artist at Clearstory 3D Imaging
              Guide Tool at Winning With Sketchup
              Content Creator at Skapeup

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

                @brookefox
                I reworked my experimental plugin to adapt to the rectilinear closure of contours.
                Here is the result on a rectangular mesh. I had to fix 2 contours which were not perfectly aligned with other in their rectilinear portion.

                Brookefox contours - Toposhaper.png
                Contours Brookefox - TopoShaper.skp
                TopoShaper - Contour simple.gif

                It is still slow, and anyway, if I pursue, the methods to improve the generation of terrain will add up calculation time, in particular:

                • Use triangulation instead of rectangular mesh (more exactly something like constrained Delaunay)
                • use a more advanced interpolation technique to get smoother transitions

                Fredo

                PS: I guess that Trimble will soon add this type of functionality as part of Sketchup (or with a bridge to an external program).

                1 Reply Last reply Reply Quote 0
                • EarthMoverE Offline
                  EarthMover
                  last edited by

                  Fredo, I don't think that is slow at all for what it is doing. This tool has been something I've wanted from day one using Sketchup. I beg you to tidy it up and release it. In the meantime, I could beta test it for you. πŸ˜‰

                  3D Artist at Clearstory 3D Imaging
                  Guide Tool at Winning With Sketchup
                  Content Creator at Skapeup

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

                    @brookefox and EarthMover,

                    Thanks for the feedback. I'll see if I can release something beta in the coming days.

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • brookefoxB Offline
                      brookefox
                      last edited by

                      Fredo, I wish I had something more helpful to say than 'looks great', but that maybe is a good thing. Perhaps the other fellows will stop back by, they seem to have much more experience than I have. As far as interest in and good use for such a plugin, I would say most definitely.

                      @unknownuser said:

                      Are the topmost contours supposed to be rounded in their inside or just left as a plateau?

                      To me they are no different from any of the others. Your results to me look fantastic.

                      You mention the rectilinear closure of the contours, which was done manually by me to make level faces and which I gather is actually unnecessary and even counter-productive.

                      ~ Brooke

                      1 Reply Last reply Reply Quote 0
                      • brookefoxB Offline
                        brookefox
                        last edited by

                        11 + 7 seconds for the slow and fancy one.

                        Too simple... Complexify, make inscrutable options so the ignorant can pester you for answers. You know I'll be back.

                        ~ Brooke

                        1 Reply Last reply Reply Quote 0
                        • EarthMoverE Offline
                          EarthMover
                          last edited by

                          @unknownuser said:

                          @brookefox and EarthMover,

                          Thanks for the feedback. I'll see if I can release something beta in the coming days.

                          Fredo

                          Hey Fredo,

                          Any chance on seeing this beta plugin in the future? Could really use it on a few projects I'm working on. If not, no worries, I know you are busy.

                          Thanks.

                          3D Artist at Clearstory 3D Imaging
                          Guide Tool at Winning With Sketchup
                          Content Creator at Skapeup

                          1 Reply Last reply Reply Quote 0
                          • pbacotP Offline
                            pbacot
                            last edited by

                            @brookefox said:

                            @unknownuser said:

                            Are the topmost contours supposed to be rounded in their inside or just left as a plateau?

                            To me they are no different from any of the others. Your results to me look fantastic.

                            That's a valid question. I suppose the plugin has to assume and make some sort of rounding-off based on the lower contours. It's easier for the user to flatten after if needed. Alternately user can add a small contour or point to indicate the peak.

                            This looks great, I was just wanting something like this yesterday. I try other skinning plugins on contours but they don't do so well and for all the trouble I end up back with Sandbox. Wonderful coding!

                            MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                              @pbacot said:

                              This looks great, I was just wanting something like this yesterday. I try other skinning plugins on contours but they don't do so well and for all the trouble I end up back with Sandbox. Wonderful coding!

                              Could you post or PM me your model.

                              The main reason why I don't release it quicker is because I have not worked too much on the validation of input contours and handling of corrections.
                              And of course, I have not really tested on real-life models (actually only the one posted by brookefox).

                              Fredo

                              1 Reply Last reply Reply Quote 0
                              • pbacotP Offline
                                pbacot
                                last edited by

                                I'd be glad to PM it to you! Will do today. Thanks, Peter

                                MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                                  @pbacot,

                                  By the way, I observe that the native 'From Contours' plugin does a rather good job on your example of terrain.

                                  pbacot terrain.gif

                                  Because TopoShaper uses a more accurate algorithm (to cope with cases of more abrupt changes of relief and also saddles), the analysis of the contours is more tricky and I'll need some time to write a decent code to handle it.

                                  Fredo

                                  PS: and again, I'm pretty sure Trimble will adress the generation of terrain from contour in a next release of Sketchup

                                  1 Reply Last reply Reply Quote 0
                                  • pbacotP Offline
                                    pbacot
                                    last edited by

                                    Yes sir,

                                    That existing terrain is not too problematic for Sandbox, but I assume a more regular clean mesh, as I think you are after, would serve better for subsequent "regrading". Thank you.

                                    It seems the skinning plugins don't work where ridges twist about as in this case, and SB seems to work that out OK.

                                    Peter

                                    MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      Panga
                                      last edited by

                                      Fredo,

                                      I'll Join Earthmover and others to say that what you tried to do with this plugin attempt is my biggest dream in SU !! As a landscape architect, you can't imagine how much time I spent to clean the terrain mesh because of SU native triangulation prevent using the mesh for may things...so...I'll be very gratefull if you can give us even an alpha version of it !! 😍 😍

                                      1 Reply Last reply Reply Quote 0
                                      • pbacotP Offline
                                        pbacot
                                        last edited by

                                        For ideas on terrain mesh results:
                                        http://www.formz.com/products/bonzai3d/bonzai3dFeatures.php?init=27

                                        MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                                          @pbacot said:

                                          For ideas on terrain mesh results:
                                          http://www.formz.com/products/bonzai3d/bonzai3dFeatures.php?init=27

                                          Thanks. That's more or less what was my intention.

                                          This is why I need to write some extension in C to have enough speed for the preview mode.

                                          But I am a little bit reluctant to engage in this because I am pretty sure that Trimble will provide a bridge to a Terrain from Contour program in a next release of Sketchup (I guess this is what field engineers need)

                                          I need to think about if I can make a simple beta release quickly. The version I have currently works on close contours only.

                                          Fredo

                                          1 Reply Last reply Reply Quote 0
                                          • T Offline
                                            tald311
                                            last edited by

                                            would LOVE this tool. Very needed. amazing as usual Fredo.

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

                                            Advertisement