• Editor
  • Cull back of images in spine?

  • Изменено

Is there a way to cull or somehow identify the backs of images in Spine?

My game culls the back, and we're finding that some body parts are accidentally flipped in game, since spine does not easily identify this in the editor.

Edit: Looking into the spine editor I can see it's not possible to do this by mistake. So why are some body parts in my game flipped? I.e. you can only see them from the back of the character, not the front.

Related Discussions
...
  • Изменено

In Spine, enabling backface culling can be useful to hide portions of a mesh that are not facing the screen. The same effect can be enabled in some game toolkits. However, if there is no need for it, enabling backface culling is generally not recommended because it can lead to issues with attachments that are flipped using negative scaling. This changes the winding order of the vertices, causing what should be front-facing attachments to be culled as backfaces.

If you need to implement backface culling, you might need to handle it manually in your game engine. For example, in Godot, you could perform culling on the CPU by iterating through all triangles, calculating their winding order, and replacing culled triangles with degenerate triangles. This approach can be complex, especially when dealing with negative scales.

For Unity, you can disable backface culling in your shader by commenting out the Cull Off line. This ensures that backfaces are not culled, which might help in visualizing and debugging the issue in the Spine Editor.

Here are some relevant links and resources:

If you need more specific advice for your game engine, please provide additional details about the runtime you are using.