[plugin] Clip or Trim Terrain Mesh (Update)

[plugin] Clip or Trim Terrain Mesh (Update)

Postby sdmitch » Wed Oct 12, 2011 8:02 pm

http://forums.sketchucation.com/viewtopic.php?f=323&t=40555

When you grab several Google Earth Terrain patches, there is often a problem with how the images overlay each other. To help with this problem, the attached plugin, Clip or Trim Terrain Mesh, allows you to select the mesh which you want to keep and the mesh to be trimmed. Everything from the 2nd mesh that falls within the boundary of the 1st mesh is deleted thus eliminating the problem.

In cases where smaller high resolution meshes are placed on top of larger low resolution meshes, you will often be left with vertical gaps especially in areas with significant elevation change due to the differences in the resolution of the grid and the interpolation of the surface.

Another cause of image mis-match are the border rows and columns even when the terrain patches are of the same scale. To help with this problem, use the Trim option of Clip or Trim Terrain Mesh, to remove them from the selected mesh. Press and release the Shift Key to toggle between clipping and trimming. Hopefully now Mac compatible.

Add Terrain Skirt, adds a skirt to the terrain mesh to give depth and definition to the mesh.
4
Last edited by sdmitch on Sat Nov 12, 2011 5:52 pm, edited 7 times in total.
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby Bob James » Wed Oct 12, 2011 10:41 pm

Super!! Thank you sdmitch :thumb:
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: [plugin] Clip Terrain Mesh

Postby srx » Thu Oct 13, 2011 10:27 am

Great. Thanks Sam.
0
www.saurus.rs
User avatar
srx 
 

Re: [plugin] Clip Terrain Mesh

Postby Panga » Thu Oct 13, 2011 3:34 pm

Thanks for this one Sam !! :thumb:
0

Panga 
Premium Member
Premium Member
 

Re: [plugin] Clip Terrain Mesh

Postby driven » Thu Oct 13, 2011 5:26 pm

Love the combo tool,
once I got my head around it EDIT removed potentially misleading comment...

and I found a use for it for me as well. 3D cycle route maps...

anyone got an easy way of using Google Maps as the terrain texture,
this ones manually scaled and aligned with the 'Google Earth Snapshot' then applied as a projected texture onto the Terrain Grid.
home_map.png


Google if your reading, can we have a map option? please...

good work Sam

john
0
Last edited by driven on Thu Oct 13, 2011 10:36 pm, edited 2 times in total.
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby sdmitch » Thu Oct 13, 2011 6:45 pm

John, You should press and release the Shift key to toggle between clip and trim. Holding down the shift key is not required or advised.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby driven » Thu Oct 13, 2011 6:49 pm

Sam,

doesn't toggle on a mac, I should have pointed that out. EDIT INCORRECT you DON'T need to keep it held down

that's what was doing my head in I checked your code and couldn't see why it wouldn't work, so I guess it's a Mac thing...

john
1
Last edited by driven on Thu Oct 13, 2011 10:31 pm, edited 2 times in total.
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby driven » Thu Oct 13, 2011 6:52 pm

removed
0
Last edited by driven on Thu Oct 13, 2011 10:33 pm, edited 2 times in total.
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby sdmitch » Thu Oct 13, 2011 7:03 pm

I wasn't aware of that difference with Macs since I only have windows at my disposal.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby driven » Thu Oct 13, 2011 7:11 pm

No, me neither, I had a search for mac key-codes etc,,, but I might try searching mac 'toggle' as keycode 16 seems to work.
EDIT 16 on it's own dosen't work on mac [I'd left the other in, but opened a copy when checking, what I'd done... sorry]
0
Last edited by driven on Thu Oct 13, 2011 10:40 pm, edited 1 time in total.
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby AcesHigh » Thu Oct 13, 2011 7:38 pm

great plugin! Thanks a lot!
0

AcesHigh 
 

Re: [plugin] Clip Terrain Mesh

Postby thomthom » Thu Oct 13, 2011 8:14 pm

sdmitch wrote:I wasn't aware of that difference with Macs since I only have windows at my disposal.


Don't use VK_ALT, VK_SHIFT etc - for cross platform, use

CONSTRAIN_MODIFIER_KEY = Shift Key
CONSTRAIN_MODIFIER_MASK = Shift Key
COPY_MODIFIER_KEY = Menu on Mac, Ctrl on PC
COPY_MODIFIER_MASK = Alt on Mac, Ctrl on PC
ALT_MODIFIER_KEY = Command on Mac, Menu on PC
ALT_MODIFIER_MASK = Command on Mac, Alt on PC

http://code.google.com/intl/no/apis/ske ... /tool.html (top of this page)

Also - when I use these, I don't try to make Shift or Control match across platforms. Because as you can see from the constant names, the modifier key to make a copy (when you use the Move tool for instance) differ from platform to platform. So just use these to match the norm for each platform.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby sdmitch » Thu Oct 13, 2011 9:29 pm

Thanks ThomThom, I'm still learning and need all the help I can get.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby thomthom » Thu Oct 13, 2011 9:37 pm

No prob! Always good to see more people writing plugins. :)
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip Terrain Mesh

Postby driven » Thu Oct 13, 2011 10:28 pm

Sam,
re: 'Clip or Trim' on MAC,
I just went over it all again and on the mac using if key ==16 || 131072 #shift PC || MAC,
makes it work as I believe you intended. [ is it?]

To start in 'Trim' mode:
'grab' grid/s >> select the 'Clip or Trim' from plugins >> press shift key once to activate 'Trim' >> click on 'Terrain' to 'Trim' grid/s in turn.

To start in 'Clip' mode:
'grab' grid/s >> select the 'Clip or Trim' from plugins >>click on 'Terrain' to 'Clip' grid/s in turn.

To switch between modes from either mode, press shift key once >> click on next 'Terrain'

To exit 'Clip or Trim' click outside of all 'Terrain' groups.

This is how it work with that change, I edited my above posts avoid to blind copying of my erroneous prior comments.

I believe this tweak is cross platform, due to the none applicable keycode being ignored, but I don't have a PC easily at hand.

Sorry if any confusion [other than my own] was caused by earlier comments, but I was in and out today without the time to plod through it properly.

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

driven 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby mitcorb » Fri Oct 14, 2011 3:20 am

Hi, sdmitch:
Thank you for your generousity in sharing this tool.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby utiler » Tue Dec 13, 2011 2:26 am

Hi Sam, On your blog you have added an impressive list of plugins including these two however there is also a 'terrain tool's plugin that doesn't have a tutorial video. How does this differ from these two listed here?

cheers, thanks for your fantastic work!! :thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby sdmitch » Tue Dec 13, 2011 3:01 am

Terrain Tools is just the collection of all my plugins that pertain to GE Terrain's. Clip or Trim being one of them plus two others. There are no other differences. I just put them all into one to help minimize the entries in the Plugins menu.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby utiler » Tue Dec 13, 2011 3:23 am

Ok, thanks Sam.Just on GE:
I noticed in your Clip or Trim tutorial you merge two terrains of differing proxy. Does GE determine the resolution of your export into SU by your current eye high as well as the maximum resolution you end up with?

I have a situation at the moment where I want to obtain the maximum resolution of of GE however my site covers about 3 hectares and I need to cover it with a GE image.

I wonder if there is a way recall you last selection when exporting GE imagery or even replicate your selection left and right multiplied by how far you want? [See image below...]

Cheers,
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby sdmitch » Tue Dec 13, 2011 3:41 am

Thers is no way to "automate" that that I am aware of.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby dinkdesign » Mon Apr 09, 2012 7:28 am

You guys are absolute legends. You take modeling to a whole new level.

I was hesitant to join SketchUcation because i hate useless info, but honestly: you guys rock!

Special thanx to Gaieus and ThomThom for their constant useful contributions.
0

dinkdesign 
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby Gaieus » Mon Apr 09, 2012 7:43 am

dinkdesign wrote:Special thanx to Gaieus and ThomThom for their constant useful contributions.

Well, I really had to approve this post (even though I have not contributed with anything in this topic). ;)
0
User avatar
Gaieus 
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby Ben Ritter » Wed Jun 13, 2012 7:43 pm

Sam, thank you for sharing your efforts.
0

Ben Ritter 
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby utiler » Sun Sep 23, 2012 11:23 pm

Hi Sam, during your tutorial video at about 1:20 you say, 'If its only zoomed out 3 or 4 clicks....'

What are you referring too here?

:thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby sdmitch » Mon Sep 24, 2012 12:01 am

I viewed the tutorial and I don't hear what you heard but I would assume that I am referring to zooming out from the smallest possible patch 3 or 4 clicks.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby utiler » Mon Sep 24, 2012 4:02 am

Thanks for the reply, Sam.

http://www.youtube.com/watch?v=RP9ZR2xB ... e=youtu.be


At about 1min 20sec you refer to 'if its only zoomed out 3 or 4 clicks [no more than that] the grid of the two patches match....'

2012-09-24_1248.png




Are you referring to zooming in Google Earth:

2012-09-24_1254.png


:thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby sdmitch » Mon Sep 24, 2012 7:49 pm

Yes, the Google Earth get location zoom. I thought you were talking about the clip and trim plugin not the add skirt.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby utiler » Mon Sep 24, 2012 11:11 pm

My bad, Sam. I can see how you would have been ill informed.... :oops:

Thank you. :thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby greatcurve » Wed Dec 26, 2012 5:08 pm

Is there a way to make these plugins work with SU 8?
0

greatcurve 
 

Re: [plugin] Clip or Trim Terrain Mesh (Update)

Postby thomthom » Wed Dec 26, 2012 5:27 pm

greatcurve wrote:Is there a way to make these plugins work with SU 8?

Are you getting errors?
The author uses SU8 - as his profile says - and usually if a plugin doesn't work with a version it's explicitly stated in the plugin description. I believe this should work with SU8.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: medeek and 8 guests

Visit our sponsors: