Kodi Community Forum
Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer (/showthread.php?tid=59115)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26


- furii - 2010-03-22

moontan77 Wrote:anyone have a linux script for converting all posters/thumbnails/fanart (.tbn) to .dds? i.e. one that checks all the folders in the Thumbnails folder.

if anyone could modify this script posted earlier in the thread so that it looks in all folders within the Thumbnails folder. It would be appreciated!

#!/bin/sh
cd ~/.xbmc/userdata/Thumbnails/Video/Fanart/ || exit
find . -name '*.tbn' -or -name '*.dds' | cut -c-10 | sort | uniq -u |
while read n; do
mv $n.tbn $n.jpg
nvcompress -bc1 $n.jpg | awk '/taken:/{printf $3}'
mv $n.jpg $n.tbn
echo "s $(ls *.dds | wc -l)/$(ls *.tbn | wc -l)"
done

no need anymore:


jmarshall Wrote:Note that as of r28714, XBMC will create .dds versions (indiscriminately) of .tbn files at viewing time if you use the <useddsfanart> advancedsetting.

Note that in some cases the DDS version may not be suitable due to quality being too poor. We need to identify a good benchmark for this so that we can have quality (at the expense of extra load time) where we need it.

If you find images the produce bad looking DDS equivalents, please make a note of them. I'll add some logging to dump out the error, so to work out the error that XBMC sees, just remove the .dds file and have XBMC regenerate it, then look in the log for the dds error.

Cheers,
Jonathan



- matt1697 - 2010-03-22

How would I go about upgrading to r28714 if I'm using XBMC Live?

Like this?


- Cocophone - 2010-03-22

jmarshall Wrote:Note that as of r28714, XBMC will create .dds versions (indiscriminately) of .tbn files at viewing time if you use the <useddsfanart> advancedsetting.

Cheers,
Jonathan

Do you need to be using a Nvidia video card that is capable of cuda?


- moontan77 - 2010-03-22

.:B:. Wrote:Sounds great Smile.

I just build 28744 now, gonna activate the DDS setting and report back with any problems.

I installed a build of 28744 for linux (i downloaded it, didnt compile it) and the scraper options have disappeared. For example my movies folder has no content set now and when you select set content, it doesnt let you pick movies, tv shows etc.

edit:ignore that, you have to enable the scrapers now in the addons menu (its in confluence skin)


The DDS conversion worked great though. After it converted all my movie posters it was amazing how fluid it was to fly through my movies.


- Brent212 - 2010-03-23

jmarshall Wrote:Note that as of r28714, XBMC will create .dds versions (indiscriminately) of .tbn files at viewing time if you use the <useddsfanart> advancedsetting.

I didn't know fanart could use the .tbn extension. I've always used MOVIEFILENAME-fanart.jpg as my fanart filenames. Will this setting cause XBMC to create .dds versions of my .jpg fanart files?


- furii - 2010-03-23

word of warning for anyone trying out 28744, on windows at least. after browsing around for a few minutes cpu usage skyrockets and my log gets filled with a "18:25:33 T:5236 M:1863475200 ERROR: JSONRPC Server: Select failed" repeating over and over. before i realized this was happening my log file managed to top out at over 4gb Confused

with all the changes going on i don't know if it's worth posting a log, but here it is: http://pastebin.com/wF4xcXTk
trimmed of the line repeating a bajillion times, of course.

that said, before my system ground to a halt using dds was great. it was noticeably faster browsing around, even on a c2d. i imagine this will be great for ion systems and the like.


- IceNine - 2010-03-23

jmarshall Wrote:Note that as of r28714, XBMC will create .dds versions (indiscriminately) of .tbn files at viewing time if you use the <useddsfanart> advancedsetting.

Note that in some cases the DDS version may not be suitable due to quality being too poor. We need to identify a good benchmark for this so that we can have quality (at the expense of extra load time) where we need it.

If you find images the produce bad looking DDS equivalents, please make a note of them. I'll add some logging to dump out the error, so to work out the error that XBMC sees, just remove the .dds file and have XBMC regenerate it, then look in the log for the dds error.

Cheers,
Jonathan

