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


- fidoboy - 2010-02-04

hello guys, you must also add the magic line in advancedsettings.xml file. DDS Files doesn't need to be renamed to TBN again!

@neomits: i don't want to sound rude but... if you have zero experience, why are you trying to use this experimental feature?


- neomits - 2010-02-04

fidoboy Wrote:hello guys, you must also add the magic line in advancedsettings.xml file. DDS Files doesn't need to be renamed to TBN again!

@neomits: i don't want to sound rude but... if you have zero experience, why are you trying to use this experimental feature?

cause I'm willing to learn and for most things can figure it out on my own.

I figured out how to convert an individual file, but obviously that's a pain to do each fanart one at a time. If someone could help me understand how to batch the full folder (%%x) thats all I'm looking for.


- furii - 2010-02-04

neomits Wrote:cause I'm willing to learn and for most things can figure it out on my own.

I figured out how to convert an individual file, but obviously that's a pain to do each fanart one at a time. If someone could help me understand how to batch the full folder (%%x) thats all I'm looking for.

open notepad and paste this code into it
Code:
ren *.tbn *.jpg
for %%x in (*.jpg) do "C:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x
ren *.jpg *.tbn

save the file as tbn2dds.bat in your fanart folder and run it from there to convert them to dds.

%%x is just a variable that stands for every (jpg) file in the folder. it sounds like you were trying to just do start > run > "C:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x which you can't do. you can only call variables from the batch file.


- neomits - 2010-02-04

furii Wrote:open notepad and paste this code into it
Code:
ren *.tbn *.jpg
for %%x in (*.jpg) do "C:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x
ren *.jpg *.tbn

save the file as tbn2dds.bat in your fanart folder and run it from there to convert them to dds.

%%x is just a variable that stands for every (jpg) file in the folder. it sounds like you were trying to just do start > run > "C:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x which you can't do. you can only call variables from the batch file.

Big high five to furii. Thanks a ton, that was my problem (I was trying to run each line from a command prompt individually). Now I know.

Thanks!!!!!!!


- Freddo - 2010-02-05

I just tried this out and was surprised how solid it already is, I noticed a definite improvement in fps when scrolling through my TV show view, even though my PC is fairly beefy. I'm getting an arcade style solid 60fps now, pre-dds it was dropping into the 40s scrolling some views.

I'd love to see this applied to covers etc just so I can crank my thumbsize up a little higher and still get solid fps. I can understand it wouldn't be a priority though.

Is there anything I can do to contribute in terms of testing? it all went rather smoothly, and I didn't notice any quality difference until I started doing direct A-B comparisons, even then it was marginal with most of my artwork. Any skin that puts an effect over the fanart like alaska makes it totally impossible to tell.

I'm using that little batch script Furii posted, thanks chap!


- Balthazar2k4 - 2010-02-05

Louike Wrote:if you remove the .dds file there will be a white background.

Thanks. I had it working all along it was just my testing method was flawed Wink


- headcase - 2010-02-05

bomana Wrote:Skimming backward it seems like a few scripts are floating around there to deal with the dds conversion until a proper solution is in place in xbmc. Anywho, I wrote a script to convert my existing fanart. Then I wrote a script to monitor for new fanart. Then I thought that perhaps somebody else wants it, so I spent a short while merging them together, and cleaning up a little bit. It is messy. It is virtually untested (I have not tested on my production xbmc box -file server is down waiting for new sas kit).

The script can be found here.

Dependencies are inotify-tools and nvcompress.

It uses inotify to monitor the dir(s) for files that are opened for writing, so there is no polling going on. When the opened file is closed nvcompress is run on the file. This should cover the case where you keep the original file and it gets over written with a new fanart while keeping the same file name.

This script handles jpeg and png original images, as those are the only formats I have seen from themoviedb.

There is an option to convert existing directories. (-c)
Or an option to monitor directories. (-m)
There is an option to delete the original file after conversion. (-r)
There is an option to daemonize the process (run in background), in which case all output will be to logs. (-d)

Logs are /tmp/tbn2dds.*, you can `tail -f /tmp/tbn2dds.log` to monitor nvcompress' progress if you running in '-d' mode.

Example usage would be:
tbn2dds -md /home/xbmc/fanart
or
tbm2dds -cr /home/xbmc/fanart

The script is a hack. It is uggly. It is bad. It will make you cry. It will make neighborhood children laugh at you as they pelt you with their leftover lunches. There is virtually *NO* sanity checking at all. Use at your own risk.

enjoy,
Andreas

Awesome, thank you.


- bleze - 2010-02-05

On Windows 7 x64 on a Intel I7 nvcompress.com 64 bit cannot load jpeg's. Running the win32 version works fine but I find that the -fast parameter actually is slower than running without.

-bc1 -fast: 1.950 seconds
-bc1 : 1.537 seconds
(both with CUDA enabled)


- IceNine - 2010-02-05

bleze Wrote:On Windows 7 x64 on a Intel I7 nvcompress.com 64 bit cannot load jpeg's. Running the win32 version works fine but I find that the -fast parameter actually is slower than running without.

-bc1 -fast: 1.950 seconds
-bc1 : 1.537 seconds
(both with CUDA enabled)

I also have the same issue with the 64-bit nvidia tools on Vista, the 32-bit ones work fine.

As for the times, I'm not positive but I think the -fast option doesn't use CUDA even though it reports that it's on, but it is MUCH faster than normal compression without CUDA. If you compare the times with just '-fast' and '-nocuda -fast', they are the same.


- bleze - 2010-02-05

The speed increase is amazing on my ASRock ION 330! Quality looks fine to me, but hard to tell with skin overlapping ect. I can't wait till this is standard. Will give the GUI such a boost especially when posters are supported also (perhaps skin gfx also?)
Thumbs up! Please make support for reading fanart.dss from movie folder (basically copy file to cache I guess?)


- ubuntuf4n - 2010-02-06

I would like to see whole skins in this standard, maybe they could also use the positive effects of this format.


- bomana - 2010-02-06

headcase Wrote:Awesome, thank you.

Smile You are very welcome.

I did some nvcompress testing on various boxen with and without CUDA and -fast. Seems like use CUDA on ION is the result. On my dual Xeon testbox CUDA isn't working and -fast is much faster. I added a -f switch to tbn2dds if that is better on your platform.

enjoy.


- Jezz_X - 2010-02-06

The skin if it uses xbt instead of xpr (or uncompressed) is already using this for some of this in its code because the TexturePacker already compresses the skins images into some formats that are better for straight reading by the gpu.

But I'll be damned if I can find any of the info on it now Smile


- D0nR0s4 - 2010-02-06

Works perfect over here, file sizes are 500% bigger, but no lags or artifacts at all with fanart, hope this will be integrated soon.


- bleze - 2010-02-06

Funny to see how slow Posters actually are compared to fanart. Crazy! It's like instant