ink_polaroid
Sysop
Reged: 01/01/05
Posts: 1868
Loc: SF Bay Area, CA
|
|
Some of you have expressed interest in being able to export your SketchUp models to Google Earth. This is now possible, albeit in a very basic way.
The attached zip file contains a couple of ruby scripts that you can drop into your SketchUp plugins directory. The first one, "Export KML (faces)" will attempt to export your model as-is. It works quite well for solid objects, but doesn't yet cope with holes.
To get around that, there is another script "Export KML (mesh)" , which first generates a mesh of your object(s) and exports that. Not as pretty, but neatly avoids having to deal with holes.
Neither will export colors, materials, textures etc. But it should be enough to whet a few appetities.
|
smcq
Tourist
Reged: 06/11/05
Posts: 234
Loc: Salt Lake City, Utah
|
|
Thank You! Your responsiveness is extraordinary.
The SketchUp folks, by the way, are like that too. @Last software. Good fit with Google.
SMcQ
-------------------- Just another user, not an authority.
|
smcq
Tourist
Reged: 06/11/05
Posts: 234
Loc: Salt Lake City, Utah
|
|
Considering that SketchUp is available as a fully functional trail version with 8 cumulative hours, the techniques for using the new kml exporters should be of wide appeal on this forum.
Until someone develops a computational approach, here is how you can reduce the trial and error with a calibration approach.
First, make a standard metric cube in SketchUp. Mine is 3 meters, but yours could be larger, say 10 meters. It can be centered on its base or at a corner of the base
Second, in Google Earth change your preferences to meters. Then determine the latitude, longitude and elevation where you want to calibrate.
Export the SketchUp metric cube using the faces exporter. The dialog box will ask for lat, long, alt, lat scale, long scale, alt scale. If you export with the default settings you would see in Google Earth an oversize large kml model on the equator with undistorted lat and long dimensions. If you specify somewhere in the mid-latitudes you will see an overlarge model squeezed along the latitude. By trial and error, you will finally get a cube placed upon the surface that measures fairly the same along all axes, at the original dimensions in SketchUp. These will be your scale factors at that latitude, for any longitude.
In Salt Lake City at Library Square, this is what seems good to me: the lat scale is 2.31e-007, the long scale is 3.1e-007, and the alt scale is 0.025. I get a 3 meter cube from SketchUp that measures about 3 meters in Google Earth. There is still slight distortion that results from the algorithm used in this case for converting XYZ to polar. It could be better, but this works well enough.
Important note about altitude: You could simply accept the “relative to ground” default by leaving the altitude at zero in the dialog box. Or you could use the elevation in meters at the location you want to place the model. Upon import, edit the location to make it Absolute, and the model will be located as desired, undistorted by the terrain. If the terrain slopes at the location, there will be either a gap between the bottom and the ground, or the ground will lap up the side of the model. The solution is to export a model that accommodates the slope with its geometry.
SMcQ
-------------------- Just another user, not an authority.
|
pmaxfield2
Explorer
Reged: 10/29/04
Posts: 293
Loc: Portland, OR, USA
|
|
Soccer anyone?
-------------------- My 3D Warehouse & network link
My Panoramio
Google Maps Overlay
Globe Glider
|
smcq
Tourist
Reged: 06/11/05
Posts: 234
Loc: Salt Lake City, Utah
|
|
Here are a tent and a cube located over the same place. Both exported from SketchUp. Nothing special about them, but this sort of calibration will help you get your final scaling right.
SMcQ
-------------------- Just another user, not an authority.
|
svens
Tourist
Reged: 07/06/05
Posts: 159
Loc: Amsterdam, The Netherlands
|
|
Blue 747 approaching NY...
|
svens
Tourist
Reged: 07/06/05
Posts: 159
Loc: Amsterdam, The Netherlands
|
|
I've been messing with the ruby script. And in the faces_exporter I've started with adding colors.
Firstly you set default colors, these will be overwritten by translated colors.
It needs further development....
|
svens
Tourist
Reged: 07/06/05
Posts: 159
Loc: Amsterdam, The Netherlands
|
|
and an example...
|
tcraf387
Tourist
Reged: 05/24/06
Posts: 2
|
|
Hi, I am having so much trouble trying to export the image. I did what you said but I am still unable to do so. Can you help me?
|