YaW

I'm finishing my animation with Spine and want to show it to some friends, I'm trying to export the animation to video (I don't care AVI or QuickTime) but when I press the Export video the "Exporting..." popup appears and then the app force closes without any error.

I've tried diferent configurations (fps, quality, diferent paths, etc) but the error persists. I've exported to video when the animation was smaller and everything worked fine, so maybe is a memory problem?

Here's the "hs_err" file generated: http://pastebin.com/t7zuUaBi
Avatar
YaW
  • Postovi: 10

Nate

Thanks for the crash report. It crashes because the size of your animation is too large. Spine computes the smallest rectangle that will contain all images over the entire animation. This is the size of the exported video.

To reproduce the issue I tried to export a 20k x 18k frame, which is about 1.4gb. For whatever reason the OS doesn't allow this allocation, even though I have 12gb free. The crash happens because of a bug in libgdx, which I just fixed. Now Spine can check for the failure and alert you that the size is too large. Unfortunately there's nothing I can do if the OS doesn't allow the memory to be allocated.

However, because OpenGL is used to render each exported frame, exports are limited by your GPU's max texture size, even if the OS allows the allocation mentioned above. I will add checks for that as well. This can be worked around by rendering only a portion of the animation via OpenGL and reassembling each frame. I don't know this is worth the trouble though, as a modern GPU can probably handle a 4096x4096 texture, with is 16M pixels. HD resolution of 1920x1080 is only 2M pixels, so it is unlikely for the GPU to be the limiting factor for videos of a reasonable size.

https://trello.com/card/alert-user-when ... c0059d9/61
Avatar
Nate

Nate
  • Postovi: 11875

YaW

Hi Nate,

Thanks for the reply.

The problem is that I want my animation in 854x480 but due to movements from diferents frames, scales and such the full animation in Spine is way larger than that. Here's a screenshot of the initial Setup:



The tiny square in the center it's the animation at the real size (854x480):



I guess Spine tries to export all the animation in its full size and that's why it crashes. A solution that will work for us is to be able to tell the exporter the size of the animation that it should pick, so we can tell 854x480 and only pick the center of the animation in that size.

I know Spine is more focused to characters animation, but we think it works great for introductions or comic-style animations and I guess this will be a common problem if somebody else uses for that purpose.
Avatar
YaW
  • Postovi: 10

Søren

Makes total sense Yaw. Even the ui example I made does this, even if it isn't meant to be exported for video. I guess some sort of safe frames bounding box would be needed.
Avatar
Søren

Shiu
  • Postovi: 2448

Nate

Yeah, we would need a box that is used for export. Blah, more work! :p
https://trello.com/card/bounding-box-fo ... c0059d9/62

Cool graphics though! :)
Avatar
Nate

Nate
  • Postovi: 11875

YaW

Perfect :)
Avatar
YaW
  • Postovi: 10


Natrag na Editor