Hello Guest

Author Topic: Fatal error! System out of memory  (Read 5120 times)

Untoldent

  • Newbie
  • *
  • Posts: 4
    • View Profile
Fatal error! System out of memory
« on: June 12, 2013, 05:47:23 am »
i'm trying to build a SpriteCollection from 54 pngs that are each about 640x960px.

2dToolkit, at its best, can't create the atlas when i hit Commit, and at its worse, causes Unity to crash. 



The atlas size is maxed out at 4096.  i have tried both dicing the images, and checking "multiple atlases" ... in either case, Unity crashes after i click "Commit" (subsequent to a long pause).

i've tried doing this after a fresh machine restart, where Unity is the only program open on my computer.

i'm running a Toshiba laptop with an Intel i3-2310M cpu , 2.10 ghz , 6gb RAM, Win7 64-bit.

The other threads about memory problems while creating atlases don't seem to provide any solutions ... please forgive me if this is already a solved problem.

- Ryan

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Fatal error! System out of memory
« Reply #1 on: June 12, 2013, 10:11:38 am »
This isn't a solved problem - basically Unity can't cope with having that many images, all uncompressed, all open at the same time, and the format changing on all of them at the same time.

You have a couple choices -
1. Split them up into multiple smaller sprite collections
2. Use Sprite From Texture (2D Toolkit 2.0) to create a sprite directly from the texture itself. (Useful for backgrounds, and if its that big I'm guessing its a background?)

Untoldent

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Fatal error! System out of memory
« Reply #2 on: June 13, 2013, 03:09:52 pm »
No ... unfortunately, they're very large foreground animations that my client sent me. They're going to redesign aspects of the game with these large texture limitations in mind.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Fatal error! System out of memory
« Reply #3 on: June 13, 2013, 03:36:40 pm »
Option 1 might still work for you. An animation can source images from multiple sprite collections.