Great!
Typo “SpineTextureAtals” in SpineTextureAtlasLoader
Great!
Typo “SpineTextureAtals” in SpineTextureAtlasLoader
I have done a test with a mini project I made the past week.
With 1.6.2 it created n instances of an animated object and it worked ok (no skeleton clipping here): the items are scaled by 50% by defaut with no animation. About 0.4 seconds of initialization.
WIth 1.6.3 initialization takes about 6 seconds and behind each (scaled by 50%) animated item there is a static frame of the item at 100% scale.
Something has gone wrong, do you want me to send you my sample project to test? I just need an e-mail address in P.M.
1.6.2
1.6.3
No clipping here, the masking needed in these animations is the classic one.
Yes, exactly, it looks like it takes a snapshot of the default (scale 100%) state and then proceeds by setting scale to 50%.
OK, please give me the sample project. I need to check it.
openflSprite.multipleTextureRender = true;
I don’t think we need it anymore, because its performance will be worse and there is no support mask for it; In the future, it will no longer support multitexturerender and will realize automatic multi texture function. When this property is removed, rendering will work properly.
There is also a small suggestion: spine only loads once, and it does not need to be loaded many times. It can be created many times through buildsspriteskeleton or buildtilemapskeleton.
But I found a mask performance problem. Is there a lot of things under the mask? Is it possible to avoid using masks for images that do not need masks?
By removing it or setting it to false
performance drop into the abyss (like 0.3 fps)
Testing the single load, trying to understand how to do it… DONE!
Is this the correct approach?
var textureAtlas: SpineTextureAtlas;
var jsonData:String = Assets.getText("assets/img/Pic_1.json");
var spineTextureAtlas:SpineTextureAtlasLoader = new SpineTextureAtlasLoader("assets/img/Pic_1.atlas",["assets/img/Pic_1.png"]);
spineTextureAtlas.load ( function(_textureAtlas:SpineTextureAtlas):Void
{
textureAtlas = _textureAtlas;
},
function(error: String): Void
{
trace("FAILED TO LOAD:",error);
}
);
for (i in 0...100)
{
var openflSprite = textureAtlas.buildSpriteSkeleton("Pic_1", jsonData);
this.addChild(openflSprite);
openflSprite.play("win");
}
Masks don’t work for now, right? They shouldn’t create problems, I think. Anyway I will check how the designer created the animation…
Yes, such loading can reduce memory utilization.
The mask can be used normally, but we need to pay attention to the complexity of the mask. I noticed that the mask has 280 vertex coordinates, which may be too complex, causing a lot of performance loss.
For the current animation, only 4 vertex coordinates are needed to solve the mask problem, not 280.
The mask you’re talking about is this one: I have to see if Spine has a function to optimize it, but 4 vertices are not sufficient for sure
OOOK! I have noticed now that by disabling openflSprite.multipleTextureRender masking works… but performance are terrible probably because of the number of vertices as you said…
…and looks like textures are missing smoothing.
It is difficult to show it with a static image, but trust me
This may be because the FPS is reduced. It changes the animation according to how much time has passed, so it does not look smooth. When the FPS is stable at 60fps, this phenomenon will not appear. If you don’t like the DT refresh animation, you can use this to disable:
SpineManager.isLockFrameFps = true; // default is false.
But at very low FPS, it doesn’t work, and animation will only get slower and slower.
Trying to optimize the number of vertices should solve this problem.
It is not a fps problem, the animation is smooth. Maybe disabling smoothing is an automatic conservative behavior of Openfl to preserve performance?
There is also a problem with the reflex moving across the skull: it looks like the alpha is set to 100%, even if in the original timeline it decreases to about 50%.
then there is some problem with the mask clipping on the cheekbone: where there is the hole you can see the reflex moving to the right, maybe because the hole in the mask f**ks things up.
Let’s see if I can in some way reduce the vertices to see if this fixes some of the problems… I have to ask the designer…
EDIT: I think tomorrow morning I will try reducing vertices myself, because if I am not wrong a single Spine license can be installed on 2 PCs.
EDIT 2: The vertex-count has been reduced to 31, and performance changed drastically! Smoothing and alpha tweening still missing, but it is a very good result for now!
Hi, about smoothing and alpha interpolation, can you send me a new spine file again; I can’t log in to discord recently, so you can choose to find me here or by mail.
You’ve got mail!
Masking is a performance consuming operation. If you need to use it heavily, it is still recommended to reduce the number of masking points. If you don’t, the CPU will soon run out.
Can you give me a correct animation video and a wrong one? It looks like it’s working normally on my side.