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

Comments

  • edited January 2012
    Avotas - the link does not work - got redirected to a generic junk screen. Check your address my friend!
    OOPS - my bad - just got the zip. Must've been a traffic glitch.
  • Ha. No, I corrected it a moment ago. Sorry for the confusion!

    -Avotas
  • 15 days later
  • A revised version has been posted. See above.
  • 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.
  • Sorry to sound stupid, but I don't see the link
  • I went ahead and pulled down the link. Sorry I needed the server space for the production world.

    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!
  • I have some of my free web sites at http://www.cwahi.net/ Some of the other users' sites are over 15 gigabytes. Note that you have to have a functonal web site there ( with a blog/cms/html, per the terms of service, not just a storage site.
  • Tell us HOW! *shakes Avotas violently*

    ;)
  • Ok Ok ^^ I didn't think there was an interest honestly. Go ahead and grab GeoServer (http://geoserver.org) and find a copy of Photoshop or some other large scale image editor. Give me a few days, and I will post the steps here.
  • You said you were going to post instructions, so I was waiting patiently for you to post instructions. And then the patience wore out.... :D
  • I been buried in work. A few more days please.
  • 7 days later
  • edited February 2012
    Ok. This will be a time consuming process, it's just the nature of the beast. For now these directions might be a little rough, still low on time in the real world, but I wanted to get something out. Just as a note, I ran into a Java error on publishing the data in GeoServer. I submitted a bug report, and found the current version of GeoServer does not support BigTifs (files over 2GB in size). This will be fixed in the next release. Until then, the below example has been downgraded to 1 GB, dropping a great deal of quality.

    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
  • Added a demo link, updated a few minor things.
  • So, with the steps I took posted .. what does the ProFantasy staff think about the steps? Can they be refined any? I am sorta new to FT3.
  • Thanks for posting them! I don't know if my widdle ol' laptop can handle that level of processing power, but I will definitely save them to try out some time!
  • Oh, with the exception of the Photoshop step, you should be fine. It will just take a lot of time on a older/slower machine. As a followup my server folks just returned my call, and they want something along the lines of $40 / month to host the WMS over a T3 backbone. That is well beyond what I want to spend, so I will keep the example up on my cheapy home server for a little while longer, then I will have to pull it down.

    -Avotas
  • I suggest moving to http://www.cwahi.net, or if you want a paid domain http://www.crosswinds.net/

    My sites are there and I have had no problems. And they don't charge extra for bandwidth.
  • Simon RogersSimon Rogers Administrator, ProFantasy Traveler
    Posted By: AvotasSo, with the steps I took posted .. what does the ProFantasy staff think about the steps? Can they be refined any? I am sorta new to FT3.
    Personally, I prefer Gaia view, but this is great. We've used Zoomify when we've wanted to do this - see the profantasy.com home page.
  • 11 days later
  • edited March 2012
    JimP,

    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.
  • edited March 2012
    Plan B!

    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
Sign In or Register to comment.