julieta.perezmurillo

  • 24 июн 2024
  • Регистрация: 1 мар 2020
  • Sorry for the late response, I did further digging and after some hours I found that I was indeed resetting the root bone rotation in my code under some very specific conditions. I compared both files and they are generated the same. Sorry for wasting your time, and thank you. I will be triple check everytime from now on.

    • Nate оценил это.
  • Hello, I just did the entire exporting the .json into the 4.0 version and then creating a new export with it. It indeed fixed the problem of the initial setup rotation on the root bone. I think that pretty much confirms that there is a bug in the way 4.2 is exporting to 4.0 and not a runtime bug. The reason I'm sticking to 4.0 is because it is quite time consuming to update runtimes in Monogame. We'll do it eventually, but for now we just want to get our project done.

    After exporting with 4.0, rotation in setup is preserved.

    Thank you very much.

  • Alright I checked all of these and they don't seem to be the case, it does appear correctly in the Skeleton Viewer, so it is definitely a runtime problem, but it wasn't happening two days ago, so it is something introduced in how the file is being exported to 4.0

    My question now is, how does one export to the "Correct version". If I go to Export and choose "4.0" the .json still has the "spine": "4.0-from-4.1-from-4.2.32" in it. I can't open this file with older versions of Spine because I already saved it with the newer ones.

  • Hello, I am using Monogame runtime 4.0 and I am exporting my animations to 4.0 with the newest Spine build. This problem started just today, I have my animations with an initial rotation for the root bone in the setup, but during runtime they stay in the same position as if they had 0 rotation. Translate and scale appear to be unaffected. I already double checked, and no, it is not the animation I am loading, they don't have any rotation keyframes that would reset the animation rotation from the setup.

    I also checked my code and I am not rotating the skeleton. Resetting the skeleton shouldn't be the case neither, because it is rotated in the setup.

    On Spine:

    During runtime:

    I assume this is a bug introduced to the newest version of Spine? This was not a problem yesterday.

    Thank you, any help is appreciated.

  • Hello! I have been struggling with how to make 'Multiply' slots work because I don't think I quite understand how it is supposed to be done.

    The pink area of the image above is a background that I want to use in as "Multiply" blending mode. When I change the blending mode it shows up perfectly in the editor, but when I switch to the runtime, it shows up as the picture above with no blending being applied. I went ahead and made a pre-multiply shader and passed that to the SkeletonRenderer, but with no luck, it still shows up as a solid color.

    There is no example in the Monogame runtime example about how this shader could look like and the Unity version isn't helping much on how to do it as a HLSL shader. I understand that I should be giving the shader the ["Projection"] matrix parameter with the width and height of the viewport, but other than that it is a very simple alpha blending shader.

    I suppose that the problem is that my shader is wrong, but I was wondering if maybe I' just missing something very obvious.

    I am exporting the project with "Premultiply alpha" enabled and with JSON version 4.0 because I haven't ported my main project to Core from Framework, so I am stuck using an old runtime for now. I highly doubt this could be causing an issue.

    Thank you.

  • Thank you very much!

  • I have a question about how Spine runtimes handle skins that are not visible. My characters have different outfits and they don't usually match the arms/legs/body of the other outfits, so they don't share meshes.

    My question is, does the runtime calculate the transformation of the meshes even when the skin is currently disabled? They share the bones, but not the meshes, so I was thinking that maybe I could have a bit of a performance problems in my hands as I keep adding costumes to the characters.

    Thank you.

  • Thank you, I will try doing this!

    • Изменено
  • I want to animate some characters that have different type of mouths. I don't want to just animate the same mouth as these are just way too different and they have their unique sprites. What would be the smartest way to do this?

  • Harald написал

    Do you mean you wrote your own .atlas asset parser? If so, then it most likely does not display anything since the atlas format has changed. In general you might save a lot of work by using the officially provided atlas and skeleton loader classes.

    The reason I am adamant to use a pipeline is because I would like to keep the animations from being opened so easily by players. When loading simply as you ask for, the .atlas/.json/.png are put into the Content folder as they were generated by Spine, it looks a bit unprofessional. I already changed it to parse the new format of the .atlas, and the new runtime parse the .json correctly, I get no errors when compiling my game, the animations just don't show up.

    I did some test as you mention and it does indeed work without my pipeline processor.

    Harald написал

    Do you mean that there are no example assets for Spine 4.0 available in the spine-monogame subdirectory in git? In general the examples structure has not changed from 3.8 to 4.0, the example assets are still contained in the spine-xna subdirectory on git:
    https://github.com/EsotericSoftware/spine-runtimes/tree/4.0/spine-xna/example/data

    I will check these examples again, I was just wondering if something changed or maybe I was doing something wrong with the new version. Thanks for confirming that.


    I fixed this problem. I took a better look at the .atlas as you mentioned and found the problem that I was encountering. I did parse the .atlas correctly, but did not take into account that the 'region.originalWidth' and 'region.originalHeight' should be the width and height found in "bounds" even if there is no "offsets" found in the region. They were set to 0, 0 always.

    Sorry again. If anyone is interested on getting the pipeline for Monogame working, let me know. I am planning on releasing the parser I made, but because of this kind of issues I think it still requires some work. So maybe when it is more stable.

  • I made a custom pipeline made for Monogame since all my animations broke because of it, it works perfectly and it parses the .atlas as intended, however when the game runs no animation appears.

    There are no examples for Monogame for 4.0 so I am not sure if I am missing something. Both runtimes were updated, spine-xna and spine-csharp up to 4.0

    On LoadContent, loading everything:

    logoAnimation = content.Load<SpineAsset>("Logo");
    logoAnimation.SetAnimation(0, logoAnimation.SkeletonData.Animations.Items[0].Name, true);
    logoAnimation.SetBasePosition(new Vector2(70, 100));
    logoAnimation.SetActualPosition(new Vector2(70, 100));
    logoAnimation.Skeleton.X += 70;
    logoAnimation.Skeleton.Y += 100;
    logoAnimation.Skeleton.UpdateWorldTransform();

    On Update, I set the current scale and update the position if needed:

    logoAnimation.SetScale(screenScale);
    logoAnimation.UpdatePosition(screenScale);
    logoAnimation.UpdateRoutine(gameTime);
    public void UpdateRoutine(GameTime gameTime)
    {
        AnimationState.Update(gameTime.ElapsedGameTime.Milliseconds / 1000f);
        AnimationState.Apply(Skeleton);
        Skeleton.UpdateWorldTransform();
    }
    

    OnDraw, I render the skeleton:

    skeletonRenderer.Begin();
    skeletonRenderer.Draw(logoAnimation.Skeleton);
    skeletonRenderer.End();
    

    skeletonRenderer is properly initialized. Did anything change when rendering the animations?

  • Hello. I have been trying to solve this issue for a while. I am trying to use the pipeline to get my Spine animations into my game but without success. There are no updated pipeline helpers so I settled on the most updated one I found.

    https://github.com/fitgames/fitgames.monogame.spine

    I ran into compatibility issues with the Spine version inside this library so I decided to update it to the newest Spine runtime (3.8/spine-csharp). After three days I finally managed to get things going, but the moment the animation is loaded some of the sprites appear cut incorrectly and rotated. I noticed the images are still with their original rotation as how they appear in the .png file that Spine creates when you export.

    I have debugged the whole thing, even the Spine runtime, and I can't seem to find what the is the problem. I am updating the animation correctly in the Update routines, so I am thinking this is a problem with the way the pipeline is processing the file.

    Any ideas? Thank you.


    Edit: I managed to fix it, by unchecking "Rotation" when the Spine files are generated, but I am still puzzled, why does this happen? When loading the files directly as files (.atlas and .json) this does not happen.

    Is there any other way to pack your Spine files into Monogame runtime without having the plain files on the Content folder?

    Thank you.

    • Изменено
  • The Premultiply Alpha was false, we set it to true but the problem still persists :c

    • Изменено
  • Hello. I exported an animation to work with the Monogame runtime, the problem is that when the animation is rendered, a shadow appears on the outline of the top drawn image. This image has no outer glow or shadow in the image editor.

    Hope someone can help me figure it out. Thanks.