Closed tobyplowy closed 7 years ago
I don't think the crack animation needs to look different right now, but it definitely needs more frames – it's not smooth enough on slow-to-dig nodes. Minecraft has 10 frames for the crack animation, but we could have even more (Minetest will automatically detect the number of frames based on the texture height).
but it definitely needs more frames
I agree with that!
However remember each frame of the crack animation causes a mesh update, with the amount of digging players do this is critical. If anything there should be fewer frames. Even with 16 it will not be smooth, so smoothness should not be attempted.
However remember each frame of the crack animation causes a mesh update
Is there a way to make this client side instead of server side?
So in the first post your texture is the left column and current is the right column? Could you explain what makes it better? I think the first frame is a waste because 1 pixel is not really noticeable.
Note there are no bright pixels as in the current so it will not be seen on a dark node. Otherwise i quite like it, the lower contrast is less harsh. But will it still be visible on all nodes? needs testing. 4 frames would help with mesh updates so i suggest just removing the first frame.
@paramat yes it's the left one
Why do I think it's better
The cracks connect into each other that makes it feel more natural (just imagine yourself hitting something over and over until it breaks it won't break from the centre and go into straight lines it will crack and go all over the place and the cracks will connect to each other)
Second it feels like you're doing more damage and that makes it more satisfying :)
But will it still be visible on all nodes?
Yes it is visible on all nodes (as far as I know)
4 frames would help with mesh updates so i suggest just removing the first frame.
I'm not sure about that but I guess if it improves performance I'm all for it
That's really it
there are no bright pixels as in the current so it will not be seen on a dark node.
Yes I did that on purpose darker textures are mostly shade based so it doesn't need a lot of the detail so your attention gos to highlights (This is mostly personal taste) do you whant me to add a highlight?
Actually i realised bright pixels are probably not needed because the grey will be seen. So it's probably ok as it is (with preferably 4 frames). I should test it but so far i prefer it to the current one.
@paramat so do I just resze the image that's it nothing more?
All i ask is to remove the first frame, but keep the original too in case other devs insist on all 5 frames.
@paramat i updated the first post
The amount of frames needed should be dictated by the longest dig time. Some things, especially in mods, can take 3 - 5 seconds to dig. I'd think it's weird to go to 5 frames, I know the mesh is updated every frame, but having no frame updates for 1.0 second isn't a way to make the game more performing, it's just not the same scale performance wise as emerging 500 blocks when walking around a bit.
So, for me it can stay at 8+ frames easily. I wouldn't mind seeing 12 or even 16 frames.
Yes it's rate of crack changes that matters with the mesh update issue. The current crack texture has 5 frames. The mesh update issue is significant, an issue was opened for it showing CPU load spikes during digging, obviously if a tool is powerful those 5 frames are occuring in rapid succession constantly during the mining of many nodes and the 5 frames are running too fast to be useful. RBA was very concerned about this too and made a PR to make the crack optional. So if we can make crack frame rate more constant we can then have more frames, but not until then.
I find our current crack ugly, it's too high contrast, i'll try this one in-game.
@paramat I agree
That's why I made this issue :)
:-1: fewer frames is bad, and it does not address the underlying issue of mesh updates.
Changing the crack animation frame does NOT cause a mesh update (at least not in the sense of creating a whole mesh for a mapblock, which is what I believe everyone here is referring to). Only the first frame (starting to dig) and removing the crack (stopping to dig) does, as well as switching to a different node. The relevant function is Client::setCrack().
To change the crack animation frame, only the material of the existing mapblock mesh is updated. This takes pretty much no time at all. See the first part of MapBlockMesh::animate().
If anyone does not believe me and wants to test this in-game, here's how:
crumbly = {times={[2]=60.00, [3]=60.00}, uses=0, maxlevel=1},
Dirt will now take 60 seconds to dig with the hand, which makes it possible to use the in-game profiler to verify that no mesh updates happen when the crack frame changes. (the profiler only updates every 5 seconds)Thanks for the clarification, i'm happy i was wrong. Perhaps RBA meant that starting and finishing the crack animation caused mesh updates, and i misunderstood.
So, we could perhaps go up to 8 frames? Since most nodes are dug very quickly 16 seems too much, it would be excessively rapid.
@paramat yes i also think 8 frames will do the job just fine
It's not visible on coalblock and not very visible on stone, because it is so grey, if it had more contrast it would be good. The pattern of cracks and how they grow is good but there is a reversal of 'crackiness' in one area from frame 4 to 5.
@paramat is this better? it fixes the frames and also the black is darker
@paramat i added some white to this one and id say this gives the best resolts
clay stone obsidian
@paramat is the above texture good or does it need to be Changed More?
I tried it but the cracks seem too wide now, as you can see on the obsidian above, it's a big mess of grey. It's also too grey and the more outward cracks are not visible on stone.
@paramat ok I will see what I can do (NOTE I can't make it look good on light and dark textures at the same time)
@paramat im not sure if this is better
@paramat i finally did it i made a PR https://github.com/minetest/minetest_game/pull/1796
a new crack anylength i made
5 frames