SPRITETOMESH:基于学习分割和轮廓感知顶点放置的2D骨骼动画自动网格生成
SPRITETOMESH: Automatic Mesh Generation for 2D Skeletal Animation Using Learned Segmentation and Contour-Aware Vertex Placement
AI总结:
SPRITETOMESH通过学习分割和轮廓感知顶点放置方法,实现2D骨骼动画自动网格生成,提升效率300至1200倍。
摘要:
我们提出了SPRITETOMESH,一种完全自动的流程,用于将2D游戏精灵图像转换为与Spine2D等骨骼动画框架兼容的三角网格。创建可动画的网格通常是繁琐的手动过程,需要艺术家仔细地在视觉边界上放置顶点,这项任务通常每个精灵需要15-60分钟。我们的方法通过混合学习算法方法来解决这个问题。一个分割网络(EfficientNet-B0编码器与U-Net解码器)在172款游戏中超过10万对精灵-掩码数据上进行训练,达到了0.87的IoU,能够从任意输入图像中提供准确的二进制掩码。从这些掩码中,我们使用Douglas-Peucker简化方法结合自适应弧分割提取外轮廓顶点,并利用双侧过滤多通道Canny边缘检测沿视觉边界检测内部顶点,通过轮廓跟随放置。Delaunay三角剖分结合基于掩码的质心过滤产生最终的网格。通过受控实验,我们证明直接通过神经网络热图回归预测顶点位置在该任务中本质上不可行:热图解码器始终无法收敛(损失在0.061处停滞),而分割解码器在相同条件下正常训练。我们将其归因于顶点放置本质上具有艺术性——同一个精灵可以以多种不同的方式生成有效的网格。这一负面结果验证了我们的混合设计:在地面真实清晰的情况下使用学习分割,在领域启发式适用的情况下使用算法放置。完整的流程处理一个精灵不到3秒,代表了比手动创建的速度提升300至1200倍。我们向游戏开发社区发布我们的训练模型。
英文摘要:
We present SPRITETOMESH, a fully automatic pipeline for converting 2D game sprite images into triangle meshes compatible with skeletal animation frameworks such as Spine2D. Creating animation-ready meshes is traditionally a tedious manual process requiring artists to carefully place vertices along visual boundaries, a task that typically takes 15-60 minutes per sprite. Our method addresses this through a hybrid learned-algorithmic approach. A segmentation network (EfficientNet-B0 encoder with U-Net decoder) trained on over 100,000 sprite-mask pairs from 172 games achieves an IoU of 0.87, providing accurate binary masks from arbitrary input images. From these masks, we extract exterior contour vertices using Douglas-Peucker simplification with adaptive arc subdivision, and interior vertices along visual boundaries detected via bilateral-filtered multi-channel Canny edge detection with contour-following placement. Delaunay triangulation with mask-based centroid filtering produces the final mesh. Through controlled experiments, we demonstrate that direct vertex position prediction via neural network heatmap regression is fundamentally not viable for this task: the heatmap decoder consistently fails to converge (loss plateau at 0.061) while the segmentation decoder trains normally under identical conditions. We attribute this to the inherently artistic nature of vertex placement - the same sprite can be meshed validly in many different ways. This negative result validates our hybrid design: learned segmentation where ground truth is unambiguous, algorithmic placement where domain heuristics are appropriate. The complete pipeline processes a sprite in under 3 seconds, representing a speedup of 300x-1200x over manual creation. We release our trained model to the game development community.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。