• Off-topic
  • [Suggestion] SDF Animations

We have some drawing effects like: https://assetstore.unity.com/packages/2d/textures-materials/118-sprite-effects-bundle-161886

They are very heavy. Every frame is hand drawn, importing them to project increase the size of a project dramatically.

I know about SDF technology. It uses commonly in rendering fonts to render big symbols with small textures. But what if we could use it in animations like water splashes where not much colors are used? Some converter that convert image sequence to SDF textures with colors, you can select after from code or interface.

Another option we could implement in this type of animations is morphing effect between two keyframes. This can be easily implemented within the framework of SDF technology (Effect section):
https://nickeltin.notion.site/PureSDFImage-b109ae84683740578c4b546d491bae0e
This will allow animations to play more smoothly.

What do you think about this type of animation? Just thinking out loud. Not sure if this will be helpful.

Related Discussions
...

The idea of using SDF (Signed Distance Field) technology for animations, especially for effects like water splashes, is intriguing. SDF is indeed commonly used for rendering fonts and can provide high-quality visuals with smaller texture sizes. Applying this to animations could potentially reduce the project size significantly while maintaining visual quality.

However, implementing SDF for animations would require a converter to transform image sequences into SDF textures. This would involve some complexity, especially in ensuring that the colors and details are preserved accurately. Additionally, morphing effects between keyframes using SDF could indeed make animations smoother, leveraging the inherent properties of SDF to interpolate between shapes.

While this is a promising idea, it would require significant development effort to integrate such a feature into Spine. It would also need to be balanced against other priorities and resources. Nonetheless, it's a concept worth exploring further, especially for projects where reducing texture size and maintaining high-quality animations are critical.

I'm familiar with SDF for fonts. I had not seen the morphing before (example), that's neat!

Using SDF for Spine attachments is an interesting idea. It has smaller file sizes and could allow more scaling without loss of quality, though with a loss of detail. There's some trickiness to getting it setup in the editor with the right images. At runtime it's mainly just a matter of using the right shader with SDF images. That could be done even without editor support. Possibly you could use regular images in the editor and SDF images at runtime.

We'll keep this feature in mind, thanks! The first steps would be to create a proof of concept, probably by taking a regular skeleton, changing some images to SDF, and rendering it with an SDF shader. Once that works well we would consider how to integrate it into the editor.

  • m_fedorov 님이 이 게시물을 좋아합니다..