I'm really glad to see this is getting some coding time! I've been playing around with my setup at home for a while and hopefully can chip in what I have found on my own. I found that DXT1 works fine for pretty much everything except .png files that have a transparent alpha channel (which gets thrown away with DXT1 and replaced with just white), so I compressed all those files into DXT5 format and they come out just fine. DXT5 unfortunately does result in a file about twice the size of DXT1, but I also think the picture looks a little better for stuff like fanart (only by my own eye, I don't have any concrete comparisons). So, I'm not sure how much a of a pain it would be to detect the type of file being converted so png's could be DXT5 and jpg could be DXT1, but that seems to me like to way to go unless there are other problems I don't know about with DXT5 (a distinct possibility). Or you could just compress everything in DXT5 and not worry about the size difference. Smile


- jmarshall - 2010-03-24

DXT3/5 == DXT1 if you have no alpha channel. Just twice as large. Unless, ofcourse, the hardware is doing something funny. nVidia used to have a nasty bug in early GeForce hardware in their DXT1 path for instance, but that's long gone now.

The best format for colour-only is DXT5-YCoCg, but that requires shaders at runtime, which *may* not be as easy as it sounds. Reason is we have at least 2 textures to render, one or both of which may be DXT5-YCoCg. Obviously I'll be looking into that long-term, but for now we're stuck with DXT1 or uncompressed.

The key step is to develop a reasonable metric for figuring out when to try something other than DXT1. This is easy if it's just alpha or no alpha, but hard if we add in DXT5-YCoCg or uncompressed into the mix.

I have a metric that works well for my images - I'll be adding that to SVN shortly. This needs testing. EDIT: r28782 has the change.

The best way to test it out is to remove all your .dds fanart images, restart XBMC and go one by one through your movies while the .dds generates, making a note of any images that don't look all that good. It'll pay to keep a running list of good/bad/good/good etc. so that you can easily compare with the error values XBMC calculates. Then, grab the log file and dump out all the DDS error lines. Compare which ones are good vs bad with the error values you get. Hopefully we can find a decent cut-off value for trying something other than DXT1.

Cheers,
Jonathan


- Zarbis - 2010-03-24

jmarshall, did I understand you right, you want us to recreate all DDS thumbs, note with eye bad ones and provide DDS error values for them?


- IceNine - 2010-03-24

jmarshall Wrote:DXT3/5 == DXT1 if you have no alpha channel. Just twice as large. Unless, ofcourse, the hardware is doing something funny. nVidia used to have a nasty bug in early GeForce hardware in their DXT1 path for instance, but that's long gone now.

The best format for colour-only is DXT5-YCoCg, but that requires shaders at runtime, which *may* not be as easy as it sounds. Reason is we have at least 2 textures to render, one or both of which may be DXT5-YCoCg. Obviously I'll be looking into that long-term, but for now we're stuck with DXT1 or uncompressed.

The key step is to develop a reasonable metric for figuring out when to try something other than DXT1. This is easy if it's just alpha or no alpha, but hard if we add in DXT5-YCoCg or uncompressed into the mix.

I have a metric that works well for my images - I'll be adding that to SVN shortly. This needs testing. EDIT: r28782 has the change.

The best way to test it out is to remove all your .dds fanart images, restart XBMC and go one by one through your movies while the .dds generates, making a note of any images that don't look all that good. It'll pay to keep a running list of good/bad/good/good etc. so that you can easily compare with the error values XBMC calculates. Then, grab the log file and dump out all the DDS error lines. Compare which ones are good vs bad with the error values you get. Hopefully we can find a decent cut-off value for trying something other than DXT1.

Cheers,
Jonathan

I'm more than willing to lend my eye to this, since i'm a pretty useless coder. Is XBMC using .dds for posters now as well, or still just fanart? I took a quick look at the new GUILargeTextureManager.cpp file and it's quite a bit different from a few weeks ago, so I can't really tell. I was using the hack posted earlier to make it use posters, but I don't think that would work on the latest SVN. If it is already using DDS for posters then great; if not I think it would help this debugging process quite a bit since I noticed a pretty big speed increase on my ION machine when using DDS for posters.

EDIT: Answered my own question by trying it out. For everyone else's reference, the newest SVN does use DDS format for posters as well as fanart. Hooray!


- needtotest - 2010-03-24

ok updated to the r28782 - set the setting in the advanced settings file and started xbmc (right after I deleted the cache). Xbmc started to make screen dumps of the movies in the movie library - I did not want that so I exited xbmc. Deleted my movie library so that I could import it from new - one problem though I cant scan for new content in this version! I cant set content either since the content list is empty.

So what do I do now?


- arco - 2010-03-24

Activate the scrapers you want to use in the Add-Ons settings.


- moontan77 - 2010-03-24

needtotest Wrote:ok updated to the r28782 - set the setting in the advanced settings file and started xbmc (right after I deleted the cache). Xbmc started to make screen dumps of the movies in the movie library - I did not want that so I exited xbmc. Deleted my movie library so that I could import it from new - one problem though I cant scan for new content in this version! I cant set content either since the content list is empty.

So what do I do now?

in the confluence screen, go to settings , addons, and then enable the scapers you use.


- needtotest - 2010-03-24

oh - I had to switch to confluence to find that setting (was using rapier).

Thanks


- furii - 2010-03-24

woops, didn't see the second page.