DICE PACKS BUNDLE
  1. #1

    Unexpected Art Asset Hex Tile Behaviour

    Hopefully this is the right subforum for this - I suspect the issue might be an internal FG quirk, or if any fix is possible, it would be via xml file editing.

    In short, I am trying to create an art asset pack that provides various terrain hex tiles (created in another program and exported as transparent png files) for use with Unity's map creation tools. This works brilliantly if I size them to what appears to be the default FG hex tile size, but introduces odd gaps if I deviate from this exact form.

    The much longer explanation is as follows:

    Please note that unless otherwise specified, all example tiled images provided are with grid snap on and all placement clicks in the approximate-center of the FG-gridded hexes.

    FG "Default" Hex Tile and Expected Working Behaviour

    When setting a new image intended for map creation with a grid type of "hexrow" (pointy-side-up), FG defaults to a grid size of (100, 100), with the individual hex tiles having an actual size of approximately 100 x 116 px each.

    If I create a partially-transparent tile of 100 x 116 px and assume the same defaults in its accompanying xml file:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>hexrow</gridtype>
    <gridsize>100,100</gridsize>
    </root>
    ...then it functions beautifully and behaves exactly as I would expect: Default_FG_Hexrow_Tiled_Example.png

    Hex Tile Size Deviation Troubles

    However, the hex tiles I am trying to convert deviate from this standard in two ways:
    1. The overall hex portion of the tile is 100 x 100 px.
    2. The overall hex tile is 100 x 150 px, with the extra 50 px being above the hex portion to account for overlapping mountain/trees/etc art.

    On the previous image example, this "squished" hex equates to the yellow area, with the blue border being the difference between that and the FG "default". To tile properly, it works out to an approximate grid size of (100, 93.1).

    Although the art asset pack section in the developer's guide doesn't mention this, it appears some of the imagecontrol tags listed elsewhere in the same developer's guide may have an effect. From testing, <gridtype> and <gridoffset> do, but not <snaphex>.

    As such, if I pair a test 100 x 150 px tile with an xml file of:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>hexrow</gridtype>
    <gridsize>100,93.1</gridsize>
    <gridoffset>0,50</gridoffset>
    </root>
    ...and try to tile that in FG, then I end up with: Intended_Hex_Tile_Size_Offset_and_Tiled_Example.png

    While the offset is obviously not quite right, of greater concern are the consistent vertical gaps.

    If I decide to forego <gridoffset> entirely and try to instead pseudo-center each tile by adding an additional 50 px below (for a total image size of 100 x 200 px), and pair that with the following xml:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>hexrow</gridtype>
    <gridsize>100,93.1</gridsize>
    </root>
    ...it still ends up displaying the same odd vertical gaps/padding: PseudoCentered_Hex_Tiled_Example.png

    If I play around with the tile size within FG, I can reduce the visual gaps by stretching the image, but the odd gap padding/skew is still an issue. Even if this did work, it doesn't seem to be possible to set via xml anyway.

    If I forego an accompanying xml file entirely (as was recommended to me to try via FGA), and manually set the grid size in FG, this vertical gap/padding is still present. What is causing it? Is there a way to remove it?

    The Clunky Workaround

    However, I have noticed that if take the same 100 x 150 px image tile, and set the xml to:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>square</gridtype>
    <gridsize>100,150</gridsize>
    </root>
    ...then I can tile with the occasional stagger to fake a hex map during the layout: Square_Layout.png
    ...after which, I can manually set the map such: Final_Workaround.png

    However, is there a way to avoid doing this? While this is fine for my own use purposes, it would not be ideal for community shared assets where it would be much preferable to also layout in hex mode.

  2. #2
    Since I ran out of attachment space in the previous post, please find attached in this post my test pack/module used to demonstrate the issues above.
    Attached Files Attached Files

  3. #3
    Our image developer that I would run this by is currently on leave, so I'll have to wait for a while to ask him.

    However, I already know that part of the answer is that the grid size information is designed to fill the grids, not to allow "overlapping" art assets. (which would be a separate type of feature we don't support).

    Regards,
    JPG

  4. #4
    Thank you for the reply! I would be curious to know the answer once he returns from leave.

    Certainly part of the issue is that I am trying to be too clever for my own good, in a way that FG does not officially support. However, I can also duplicate these vertical gaps with a non-overlapping 100 x 100 px hex tile, which is what lead me to believe this is not necessarily intended behavior.

    If I make a tile with just the squished hex portion, and use the following xml:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>hexrow</gridtype>
    <gridsize>100,93.1</gridsize>
    </root>
    ...then the consistent vertical gaps that contribute to the y-axis drift still appear: 100x100_Hex_Tiled.png

    And if I instead pair it with the default (100, 100) grid-sizing:
    Code:
    <?xml version="1.0"?>
    <root>
    <gridtype>hexrow</gridtype>
    <gridsize>100,100</gridsize>
    </root>
    ...then it still doesn't fill the hex: 100x100_Hex_Tiled_2.png

    Although, now that I'm looking at that last one, I wonder if this is hinting to the issue? Are the hex grid layouts setting the visual grid to whatever is specified in the xml, but partially disregarding that with regards to the actual tiling?

    Perhaps its even simpler than that and I have grievously misunderstood the intent of <gridsize>?

    Regardless, I've added the above two example tiles to the test.mod attached. All examples were made with each tile the first selected (as there may be different behaviour depending on if another grid size was previously set by another tile in the same image).
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in