Help with animated texture
Help with animated texture
I'm trying to convert a texture pack, but the problem I have is that some of them are a sequence of images and that doesn't work well in Minetest
corasTenthTry suggested that I use override.txt (documentation here: https://github.com/minetest/minetest/bl ... -overrides), but I can't find anything related to animation.
I found some posts that talk about this here:
viewtopic.php?t=18077
viewtopic.php?t=6767
but they don't seem to be the solution to the problem
I think that the animated textures existing in the game are hardcoded into the engine and there is not a option to put others (i hope somebody proves me wrong)
screenshot:
corasTenthTry suggested that I use override.txt (documentation here: https://github.com/minetest/minetest/bl ... -overrides), but I can't find anything related to animation.
I found some posts that talk about this here:
viewtopic.php?t=18077
viewtopic.php?t=6767
but they don't seem to be the solution to the problem
I think that the animated textures existing in the game are hardcoded into the engine and there is not a option to put others (i hope somebody proves me wrong)
screenshot:
- Attachments
-
- texture_animation_problem.jpg (54.23 KiB) Viewed 1835 times
Re: Help with animated texture
Sorry, i'm a bit frustrated
- Skamiz Kazzarch
- Member
- Posts: 655
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Help with animated texture
No, sorry.
Minetests texture pack support is... rather basic.
The only good news I can offer you is that animations are controlled from mods, not from the engine.
Relevant Lua API: https://github.com/minetest/minetest/bl ... in=1#L9039
For anything fancier then straight texture replacement you will probably need to turn you texturepack into a mod, at which point it can't be used when playing on a server.
Re: Help with animated texture
Ok well, is a relief that now i know that there isn't much that i can do about it. Im not going to do a mod. Thanks
- Krock
- Developer
- Posts: 4683
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Help with animated texture
Which node is affected? And: what is its full texture string? How does your texture look like?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: Help with animated texture
Sorry for the delay in replying, but I was gathering information.
This is all I could find so far
I've been converting a texture pack for the other games for a while now.
These screenshots are from the minetest subgame, the furnace works fine here, but not in mineclonia, nor voxellibre, but I guess this is their problem.
the affected nodes are:
default:stone_with_iron
default:stone_with_gold
default:stone_with_diamond
default:ice
But it also happens with animated items in the inventory or on the ground, in this case they are inverted downwards
in the image below you can see how the textures look, probably due to image compression, in the ice node you can't see the same problem as in the others
Sorry but i don't know what is full texture string (i googled it and did not understand it)
- Attachments
-
- diamond on ground
- diamond.jpg (38.19 KiB) Viewed 1608 times
-
- from left to right diamond, bucket of lava, bucket of water and river water
- items.jpg (16.58 KiB) Viewed 1608 times
-
- from left to right: stone with iron, stone with gold, stone with diamond, ice
- blocks.jpg (130.16 KiB) Viewed 1608 times
Re: Help with animated texture
@Melkor - Those nodes aren't animated by default so when given an animated texture it will appear like in the screenshot. The proper way to animate them is to override the actual node and add a new tiles option e.g.
Code: Select all
minetest.override_item("default:stone_with_iron", {
tiles = {{
name = "default_stone_with_iron_animated.png",
animation = {
type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1
} -- width and height above depend on texture dimensions.
}},
})
Re: Help with animated texture
TenPlus1 wrote: ↑Sun Sep 15, 2024 07:05@Melkor - Those nodes aren't animated by default so when given an animated texture it will appear like in the screenshot. The proper way to animate them is to override the actual node and add a new tiles option e.g.
Code: Select all
minetest.override_item("default:stone_with_iron", { tiles = {{ name = "default_stone_with_iron_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1 } -- width and height above depend on texture dimensions. }}, })
Code: Select all
minetest.override_item("default:stone_with_iron", {
tiles = {{
name = "default_mineral_iron.png",
animation = {
type = "vertical_frames", aspect_w = 32, aspect_h = 1600, length = 1
} -- width and height above depend on texture dimensions.
}},
})
Re: Help with animated texture
@Melkor - Unfortunately it will only work inside of a mod, one with a dependency on the game you are using in mod.conf
Re: Help with animated texture
ok... thank you
Re: Help with animated texture
@Melkor - aspect_h is the height of a frame, so it will be 32 same as aspect_w, here's an example mod:
Create a folder called 'animated_ores' and add a 'textures' folder inside containing your new textures.
Create an 'init.lua' file and add this:
Create a 'mod.conf' file and add this:
Open a new world, enable mod and your iron ore should now be animated :)
Create a folder called 'animated_ores' and add a 'textures' folder inside containing your new textures.
Create an 'init.lua' file and add this:
Code: Select all
minetest.override_item("default:stone_with_iron", {
tiles = {{
name = "default_mineral_iron.png",
animation = {
type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 1
}
}},
})
Code: Select all
name = animated_ores
description = Animates default ore blocks.
depends = default
Re: Help with animated texture
Ok i will do it :)