-
Notifications
You must be signed in to change notification settings - Fork 14
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
More attention to "MC animated textures" #9
Comments
I wanted to make an animated crosshair. Can you guess what happened? Yeah, didn't work... |
Right, the problem is that in MC almost any texture can be animated, but MT doesn't automatically animate anything as the code to detect animated tiles just isn't present in MT. Basically every texture needs to be de-tiled, except for ... the ones we know can be animated. |
Is it so that the animation only work, where the corresponding block is build like this?
|
@ensonic yes, that's correct. |
So ideally minetest would need some mechanism to allow texture packs to enable the animation part dynamically. Can't think of a clean way to achieve this though :/ |
textures with animation can not only be detected because of their aspect ration, but also by the presence of a $texture.png.mcmeta file in json format, e.g. {
"animation": {
"frametime":4,
"frames": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
]
}
} or {
"animation": {
"frames": [
{
"index": 0,
"time": 11
},
{
"index": 1,
"time": 7
},
...
{
"index": 0,
"time": 13
}
]
}
} Unfortunately (as we can see) the format can vary. If we're okay to add a dependency to jq (which is commonly available), we can extract the number of frames like this: # v1
cat items/bucket_water.png.mcmeta | jq '.animation.frames | max_by(.)'
# v2
cat blocks/tallgrass.png.mcmeta | jq '.animation.frames | max_by(.index) | .index' Seems we can select the type by grepping for That remaining main issue seems that we need a list of which textures in minetest support animations right now. Any idea? |
Item textures are not animated in minetest. See minetest-tools#9
Item textures are not animated in minetest. See minetest-tools#9
Item textures are not animated in minetest. See minetest-tools#9
For minetest blocks that are not animated crop to the first frame. See minetest-tools#9
For minetest blocks that are not animated crop to the first frame. See minetest-tools#9
Item textures are not animated in minetest. See #9
For minetest blocks that are not animated crop to the first frame. See #9
Minetest seems to name textures '_animated.png' if they are. If source textures are animated, but the target isn't named accordingly, crop it. See minetest-tools#9
Minetest seems to name textures '_animated.png' if they are. If source textures are animated, but the target isn't named accordingly, crop it. See #9
After texture fix #4016 you will need to improve your mcresconvert a bit for cases like were minetest is not using animation (like animated diamond ore/iron ore in John Smith modded pack), that means 32x1044 px file or so should be truncated to just 32x32. This issue appears only on rare packs, like on this popular one: http://mods.curse.com/texture-packs/minecraft/223328-john-smith-legacy-modded.
Example of animated iron ore texture, when #4016 is applied: https://i.imgur.com/5On8J7i.png
The text was updated successfully, but these errors were encountered: