Thursday, March 27, 2014

OGLE: The OpenGLExtractor / Discussion / Applications:Google earth work

OGLE: The OpenGLExtractor / Discussion / Applications:Google earth work:

'via Blog this'

Export FROM Google Earth - Google Groups

I have GOT to try this!  Old thread- cool idea...

Export FROM Google Earth - Google Groups:

Actually, you can grab the buildings, along with the terrain that appears in Google Earth. It's a little tricky, but nothing requiring rocket science. This particular technique only works, as far as I know, with a PC, and you will need the applications GLIntercept and OGLE:

What you do with these programs is literally to intercept the OpenGL instructions to your video card from Google Earth, and then convert them to a standard mesh. Obviously, for this to work you have to have Google Earth running in OpenGL mode, not DirectX. Also, as noted in the OGLE instructions:

"Some applications do not seem to want to function (i.e. they crash!) with GLIntercept if the real OpenGL32.dll is in the system location. If you are having wierd problems, try the following:

1. Copy the sytem dll (most likely C:\WINDOWS\system32\opengl32.dll) to your app's directory (name it opengl32.orig.dll or some such)
2. Set GLSystemLib = "opengl32.orig.dll"; in your gliConfig.ini file."

Google Earth is one of the applications that require that procedure; if you don't copy the system dll into the GE directory, GE will simply not work at all (if you have placed the GLIntercept files in the GE directory). Follow this and the other directions with GLintercept and OGLE very carefully. The end result will be an .obj file that includes what was visible in your screen in GE, along with some odd artifacts. To get this file into SketchUp, you'll have to translate the .obj into something SU opens. Some modelers seem to have difficulty with .obj files created by OGLE, notably 3DS Max. But I have been able to open them just fine with Rhino (and re-export them as .dwg files to SU), and you might try any of the various free translators floating around on the web.

Several things to consider: first, when you intercept OpenGL from GE, you should be looking straight down onto the GE location you want, otherwise your resultant model will not be aligned to the real z-axis. Also, the intercepted model will not have any scale related to real world distances. The way I get around this is to place in Google Earth, prior to using OGLE, a cube of known dimensions (like 100' x 100' x 100') somewhere close to the area I want to capture. When I finally get my captured mesh file into SketchUp, I use that cube to reset the model's scale to reality.

I've attached a .jpg of Boston from GE (note my red 100' cube in the foreground), and a rendering of the cleaned-up SketchUp model of the same area I made using Google Earth and OGLE (and Rhino, to translate the .obj file). The texture on the harbor is a copy of the texture SketchUp imported directly from the same Google Earth location.

I have seen quite a few digital models of Manhattan that were obviously extracted from Google Earth using just this technique. It is probably worth considering Google Earth's licensing restrictions and Google & friends' copyrights before you use a model of a city pulled from Google Earth for any professional purposes.

Attachments (2)
128 KB   View   Download
78 KB   View   Download

'via Blog this'

Wednesday, March 26, 2014

Chrome (Chromium) switches

List of Chromium Command Line Switches
There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2014-03-26.

How to use a command line switch?
The Chromium Team has a page with overviews on how to use these switches.

Tuesday, March 11, 2014

Need to pad a file or name (like Slide1) to have zero placeholders? Here is a quick REGEXP routine for VBA to PAD numbers in a string. Works in Excel and would work in a VBS as well.

Private Sub Test_Regexp_pad()
   Debug.Print Regexp_pad("9")
   Debug.Print Regexp_pad("12345")
End Sub
Private Function Regexp_pad(strFP As String) As String 'vALUE As String, Optional Pad As Integer) 'As String
  Dim r                                      '''As RegExp '''include "microsoft vbscript regular expressions 5.5" if debugging...
  Set r = CreateObject("vbscript.regexp")    '''Create Regexp
  If Pad = 0 Then Pad = 4                    '''If pad not specified they get 4
  r.Pattern = "(.*?)(\d+)(.)(.*)"                '''Items in () are returned in result set, objects without are dropped
  r.IgnoreCase = True
  Dim m                                      '''As MatchCollection   '''Holds the results. Nested (foo*(Bar*)) searches cause multiple m.item()
  Set m = r.Execute(strFP)
  On Error GoTo REGEXP_PAD_ERR               ''on bomb - return same value

   Dim i As Integer
   Dim intMyVal As Integer
   For i = 0 To m.Item(0).SubMatches.Count - 1
      If i <> 1 Then
         Regexp_pad = Regexp_pad & m.Item(0).SubMatches.Item(i)
         intMyVal = Int(m.Item(0).SubMatches.Item(i))
         'If Len(Trim(intMyVal)) > Pad Then Pad = Len(Trim(intMyVal))             ''if numbers exceed padding AND truncate
         Regexp_pad = Regexp_pad & Format(intMyVal, String(Pad, "0"))
      End If
   Next i
Exit Function
   On Error Resume Next
   Regexp_pad = strFP
   'Err.Raise 1, , "Unsupported number padding type or type without number"
End Function

Tuesday, March 4, 2014

Windows 7 local shortcuts "do you want to open this file" warning

Windows 7 local shortcuts "do you want to open this file" warning:

'via Blog this'

Ok this has annoyed the ever-living daylights out of me for a while. I have my favorites as a quick-launch from the start menu (as they appear everywhere- it is a fast path location to my projects, files, etc.)

But I would get this annoying message "These files may be harmful" every time I launched Chrome or anything else from there.

So I found the above link and came up with this:

ICACLS "C:\Users\%username%\favorites"
/Setintegritylevel (OI)(CI)

Which resets the discretionary access control list for that folder/subfolder. Keep in mind this may be a place for viruses to hide or malicious shortcuts, but virus scanners take care of that for the most part (nothing is allowed to create any shortcuts, downloads, etc. without having to ask)

So now to script right clicking my next project to add the shortcuts to where I want to go!