XBMC Community Forum  

Go Back   XBMC Community Forum > Development > Skin Development

Skin Development GUI and Web skins/themes, graphics development and suggestions.
No End-User Support Requests! Only skinners and graphic artists.

Reply
 
Thread Tools Search this Thread Display Modes
Old 2004-02-27, 23:53   #1
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Thumbs up XBMC Skin Compressed Textures Tool

i've implemented compressed texture support into the latest build of xbmc. this helps reduce the memory used by skins significantly. it does, however, mean that you will need to mind a few points while creating skins.

all textures used are now power of 2 (i.e 1, 2, 4, 8, 16, 32, etc.) if you supply a non-power of two texture, it will be padded to the next largest power of two. this can result in a large amount of wasted space. for instance a 40x40 texture is padded to 64x64 wasting 2496 pixels - more than half the pixels in the image are wasted. so basically, try to keep your images as close to power of 2 as possible.

png, jpg and gif files are automatically re-compressed on load into an xbox compatible format, this can cause some quality loss, particlarly in the alpha channel. i have added support for dds files to help with this. dds files are loaded without any conversion - whatever you put in the file, you get loaded directly. to create dds files you'll need an app, this util includes a plug-in for photoshop that will let you convert your textures to dds. please note xbmc does not support mipmaps. if you want animation, you'll have to use gifs still.
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-28, 00:58   #2
onkel bouncy
Senior Member
 
Join Date: Oct 2003
Posts: 159
onkel bouncy is on a distinguished road
Default

sounds interesting.
will test it soon.

ok
my results:
i used the 2 different backgrounds from hifi skin.
these are two of the biggest graphics in my skin.
rescaled it to 512x512 and saved it as 32bit argb.
other modes (16bit,..) seemed to be a too high quality loss.

one background is now about 1mb big (150kb as png).
now i renamed these two dds files into .png and overwrite the original png's.
no problem for xbmc, but i only saved about 1-2 mb free memory.
that is not much for the two biggest graphics.
i don't know if i can use a better way to save the dds files, but if this is the only way every skin would be 10-20mb big.

is there a limit for free space ?
onkel bouncy is offline   Reply With Quote
Old 2004-02-28, 04:18   #3
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Default

you should be mainly using dxt1, dxt3, or dxt5 for graphics - for non-alpha textures, or textures with a single transparent colour use dxt1 as it's half the size of dxt3/dxt5.

if you use 32bit argb you'll not save any memory at all. in fact with the current code a 32-bit argb dds uses more memory than a png as the png will be recompressed to dxt3 by xbmc, while the dds will not.


also a note for skinners:
all current skins will work fine. you don't have to change anything if you don't want to, you can change stuff to dds if you want finer control over which compression method is used. that's the only advantage.
changing things to be power of two is a space saving feature only, they'll work fine if they aren't power of two but you waste some memory.

currently skins are loading very slowly unless you have all the texutres as power of 2 dds, but i'm planning to work on this and sort it so that pngs and jpgs will be just as fast.



__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-28, 06:54   #4
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Default

speed fix is done, pngs loading nice and fast now.

something to consider if you're finding dxt compression causes quality loss - try using gifs for stuff. you only get 256 colours, but xbmc loads them without recompressing so there's no quality loss and they're the same size (once loaded) as dxt3.
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-28, 10:43   #5
Frodo
Team MediaPortal
 
Join Date: Sep 2003
Posts: 509
Frodo is on a distinguished road
Default

k
i disabled the compressed textures (for now)
it caused the skins to look very ugly cause of the compression
we'll see if this can be solved, however in the mean time we'll just use uncompressed textures
frodo
__________________
XBMC Project Founder (Retired), now head programmer of MediaPortal
Frodo is offline   Reply With Quote
Old 2004-02-28, 17:24   #6
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Default

note for those wanting to keep skin sizes down... easiest way is small textures. size of the file itself is largely irrelevant - you can have a 2k png, but if it's 1000x1000 pixels, it's going to use a lot of memory. also try and use sizes close to but below a power of 2. a 130x100 texture uses twice as much memory as a 128x100 or a 120x100.
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-29, 01:44   #7
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Default

ok, new plan - i've made a texture compression tool, it's in cvs (sorry no bin, it needs the xdk). if you run it over your skin's media directory it'll compress the files in it a bit more "intellegently" than the xbox-based compression.

usage is quite simple:
xbmctex [-output outdir] [-input indir] [-quality qual]

-input lets you specify the input directory for the converter. it will search for any files named *.png, *.bmp *.jpg *.tga *.dds in the given directory and convert them. if you don't supply an input directory, it uses the current directory.

-outdir lets you specify an output directory for the converted files. files are saved as filename.xpr (e.g. pic.jpg.xpr) so they won't overwrite your files if you use the same input and output directory. if you don't supply an output directory, it uses the current directory.

-quality sets the quality for conversion. there are 5 levels, default is normal quality:
min this will change all textures to the smallest suitable type, regardless of quality implications. quality will generally be poor, but the size is very small also.
low this will aggressively compress most textures, it will generally give some visible artifacts in textures.
normal this gives a good balance of quality and compression. there may be soime small image artifacts, but much less than the low setting.
high this should give virtually no visible artifacts on textures, some very slight effects are possible though.
max this will only compress textures if the result is completely lossless. it gives little to no compression but you are guaranteed not to lose any quality.

i'd recommend skinners choose either normal or high as a quality setting for their skins.

edit: couple of other things.
256-colour images are never compressed, they are kept as 256-colour. if you want a 256-colour non-animated image a png is better than a gif as pngs are preconverted whereas gifs are not (faster loads for png). quality for both is the same.
images less than 1024 pixels (eg. 32x32, 16x64) are never compressed as it doesn't actually save any memory to do so. so your icons and such will not become distorted.



__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-29, 03:12   #8
onkel bouncy
Senior Member
 
Join Date: Oct 2003
Posts: 159
onkel bouncy is on a distinguished road
Default

sounds better and easier.
i will test it soon.

by the way..
i had a look at internal 02-28 and saw that there is more free memory as it was in 02-27.
any optimizations ?
onkel bouncy is offline   Reply With Quote
Old 2004-02-29, 03:53   #9
Butcher
Team-XBMC Developer
 
Join Date: Dec 2003
Posts: 765
Butcher is on a distinguished road
Default

other than compressed textures i don't think so
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Butcher is offline   Reply With Quote
Old 2004-02-29, 13:32   #10
onkel bouncy
Senior Member
 
Join Date: Oct 2003
Posts: 159
onkel bouncy is on a distinguished road
Default

are all graphics loaded on xbmc startup, or only if they needed ?
onkel bouncy is offline   Reply With Quote
Reply

Bookmarks

Tags
helper, skinning, tool, xbmctex


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use c-xbox tool for xbmc Hulkman XBMC for Xbox Specific Support 2 2004-12-03 19:10
XBMC SKinning Tool Stace Supplemental Tools for XBMC 7 2004-07-18 01:18
Screen Scaler - Skin/Screen Resolution Tool Radams58 XBMC General Discussion 4 2003-11-18 23:01
skin Tool mrfreeze Skin Development 3 2003-10-07 20:37


All times are GMT +2. The time now is 23:19.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2008, XBMC Project