• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[REQ] GoogleEarth Meshes boolean subtract

Scheduled Pinned Locked Moved Plugins
49 Posts 10 Posters 9.3k Views 10 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.
  • C Offline
    Chris Fullmer
    last edited by 8 Oct 2011, 18:47

    As I recall, what Google had said about importing GE terrains in SU8 is that now it is much more accurate, because it now imports the actual Google Earth geometry. So therefore, terrains should match up perfectly.

    So when you import adjacent terrains, even if they are net perfectly aligned, the vertices should align perfectly, because it is importing the Google Earth geometry.

    The one MAJOR exception is that they limit the amount of vertices imported to 1,000. So if the snapshot includes more than 1,000 vertices, then SU will use its own algorithm to simplify the mesh. This simplification can reduce vertices, move their position on the x,y AND Z directions, and that will cause the overlapping vertices to not align.

    I had written a tool at one point that would help test it the terrain had been downsampled by SketchUp, so I would know that I needed to zoom in closer to get a higher resolution terrain. Because again, theoretically, if SketchUp does not downsample the terrain, then the vertices really should align perfectly.

    I'm not completely sure that all of the above is true. It is largely my recollection of what they had told us.

    Lately you've been tan, suspicious for the winter.
    All my Plugins I've written

    1 Reply Last reply Reply Quote 0
    • A Offline
      AcesHigh
      last edited by 8 Oct 2011, 20:47

      hi Chris. I just imported two small GoogleEarth meshes, using Sketchup 8.

      600 triangles each (i suppose... each one had 300 faces).

      still no luck. There was overlapping and nope, the triangles from each mesh did not mach perfectly the triangles from the other mesh.

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris Fullmer
        last edited by 8 Oct 2011, 21:39

        @aceshigh said:

        hi Chris. I just imported two small GoogleEarth meshes, using Sketchup 8.

        600 triangles each (i suppose... each one had 300 faces).

        still no luck. There was overlapping and nope, the triangles from each mesh did not mach perfectly the triangles from the other mesh.

        Well, there goes that theory! Did you try the manual way I described? Maybe I'll try that right now.

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris Fullmer
          last edited by 8 Oct 2011, 22:03

          bleah, the edges are not necessarily co-planar. So its not easy to drop vertical lines at the corners and turn the thing into a big cube.

          Bummer,

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • A Offline
            AcesHigh
            last edited by 8 Oct 2011, 22:38

            @chris fullmer said:

            bleah, the edges are not necessarily co-planar. So its not easy to drop vertical lines at the corners and turn the thing into a big cube.

            Bummer,

            Chris

            I would give you some suggestions... if I even knew what you mean 💚

            doesnt Sketchup have absolute world coordinates? Wouldnt the vertical lines just drop till a specific absolute world coordinate, at all 4 corners of an imported mesh? 😳

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdmitch
              last edited by 10 Oct 2011, 15:59

              Here is how I did it. I created and grouped the four vertical faces surrounding the 1st terrain mesh using the bounding box corners. Then I did an intersect_with the faces and the 2nd terrain group and added the intersection entities to the entities of the 2nd terrain group. I then searched the entities of the 2nd terrain group for hidden edges that fell within the bounds of the 1st terrain group and deleted them.

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

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • A Offline
                AcesHigh
                last edited by 10 Oct 2011, 16:57

                you did that manually?

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdmitch
                  last edited by 10 Oct 2011, 17:04

                  @aceshigh said:

                  you did that manually?

                  No, with a plugin that I threw together last night. Check your PM inbox.

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

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    AcesHigh
                    last edited by 10 Oct 2011, 17:59

                    wow, thanks a lot!

                    it works flawlessly!

                    does it makes any difference which mesh I select first and 2nd?

                    how the plugin decides from which mesh it will subtract and which one it will keep intact?

                    this is important because sometimes you may have two meshes at different resolutions... and you may want to keep the higher resolution mesh.

                    I just made a test where the smaller, hi-res mesh was almost entirely deleted (only left a thin strip, that was outside the bounding box of the bigger mesh), while the ideal solution would be to keep the higher res mesh and cut the hole in the bigger, lower res mesh.

                    again, thanks a lot!

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      AcesHigh
                      last edited by 10 Oct 2011, 18:13

                      @sdmitch said:

                      It all depends on the order that it finds them in the model so the selection order doesn't matter.

                      thanks. Can you make it matter? I was editing my above message while you were writing here, and I said the reason the order would be important.

                      btw, I also noticed there is usually a small gap created between the two meshes. Maybe the bounding box from Sketchup is not perfectly parallel to the mesh edges?

                      I am also attaching two meshes where some triangles disappear when running the plugin. Maybe if we could invert the order it result in no missing triangles, I am not sure.


                      test01.skp

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdmitch
                        last edited by 10 Oct 2011, 18:15

                        It all depends on the order that it finds them in the model so the selection order doesn't matter.

                        Now that I know that order might be important, I will add an input so that the default order can be reversed.

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

                        http://sdmitch.blogspot.com/

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdmitch
                          last edited by 10 Oct 2011, 18:26

                          Yes there are sometimes tiny usually vertical gaps because the meshes aren't exactly the same vertically or horizontally in the overlap areas.

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

                          http://sdmitch.blogspot.com/

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdmitch
                            last edited by 10 Oct 2011, 18:42

                            Looks like I need to extend the faces vertically especially on the low side because, in yout test model, the bounding box of the mesh on the right surfaces momentarily on the mesh to the left which would result in some triangles along that edge not to be "cut" by the intersection.

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

                            http://sdmitch.blogspot.com/

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              driven
                              last edited by 10 Oct 2011, 19:09

                              if you view an 'Add Location' 'Terrain' with 'Top View' [ON] + 'Parallel Projection' [ON]+ 'Hidden Geometry' [ON] + 'Face Style .. Shaded' you will see that the mesh is regular EXCEPT for the border.

                              If you 'Unlock' this 'Terrain' then select all followed by alt/shift/selection-Box over the good mesh it will leave the borders selected for deletion.

                              The is under all the GE terrains, if you delete the borders, this good mesh will align with its neighbors.

                              A useful plugin only needs to 'Unlock Terrain' >> 'Select Borders' >> 'Delete Border Mesh'.

                              When you do this to a set of overlapping terrains they do mesh, but you can also delete the overlaps before exploding all into a new single mesh. I found I rarely needed to even intersect after this process.

                              I've got a half done tutorial if your interested.

                              john

                              learn from the mistakes of others, you may not live long enough to make them all yourself...

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                AcesHigh
                                last edited by 10 Oct 2011, 19:17

                                the new version is working very well. The ability to change the order worked well and was definitly important (I made the test with two meshes in different resolutions... first time I tried, the higher res mesh was deleted... I reversed the order and was able to keep the higher res mesh. Even if I have to undo and redo the operation selecting the other option, its still like 1/10th of the time needed to manually ZORRO (use the Zorro plugin) to subtract one mesh from the other. Maybe 1/20th of the time!

                                Multiply that by 100 different meshes and you get a HUGE time gain!

                                Thanks a lot. Hope you find a solution to the small gaps betwen meshes, which can be weird when rendering a close-up animation.

                                if thats not possible I wonder if there is some plugin I can use to create some small cover for the gap? Like, joining the two meshes?

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  AcesHigh
                                  last edited by 10 Oct 2011, 19:21

                                  @driven said:

                                  if you view an 'Add Location' 'Terrain' with 'Top View' [ON] + 'Parallel Projection' [ON]+ 'Hidden Geometry' [ON] + 'Face Style .. Shaded' you will see that the mesh is regular EXCEPT for the border.

                                  If you 'Unlock' this 'Terrain' then select all followed by alt/shift/selection-Box over the good mesh it will leave the borders selected for deletion.

                                  The is under all the GE terrains, if you delete the borders, this good mesh will align with its neighbors.

                                  A useful plugin only needs to 'Unlock Terrain' >> 'Select Borders' >> 'Delete Border Mesh'.

                                  When you do this to a set of overlapping terrains they do mesh, but you can also delete the overlaps before exploding all into a new single mesh. I found I rarely needed to even intersect after this process.

                                  I've got a half done tutorial if your interested.

                                  john

                                  yes, I am interested John. I got a bit lost on your explanation, the tutorial would help.

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdmitch
                                    last edited by 10 Oct 2011, 19:37

                                    @driven said:

                                    I've got a half done tutorial if your interested.

                                    john

                                    Please do because I'm missing something in the process.

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

                                    http://sdmitch.blogspot.com/

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      driven
                                      last edited by 10 Oct 2011, 22:13

                                      @AcesHigh and sdmitch,

                                      I've been playing around with this [for the first time and I'm on a mac]
                                      what I found is it's only the border set that are actually divergent. the spacing in the border is irregular [I suspect its to help flatten it for the 'Snapshot']

                                      I also found up to a point, the detail remains high even on large acreage, but falls back to triangulation if you go in too tight.

                                      The short of it is I came up with a workflow that very repeatable here.

                                      To start with
                                      I have [ v ] as a shortcut key to toggle 'View >>Component Edit>>Hide Rest of Model'
                                      and [ h ] as a shorthcut key to toggle 'View>>Hidden Geometry'
                                      and [ u ] as a shorthcut key to 'Unlock'

                                      I set a new drawing to 'Top View' with 'Parallel Projection' and in 'Styles>>Edges>>Color All Same' >> 'Lime Green' on this one the backgrounds all 'Dark Grey'

                                      I also open 'Layers' and put it to one side and for the tutorial 'Scenes' is open.

                                      This is the Skp that I'm writing up notes for, but thought you may want a look in the mean time.

                                      If you toggle between 'Shaded' and 'Shaded with Textures' on each scene, you'll probably figure out what I'm on about.

                                      john
                                      note to follow...soon[ish]

                                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        driven
                                        last edited by 11 Oct 2011, 00:19

                                        maybe someone with a good scene capture could make a better tutorial than this...
                                        the skp is on the post before this one...
                                        Add_Tiled_Terrain_Mesh.png
                                        Add_Tiled_Terrain_Mesh-4.png
                                        Add_Tiled_Terrain_Mesh-5.png
                                        Add_Tiled_Terrain_Mesh-6.png
                                        Add_Tiled_Terrain_Mesh-7.png
                                        Add_Tiled_Terrain_Mesh-8.png

                                        Using these steps a plugin that unlocks the terrain, then selects the irregular faces and deletes them would speed up the process.
                                        Navigation for selecting the 'next terrain mesh' would be better if the html had an option to use last 'grab' as your starting point.
                                        It does open on the last used but has 'no-cache' set and flicks to the stored model location as the starting point.
                                        It's a server-side script so can't be tweaked...

                                        Maybe a feature request is called for...
                                        john

                                        learn from the mistakes of others, you may not live long enough to make them all yourself...

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sdmitch
                                          last edited by 11 Oct 2011, 01:12

                                          Apparently there are major differences between the Mac and Windows versions. There is no border, that I can find, that is left when the mesh is de-selected.

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

                                          http://sdmitch.blogspot.com/

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

                                          Advertisement