• Off-topic
  • Native 2D tools coming to Unity 3D

This isn't exactly a super off-topic topic.

http://blogs.unity3d.com/2013/08/28/uni ... -2d-tools/
They're building some really nice 2D game features into Unity 4.3 coming later this year, kicking off the kinda-first real official support for 2D game development in Unity.

There are some new features that might interact with Spine, like the new sprite texture import feature that makes an atlas automatically (might end up being the more convenient solution vs the libGDX atlas in Unity in the long run), integrated Box2D (might be the go-to thing for bounding boxes in terms of physics, though I guess it would be up to the user to judge whether to use Box2D or the 3D colliders), good stuff like that. Not sure where the other features fit in though.

There doesn't seem to be any mention of skeletal animation. I doubt there'd ever be something as comprehensive as Spine built into it though. They usually leave asset production like that to third-party tools. Plus skinning is already supported out of the box.

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

Auto slicing an atlas is fine for a quick demo, but if you want to get the most out of your atlas you are not going to do the packing yourself. Apparently they do texture packing as a final step, under the covers (see 1:29:50). That could be used instead of an atlas from Spine.

Their stuff is using a GameObject per image, while Spine's current runtimes are more efficient using a single GameObject per skeleton. There are pros (faster) and cons (not as easy to attach GameObjects to a bone within the skeleton draw order) of course. I think Spine's current runtimes will fit into their new 2D stuff just fine. I'm not sure what the Spine runtimes can leverage from their new stuff, but we'll definitely be taking a closer look as it becomes available.

Reading up on it after that one guy described Unity's character rig support to me a few months ago, I don't think they necessarily do one complete GameObject per bone. I think the UI just exposes the bones to look like that in the GameObject hierarchy so it's clearer to see what can be manipulated (in code and their native animation system?) and so it's easier to attach things.

At the very least, I think it's one Transform object per bone which is what you'd need for a skeletal system anyway. Unity's skinning does break batching though. That part sucks. :c

I kinda doubt they only make it look like one GameObject per image, I bet it really is. This is not the end of the world of course, I'm sure they do all they can to make having many GameObjects efficient.

9 дней спустя

So, an update on what the system looks like in this video from Unite 2013 demonstrating the workflow: http://www.youtube.com/watch?v=B1F6fi04qw8

Seems to me like using the new Sprite Renderer system might become more sensible vs Spine's current setup that uses a mesh and a mesh renderer. But it's not clear from the video how well it supports Spine's system of setting the vertices and UVs yourself so that nonuniform scaling (and eventually also warping) will work.

It's actually a bit confusing 'cause it shows an auto-generated mesh in that mushroom example, but the other tool only showed rectangles. I guess there's a difference between background elements and small stuff? Or there's a consistency issue if regions change shape? Weird.

There's Box2D built in. It has polygon colliders. That probably has something to do with bounding boxes. XD

Another thing to note is their encouragement of using world units as meters. This is different from the 1 unit : 1 pixel standard that Spine uses for Spine-Unity by default. I personally prefer to use 1 pixel:1 unit, which works out okay 'cause I don't really rely on Unity's built-in physics to move things or do gravity for game-logic-relevant things. But it might be a thing for some users.

There is a segment in the video showing how the new Animation Window interacts with their new 2D system and sprite asset + sprite renderer. This is where it's doing some of the things that 3rd party sprite animation systems were necessary for.
There's a lot of very nice conveniences in the UI I'd love to see mirrored in Spine Editor. :p The advantage of their tools is obviously that it keeps with the typical image-is-a-bone paradigm so, usability-wise, it has very low cognitive overhead, and very little relearning for people used to ahem AfterEffects and other similar programs. Very familiar handle system too.

Flexibility-wise, I dunno where it stands. But if you're using Unity, this does immediately make Unity's built-in tools the better option if you're just making small, simple things, even if you need curves (or especially if you need complicated curves but not much else). That said, I'm on the fence with trusting it with character animations. (the image chooser makes me jealous though. XD)

But the new packer does also immediately seem like the better option for frame-by-frame effects that are comprised of frames that waste too much space as rectangles (which we happen to have a lot of). eg, images are are round and irregular and have big gaping holes in their center.

I'm not sure where libGDX atlas format currently is on that front. I didn't look into it too much but there's some mention of "polygon region" in their docs (but it was marked as work-in-progress).

No FFD on their end though, so... there you go.

What UI conveniences?

The libgx atlas format trims whitespace from the AABB only. Spine will need meshes for FFD, which means you can avoid wasting fillrate on transparent pixels by using a mesh. You can have a concave mesh but not one with holes.

Image-is-a-bone is very limiting. Without Spine's slot system, you'll be pretty screwed making proper characters. 🙂

2 месяца спустя

Heads up. 4.3 is out! Downloading it now. XD

UI Conveniences like the image being visible on the dopesheet? (I actually can't remember. Let's poke around and I'm sure we'll all find something. lol)

http://blogs.unity3d.com/2013/11/12/uni ... -overview/

Update:
Looks like the new Sprite Renderer component is hardly a good candidate for Spine to hook into. It doesn't expose anything at all:
http://docs.unity3d.com/Documentation/C ... derer.html
http://docs.unity3d.com/Documentation/S ... derer.html

There were some changes with Editor scripts though. I think some things were marked [Obsolete]. It logs a whole mess of things in the console and it's kind of annoying. Nothing that breaks functionality though.