Hacking Fractal Terrains 3 [Now Fortified with Plan B!]
Hey,
So I love Fractal Terrains 3, but I am hitting some short comings when it comes to the maximum resolution I can actually export from the software. That is to say, if I want a high resolution 52,000 x 26,000 px Google Earth map, I should be able to do it right? What about overlays and color keys? Location names? Historical information?
So I did. I never let impossible things stop me before
Enclosed is a link to a 52,000 x 26,000 px Google Earth image, exported from FT3, complete with a sample location, a color key, and some other goodies. All the data is streamed from my private server.
The idea is to move away from a flat atlas approach. Hopefully in the next few months I will populate a sizeable part of the world, and post directions on how all of this is made possible. Until then I am open to suggestions, an enchantment requests. What do you think?
Example #1: OpenLayers (Like GoogleMaps) Link.
Example #2: Google Earth Plan "B" Example
The area of interest is located at -9.308223 -154.278878. Just type that into the search bar.
-Avotas
So I love Fractal Terrains 3, but I am hitting some short comings when it comes to the maximum resolution I can actually export from the software. That is to say, if I want a high resolution 52,000 x 26,000 px Google Earth map, I should be able to do it right? What about overlays and color keys? Location names? Historical information?
So I did. I never let impossible things stop me before
Enclosed is a link to a 52,000 x 26,000 px Google Earth image, exported from FT3, complete with a sample location, a color key, and some other goodies. All the data is streamed from my private server.
The idea is to move away from a flat atlas approach. Hopefully in the next few months I will populate a sizeable part of the world, and post directions on how all of this is made possible. Until then I am open to suggestions, an enchantment requests. What do you think?
Example #1: OpenLayers (Like GoogleMaps) Link.
Example #2: Google Earth Plan "B" Example
The area of interest is located at -9.308223 -154.278878. Just type that into the search bar.
-Avotas
Comments
OOPS - my bad - just got the zip. Must've been a traffic glitch.
-Avotas
I suspect you, like myself, are trying to do things for which FT was never intended. One of the things I hope to be able to soon do is export my FT maps into a GIS server so that I can maintain things like names, sub links and historical information.
As for the GIS server, that is the same concept I had! I am just using Google Earth instead of a webmap service. It takes some doing, but it possible!
Example: OpenLayers (Like GoogleMaps) Link.
Getting your maps into a WMS
Part 1: Design
1) Start Fractal Terrains 3
2) Design your map
3) Select File -> Export World -> Multiple Files
4) Select Generate CC3 files to unlock Map Level Info
5) Select Full Export
6) Select Map Levels 1 (these will be generated by the WMS service)
7) Select an Output Directory
8) Select Map Level 1.
a. Select the number of tiles you want your map to be divided into. I selected "16" sense that is the maximum level. Add the value for wide and high, the software will correct any errors if you run out of map.
b. Select 0% overlap
c. For Image Resolution choose a power of 2 to be the most efficient with memory usage. I went with the maximum 4096. The smaller the number, the more work you will need to do. It is better to have fewer tiles and a larger resolution then the other way around.
9) Hit Ok. Wait. This took about 8 hours to process on a fairly midrange Intel I5 @ 3.20 GHz. Final size was someplace around 4 GB.
10) Save your work on an external drive.
11) Open your folder and select all the CC3 files, delete them.
Part 2: Processing
1) Open Adobe Photshop CS2-5
2) Create a huge canvas size, something along the lines of 60,000 x 30,000 pixels.
3) Save it as a "PSB" Large Document Format.
4) Make sure you have lots of swap space / memory. I ended up using nearly 200 GB and had to turn off my history.
5) Stich all the tiles together into a huge mosaic.
6) Save Often! Wait Often! Photoshop is 5-10x slower when dealing with Large Document Formats.
7) When you're done you need to play with your image size and get it under the 4 GB limit on GeoTiffs. It's easy to resize things as one single file instead of a bunch of loose files. My final ended up someplace around 3.84 GB, with some wiggle room just in case the computer needed it.
8) Save it as a Tiff. Accept the default settings.
Part 3: Geo-Processing
1) Open ArcGIS, or your favorite Georeferencing program.
2) I assigned the projection 'World Plate Carree" or "Equirectangular projection". The only difference is the position of the equator. FT3 will uses Equirectangular to draw the map, but the unofficial standard really is to use Carree for these huge raster world maps. I converted it over to standard Lat/Lob (WGS84) as well.
3) Georeference the extents to match the real world. I used a shapefile for mine, and snapped the four corners into place, updated the header, and I was done. It's not perfect, but it's good enough for a work in progress.
4) Save
Part 4: WMS Server
1) Add your world map to the Stores
2) Add your Layer and publish the data. (See Note @ top of page)
3) Select Layer Preview
4) Enjoy your data in OpenLayers, or KML/GML (Google Earth) or as a WMS for other applications.
GeoTiff Header:
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-20037507.1 10018754.2 0
ModelPixelScaleTag (1,3):
764.425513 764.411108 0
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeProjected
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GTCitationGeoKey (Ascii,30): "PCS Name = World_Plate_Carree"
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogCitationGeoKey (Ascii,13): "GCS_WGS_1984"
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
GeogSemiMajorAxisGeoKey (Double,1): 6378137
GeogInvFlatteningGeoKey (Double,1): 298.257224
ProjectedCSTypeGeoKey (Short,1): User-Defined
ProjectionGeoKey (Short,1): User-Defined
ProjCoordTransGeoKey (Short,1): CT_Equirectangular
ProjLinearUnitsGeoKey (Short,1): Linear_Meter
ProjStdParallel1GeoKey (Double,1): 0
ProjFalseEastingGeoKey (Double,1): 0
ProjFalseNorthingGeoKey (Double,1): 0
ProjCenterLongGeoKey (Double,1): 0
ProjCenterLatGeoKey (Double,1): 0
End_Of_Keys.
End_Of_Geotiff.
Projection Method: CT_Equirectangular
ProjCenterLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
ProjCenterLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
ProjFalseEastingGeoKey: 0.000000 m
ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)
Corner Coordinates:
Upper Left (-20037507.068,10018754.204)
Lower Left (-20037507.068,-10018754.177)
Upper Right (20037500.455,10018754.204)
Lower Right (20037500.455,-10018754.177)
Center ( -3.306, 0.014)
You will notice that even at high resolutions the world map is still a bit blurry. You can add 4096x4096 "points of interest" by opening FT3, exporting a single image, and using the Lat/Lon of the top-left corner to georefrence your image. I only played with that a little bit, but more will come in the coming months.
Let me know if you get stuck!
Avotas
-Avotas
My sites are there and I have had no problems. And they don't charge extra for bandwidth.
Thanks for the link, but eh .. Im not ready to leave my current hosting provider. To be fair they have been very responsive and supplied good stable servers upto this point.
Everyone,
"Plan B" is ready. Because of the above problems with hosting a WMS server, and because the WMS was fairly slow, I have drafted a new concept. Directions and examples will follow sometime this week (I hope today). Stay tuned.
Plan B uses a web server to host Google Earth tiles that are downloaded on demand. To achieve this you need to download Google Earth Tiler (http://earth.tryse.net/#programs). When you see <"href"> in the directions, please remove the " " marks. I did this so the directions would post correctly on the forums.
Part 1: Design
1) Start Fractal Terrains 3
2) Design your map
3) Select File -> Export World -> Multiple Files
4) Select Generate CC3 files to unlock Map Level Info
5) Select Full Export
6) Select Map Levels 1 (these will be generated by the WMS service)
7) Select an Output Directory
8) Select Map Level 1.
a. Select the number of tiles you want your map to be divided into. I selected "16" sense that is the maximum level. Add the value for wide and high, the software will correct any errors if you run out of map.
b. Select 0% overlap
c. For Image Resolution choose a power of 2 to be the most efficient with memory usage. I went with the maximum 4096. The smaller the number, the more work you will need to do. It is better to have fewer tiles and a larger resolution then the other way around.
9) Hit Ok. Wait. This took about 8 hours to process on a fairly midrange Intel I5 @ 3.20 GHz. Final size was someplace around 4 GB.
10) Save your work on an external drive.
11) Open your folder and select all the CC3 files, delete them.
Part 2: Processing
1) Open Adobe Photshop CS2-5
2) Create a huge canvas size, something along the lines of 60,000 x 30,000 pixels.
3) Save it as a "PSB" Large Document Format.
4) Make sure you have lots of swap space / memory. I ended up using nearly 200 GB and had to turn off my history.
5) Stich all the tiles together into a huge mosaic.
6) Save Often! Wait Often! Photoshop is 5-10x slower when dealing with Large Document Formats.
7) When you're done you need to play with your image size and get it under the 4 GB limit on GeoTiffs. It's easy to resize things as one single file instead of a bunch of loose files. My final ended up someplace around 3.84 GB, with some wiggle room just in case the computer needed it.
8) Save it as a Tiff. Accept the default settings.
Part 3: Google Earth Tiler
1) Open the combined file.
2) Enter 90, 180, -180, -90 for the North, East, West, South fields
3) Set your tile size to 512x512, A 256x256 system will just create more work for you.
4) Hit Go!
5) Once the processing is complete, it could take hours depending on the speed of your system, hit "Open in Google Earth" and verify the results.
6) If everything is correct navigate to the output folder, open up your favorite code editor (I use Notepad ++), and open the completed KML. Do a find replace for <"href"> and change it to "<"href">http://www.yourwebaddress.com/foldername/ ". That establishes the link to the internet, so instead of searching your local HD for the tiles, it will check that location instead.
7) Save
8) Upload all the files to your webserver. I had something like 9,000 of them, so a FTP client is best.
9) Test your modified KML. In Google earth.
Part 4: Adding Areas of Interest
If you want to add an area of interest that is a higher resolution, follow these steps. This process is not perfect, but it will get you fairly close.
1) Open FT3. Zoom in an area you like.
2) Hit Save As, make sure Keep Main Window Proportions is checked, set a Width of 8000 or so.
3) Hit Ok
4) Using the ruler tool, go back into your main window and get the coordinates for the upper left and lower right corners. Write these down. Do not move the window. Do not zoom in.
5) Open Google Earth.
6) Load your fantasy world created in the above step.
7) Hit "Create Overlay"
8) Link to your exported FT3 image.
9) Enter the coordinates you obtain from FT3. Starting with the upper left number, the format is North, West. The lower right number is South, East.
10) Google should get it fairly close to the correct location. Use the transparency slider, grab the corners of the frame, and bend and twist the shape until everything is perfectly aligned.
11) Record those coordinates.
12) Go back to Google Earth Tiler.
13) Open the new area of interest image
14) Enter the corrected coordinates you obtain from Google Earth.
15) Create a new folder for the output, so you don't overwrite the older files.
16) Set your tile size to 512x512, a 256x256 system will just create more work for you.
17) Hit Go!
18) Check your results.
19) If everything is correct navigate to the output folder, open up your favorite code editor (I use Notepad ++), and open the completed KML. Do a find replace for <"href"> and change it to "<"href">http://www.yourwebaddress.com/foldername/ ". That establishes the link to the internet, so instead of searching your local HD for the tiles, it will check that location instead.Notice the addition of the subfolder, so your files are not overwritten.
20) Do a find replace and change the "" to a value of 10 (or higher). Draw order controls what is drawn when the user is close to the image, whatever image has the highest the number gets drawn. You want a high value, so you don't clash with the lower-resolution files.
21) Select the highest folder level, in my mine it was 4, and copy between the and tags.
22) Open up your kml you created in the previous step, navigate to the end, and paste your code above the tags. This will command Google Earth to draw your area of interest only when you close to it, and only when are zoomed down to an approbate level.
23) Save
24) Upload your files to the web server
25) Check your results in Google Earth.
Example: Plan "B" Example
The area of interest is located at -9.308223 -154.278878. Just type that into the search bar.
-Avotas