Wednesday, October 14, 2009

Texture Textures, you are too fat!

So here i am getting very close to basic completion of my Dreamland book, and whaddya know. I am thrown a curve ball. It is a pretty large curve ball, but one that must be hit out of the ballpark, and soon.

I estimate i have a few hours of work left to make this application viable for release into the community for Peer review, or playtest. So i am a bit frustrated with soemthing i guess i should have tested much earlier than now.
Let me tell ya how it went...
I added in all the pages for the book (300 of them), and published a ccGame file (that is the file that one downloads to your xbox to install the game).
The ccGame once it was produced was a whopping 1.4GB, and seeing as how the limit on XNA titles is 150MB, i am in trouble. OUCH!
So i find that my jpg pages are being compressed to 10 times their jpg size. And i based all my calculations on them being around the jpg size (this is where i SHOULD have tested the pipeline out)
I then tried to see how come they are bigger and failed. The numbers did not add up. I knew that XNB files were supposedly well compressed, as nowadays compression techniques are really well understood and documented. So i had no choice. I read all the posts i could find in the XNA forums relating to texture formats etc. Lots of interesting reading there!

finally i had to post my own question, into a thread that was already quite similar. Within seconds of my post i got two answers of soemthing to try, something i had missed, mainly as i thought it defaulted to dxt compression on the textures anyway. So they instructed me on how to do that. Which is awesome! So after reprocessing the textures into DXT i find they are now only about 2.5 times the size of the jpg file.
This will of course still blow my total out of the water, and i haven't at this time seen what effect the DXT compression artifacting will have had on my texture.
As for size ,i can of course use smaller texture :( which will make me sad.

At this time, i do not quite know what to do. As i would have to reprocess all my 300 etxtures to make them multiples of 4 in both height and width to conform to DXT compression. This is a huge undertaking unless the process can be batched, and my debabilizer has run it's trial course :( BAH!

Time will tell how this goes. I'll update at some point.

No comments:

Post a Comment