utils/Modeller/threedconvert.exe
program to convert from .bgl to 3ds:
../FlightGear-0.9.8/utils/Modeller/threedconvert.exe duckybar.ssg duckybar.3dsHere's a script that will convert all the .bgl files to .3ds files:
#!/bin/sh bgls=`ls -1 *.bgl` for bgl in $bgls do echo $bgl ssg=`basename $bgl .bgl`.3ds ./FlightGear-0.9.8/utils/Modeller/threedconvert.exe $bgl $ssg >& `basename $bgl bgl`.out ls -l $ssg done
To see the limit, start Google Earth and see Help -> About. Typically, the limit is 2048x2048. (Instructions)
pngtopnm < ../06TCmap2.png > 06TCmap2.pnm
pamdice -outstem 06TCmap2_256 -width=256 -height=256 < 06TCmap2.pnm
http://www.cygwin.com
and then be sure to install Imagemagick.
subdivide2
0 1 2 3Note that the images/ subdirectories can be removed after subdivide2 runs
dicekml
subdivide2 CompositeMerged.pngTuning tip: Ideally, the image is an even multiple of 256 pixels and is square. If not, you can adjust the sizes to which the model is scalled and the size at which we subdivide again. For example, a large image divides down to 359x307, so we scale it to that size and only subdivide if the image is larger than that size:
if [ $newWidth -gt 359 -o $newHeight -gt 307 ] ; then (cd $ext; $subdivide2 img.png) fi # Scale to the smallest tile size mogrify -scale 359x307 $ext/img.png
convert -scale 256 CompositeMerged.png img.pngIf, under Windows, convert fails to start up, you may need to adjust the path:
export PATH=/usr/X11R6/bin:${PATH}
Note that 256x256 is the magic number if your image size divides by 256. An alternative is to resize it so that it is the same size as the smallest tile that is produced by subdivide2. Continuing with our example one would:
convert -scale 359x307 CompositeMerged.png img.png
minLodPixels=270to the value of the size of the tiles. For example, my tiles came out to be 180x153, so I set minLodPixels to 180+(180/2). An alternative would be change subdivide2 so that it does not create images less than 307 pixels in size.
Then, run dicekml:
dicekml 40.78698240735224 40.75238209417149 -119.1995634988887 -119.2439715775522
find . -name "images" -exec rmdir {} \;
top.kml
file and update the lat and lon.