-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Convert: Flat terrain textures #985
Comments
Since terrain textures in HD are 512x512 pixels, I suggest to generate flat terrain textures with the same resolution in the conversion step. |
@mikadou We might not need to anymore, since we agreed on doing 3D terrain. The texture will be independent from the tiling and thus can just be painted on the terrain without the need to scale it. |
@heinezen Thanks for confirming the consensus on 3d terrain. I fully agree with going in this direction. |
For the usual on-GPU memory allocation algorithms I think it still is (because the malloc algorithms likely use |
Just to save this link: How to generate 3D terrain from e.g. Google Maps |
Anyone is working on it ? I can try to do it. |
@charliergi No, nobody working on it currently. You can do it if you want :) It would be great if you could translate the code to cython (for extra speed) and integrate the script directly into the converter ( openage/openage/convert/smx.pyx Line 1093 in eb8b8e9
To output the image, you can use the openage/openage/convert/texture.py Line 79 in eb8b8e9
If you want, you can also add the option for terrain merging to the singlefile converter: https://github.com/SFTtech/openage/blob/master/openage/convert/singlefile.py |
Thanks for the description. I'm not familiar with Cython but i'll do my best to convert it.
|
The best way to test would be adding a terrain option to the singlefile converter. This would then directly output the resulting image if you implemented it. You can use the normal terrain SLP files of AoC for testing. The conversion from SLP to numpy.ndarray is already implemented in |
Hello !
|
|
Hello!
I know that save a Am I in the good way ? Feel free to correct me :) |
I suggest you create a PR or Draft for your code, so we can discuss it better. Talking about what you did without seeing it is otherwise a bit of guesswork :D
You should not (and cannot) use the function on the final image. |
As mentioned in #720, we want to convert the old SLP terrain files to a flat terrain texture. I've implemented a working prototype for that utilizing the dimetric projection algorithm from the openage modding repository. The resulting python script can be found here. It operates on the output of our current converter.
merge()
puts the single tiles together into one giant tile.transform()
projects the result from dimetric to the desired flat perspective. Here you see the output when converting15006.slp.png
.Textures from SLPs will always have a ratio of 1:1 and a size of
481x481
(compared to512x512
in HD).If somebody want to implement a more efficient version of the script and integrate it into the converter, go ahead.
The text was updated successfully, but these errors were encountered: