Is there a way to fix the icosahedral export to support Traveller?

The current export does not match the traveller standard or even most of the cosmographer world templates.

I have been exporting them, editing with gimp and then bringing them into CC3+ but this leads to human error issues.

I don't know if FT3 is still in development but it would be great to use it for Traveller.

Comments

  • MonsenMonsen Administrator 🖼 81 images Cartographer

    I am not to familiar with the details of Traveller myself, but have you tried saving it using File -> Export World -> Cosmographer template? That should save both an image and a .fcw file, which as far as I understand it, is in Traveller format.

  • The issue is, there are two different styles for Traveller world maps. One that has the world split into 20 triangles, while the other style splits one of the triangles in half and has it on each side of the export.

    You can cut the half triangle from the left side of the image and paste it onto the right side of the image, but you need to do some image repair due to the way the edges of the png export is slightly alpha blended (so the line where the pasted image connects to the right hand side, is shows some transparency so that needs to be repaired)

    If you have cosmographer, you can open the world map templates and you will see that there are two different versions of the worlds ie two size 7 world templates, two size 8 templates etc.,

  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    It should be possible to edit the projection.txt file in your FT data directory (default location as installed on my machine is C:\ProgramData\Profantasy\FT352) to create a composite projection to have the desired behavior, but it will be very slow to draw. The "6-way Interrupted Pointy" or "6-way Interrupted Sinusoidal" examples are probably good starting points, but you'll need to calculate out the segments that you need.

    The existing icosahedral output is an image-space bit of ugliness that generates something plausible, but not something "correct". Being an image-space trick is why it's not available as a projection in the main user interface because an image is generated and then undergoes a set of piecewise linear warps to get the final output.

  • Is there a good set of documentation I should read to give me the step by step of how the file is setup/calculations are done?

  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    The top of the projection.txt file has about all of the documentation available and the interrupted examples should get you an idea of what needs to happen. The hard part is the exclusion areas that need to be defined, but more or less what you need to do is identify each of the vertices of the triangles involved in the projection and plug those in for each segment. The "Pointy" projection was the first step toward getting an equivalent to the screen-space icosahedral operation, but I never got the full projection finished for delivery.

  • Interesting, the projection I will try to make, is 19 equilateral triangles, plus two right angle triangles representing a equilateral triangle split in half. So 21 sections.

    I wish I had the settings that the existing icosahedral export uses. I will try to figure the system out.

    Are you the developer or are you just really experienced with the program?

  • jslaytonjslayton Moderator, ProFantasy Mapmaker
  • Is it possible to get the numbers you used for the export? I would like to match your work as closely as possible.

    Also, is it possible to sweet talk you into supporting the ability to pass a script name that should be run?

    I love the functionality of FT but I need it from the command line, unfortunately the options aren't available from the existing command line but are available from the scripts. Passing the script name would solve that problem.

    I have already pulled all the world data from the traveller map and I am hoping to do up library data entries for all the worlds with images generated by FT3

  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    I don't understand what you mean by "Is it possible to get the numbers you used for the export?"

    Implementing the script from command line feature is a small task, but spinning a new FT release is not a small task. I don't know when the next significant development push with FT will be, unfortunately. It's likely going to need to wait until after CC4 because that's where my effort is going at the moment.

    Don Anderson Jr.
  • This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.

    In the export section, there is a icosahedral export option. That is the version I am trying to copy, but, I need to make one small adjustment. If I had the values you used in calculating the export, I could use them to make a projection.

    As for a new version, no rush, but, if you need a beta tester, I will gladly help.

    If you are looking for other suggestions, a 64 bit version would also be helpful to use more memory.

  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    Fractal Terrains 3+ is a 64-bit version.

    See if these construction lines help any:

    In projection.txt, there is a projection called "6-way Interrupted Pointy" (incorrect name) that has five points above and below an empty band. That might be a good starting point for a true icosahedral projection if you're willing to go that way using the above diagram.

    Here's the code for the existing image-space icosahedral-like thing:

    1. #define PADD(a, i) ((int) (wb[(int) (a)] + (i) + 0.5))
    2. void IcosahedralProjection(VideoBuffer* pTexture, COLORREF Clear)
    3. {
    4. // get the size
    5. int w = pTexture->GetXMax();
    6. int h = pTexture->GetYMax();
    7. const COLORREF transparent = 0;
    8. const COLORREF opaque      = 0xFFFFFFFF;
    9. double h3  = h / 3.0;
    10. double w11 = (- 1) / 11.0;
    11. // calculate the points of the icosahedron
    12. double wb[12];
    13. for (int i = 0; i < 12; i++)
    14. {
    15. wb[i] = i * w11;
    16. }
    17. // calculate the width of the line in pixels after downscaling
    18. auto lw = (int) (10.0 * w11);
    19. double d = w / (double) lw;
    20. // alloc scratch line buffers
    21. auto pbuf = new COLORREF[+ 16];
    22. auto p1   = new COLORREF[+ 16];
    23. for (int iy = 0; iy < h; iy++)
    24. {
    25. int ix;
    26. double y, xw;
    27. // read as much of the line as we need plus a little slop to account
    28. // for overflow from for rounding errors
    29. for (ix = 0; ix < lw + 2; ix++)
    30. {
    31. auto xx = (int) (* ix);
    32. pbuf[ix] = pTexture->ReadPixel(xx % w, iy);
    33. }
    34. // clear the line we just read
    35. for (ix = 0; ix < w; ix++)
    36. {
    37. pTexture->PlotPixel(ix, iy, Clear);
    38. }
    39. // sample to points at top
    40. if (iy < h3)
    41. {
    42. = (iy + 1) / h3;
    43. xw = w11 * y;
    44. // resample to new shape
    45. for (ix = 0; ix < xw; ix++)
    46. {
    47. auto x1 = (int) (ix * w11 / xw);
    48. pTexture->PlotPixel(PADD( 1, -ix), iy,  pbuf[PADD( 1, -x1)]);
    49. pTexture->PlotPixel(PADD( 1, +ix), iy,  pbuf[PADD( 1, +x1)]);
    50. pTexture->PlotPixel(PADD( 3, -ix), iy,  pbuf[PADD( 3, -x1)]);
    51. pTexture->PlotPixel(PADD( 3, +ix), iy,  pbuf[PADD( 3, +x1)]);
    52. pTexture->PlotPixel(PADD( 5, -ix), iy,  pbuf[PADD( 5, -x1)]);
    53. pTexture->PlotPixel(PADD( 5, +ix), iy,  pbuf[PADD( 5, +x1)]);
    54. pTexture->PlotPixel(PADD( 7, -ix), iy,  pbuf[PADD( 7, -x1)]);
    55. pTexture->PlotPixel(PADD( 7, +ix), iy,  pbuf[PADD( 7, +x1)]);
    56. pTexture->PlotPixel(PADD( 9, -ix), iy,  pbuf[PADD( 9, -x1)]);
    57. pTexture->PlotPixel(PADD( 9, +ix), iy,  pbuf[PADD( 9, +x1)]);
    58. }
    59. }
    60. // rotate through middle
    61. else if (iy < 2 * h3)
    62. {
    63. // we need to be one pixel wider during the rotates, it looks like
    64. ++lw;
    65. = ((iy + 1) - h3) / h3;
    66. auto x0 = (int) (* w11);
    67. // rotate left by x0 points
    68. memcpy(p1, pbuf, w * sizeof(int));
    69. int i1 = x0;
    70. for (ix = 0; ix < lw; ix++)
    71. {
    72. pbuf[ix] = p1[i1];
    73. if (++i1 >= lw)
    74. {
    75. i1 = 0;
    76. }
    77. }
    78. // plot the buffer
    79. for (ix = 0; ix < lw; ix++)
    80. {
    81. pTexture->PlotPixel(x0 + ix, iy, pbuf[ix]);
    82. }
    83. // don't need to be longer now
    84. --lw;
    85. }
    86. // sample to points at bottom
    87. else
    88. {
    89. = 1.0 - ((iy + 1) - 2 * h3) / h3;
    90. xw = w11 * y;
    91. // rotate left by w11 points
    92. memcpy(p1, pbuf, w * sizeof(int));
    93. auto i1 = (int) w11;
    94. for (ix = 0; ix < lw; ix++)
    95. {
    96. pbuf[ix] = p1[i1];
    97. if (++i1 >= lw)
    98. {
    99. i1 = 0;
    100. }
    101. }
    102. // resample to new shape
    103. for (ix = 0; ix < xw; ix++)
    104. {
    105. auto x2 = (int) (ix * w11 / xw);
    106. pTexture->PlotPixel(PADD( 2, -ix), iy,  pbuf[PADD( 1, -x2)]);
    107. pTexture->PlotPixel(PADD( 2, +ix), iy,  pbuf[PADD( 1, +x2)]);
    108. pTexture->PlotPixel(PADD( 4, -ix), iy,  pbuf[PADD( 3, -x2)]);
    109. pTexture->PlotPixel(PADD( 4, +ix), iy,  pbuf[PADD( 3, +x2)]);
    110. pTexture->PlotPixel(PADD( 6, -ix), iy,  pbuf[PADD( 5, -x2)]);
    111. pTexture->PlotPixel(PADD( 6, +ix), iy,  pbuf[PADD( 5, +x2)]);
    112. pTexture->PlotPixel(PADD( 8, -ix), iy,  pbuf[PADD( 7, -x2)]);
    113. pTexture->PlotPixel(PADD( 8, +ix), iy,  pbuf[PADD( 7, +x2)]);
    114. pTexture->PlotPixel(PADD(10, -ix), iy,  pbuf[PADD( 9, -x2)]);
    115. pTexture->PlotPixel(PADD(10, +ix), iy,  pbuf[PADD( 9, +x2)]);
    116. }
    117. }
    118. }
    119. delete [] pbuf;
    120. delete [] p1;
    121. }


    Loopysueroflo1
  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    On the construction line diagram front:

    Each triangle should be an equilateral one (all sides the same length). That means that each of the right two triangles that make up a face are 30-60-90 triangles, meaning that the side are of length 1, 2 (hypotenuse), and sqrt(3)=1.732050807568877. The screen-space location of each triangle's edges can be read from the chart.


    Don Anderson Jr.Royal ScribeLoopysueroflo1DaltonCalford
  • You are an absolute champion!!!

Sign In or Register to comment.