• International中文
  • 如何给已有的工程替换素材而不使素材变形?

我在一个原有的工程里做好了网格和动画,但是现在我需要把这个工程里的素材替换为大小相同但颜色不同的另一个素材,但是每次我替换素材之后都会有些许拉伸导致效果不好,请问我要怎么才能保证替换素材和原素材的大小效果没有变化呢?

    Related Discussions
    ...

    diamondmonster Do you mean that the images are deformed even though they are exactly the same size before the replacement? Unfortunately, I have no idea what causes this. Could you please email us your spine project files so that we can reproduce the problem?: contact@esotericsoftware.com
    Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

    diamondmonster Thank you for sending your Spine project files! Many of the images you want to replace have changed image size, and this is what causes the images to be stretched after replacement. If you want to reuse the same mesh for a different look, you should make sure that the sizes of the images before and after the replacement are the same.

    If you know from the start that you will need to replace the skeleton's images, you should use layer masks to define the cropping boundaries. (Unfortunately, trimming based on a layer mask is currently only possible in Photoshop.)
    Using layer masks allows you to define the trimming boundaries freely, so it is a good idea to define a mask bounds with a little spacious for parts that you know you may create differences later.

    You may be worried that using images with a lot of whitespace will cause the texture size to increase, but if you enable Strip whitespace X/Y in the Texture Packer settings, you can strip the excess whitespace, so images with large margins should not be a problem.

    These are not direct solutions to the issue you are facing, and you will ultimately need to either redo the mesh settings or re-export the images again, but I hope this answer is helpful.