-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small suggestions #2
Comments
Thank you for the details. |
Thinking about this more I am not sure I understand the overlap fully either. start = 0
for i in range(10):
tiles[i] = input[start:start+53]
start += 51 # not 53, because the next tile will include the last 2 pixels of this tile I think this is what you were describing but I want to be sure in order to draw the grid in the most accurate way. |
Maybe it helps if I explain what purpose the overlay has. It has something to do with the transformation. Here is a texture split up in tiles (not HD, but old AoC version): Trying to puzzle the tiles together without overlaying doesn't work here because you will end up with some holes in the texture. To fit them together the borders have to overlay a bit. At these overlay points the tiles share the same pixels (= same RGB color). One individual tile has size Getting the |
Original AoC had
|
True. I guess they don't do this because then the last tile would not be a single block that you can cut out. You would have to stitch it together which might be more complicated. Btw, the very first and last tile of some textures don't blend into each other well. The above texture is an example of this. If you play around with this texture in the editor, you can notice a barely noticeable seam between each chunk of 10x10 tiles.
That's weird. I never noticed this before. And I've looked at a lot of edges. It could be an issue with the openage converter, since these are not the original AoC files, but an extraction from the SLP files. Or it could be some mechanic I have not discovered yet. |
Age-of-Empires-II-Grid-Generator/grid_generator.py
Line 21 in 38a2c32
I suggest casting to
int
in line 18. Currently, spacing is51.2
which creastes a tiny offset of 1 pixel wheni > 5
.The HD edition tiles have a size of
53x53
pixels. They overlap by 2 tiles, which creates the512x512
resolution for the whole terrain file (512 = (10 * 53) - (9 * 2)
). The reason for this is the isometric algorithm they use which requires these overlaps. Ideally, the grid is located where the tiles overlap, so it's ideal ifspacing == 51
.Age-of-Empires-II-Grid-Generator/grid_generator.py
Line 102 in 38a2c32
This is a problem for older version than HD. Legacy AoC has a terrain of size
481x481
(or490x490
for some modding tools). Upscaling can cause issues with older modding tools. I suggest you either just leave the resulting image at the original size or add a new argument--upscale
.Age-of-Empires-II-Grid-Generator/grid_generator.py
Line 112 in 38a2c32
For an ingame isometric view, you can use the transform algorithm of the openage repo.
SFTtech/openage-modding#8
It's the
inverse_transform()
that you want to do. We call it "dimetric transform", but that's just the scientific term for the isometric transformation used in games. The transformation might also help you if you want to create terrain files for legacy versions of AoC (e.g. the one used for Voobly).The text was updated successfully, but these errors were encountered: