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


Loading DXT1 compressed texture from DDS file - galvanash - 2010-12-15

I know xbmc doesn't support xbox anymore... But if there is a developer that might be willing to help out with what is probably a simple problem for those that actually know directx programming...

http://www.xbmc4xbox.org/forum/viewtopic.php?f=24&t=1413&p=15058#p15058

Any help at all would be greatly appreciated.


- jmarshall - 2010-12-15

Why not use D3DXCreateTextureFromFile or whatever it is - the XDK contains functions that'll likely be able to load .dds images. Take a look through the XDK documentation.

If you can't do that then it should be basically the same as directx on windows. See TextureDX.cpp in particular.

You probably need to watch the pitch and height requirements, though the total size you're copying seems fine (4bits/pixel for DXT1). At any rate, the debugger will probably at least tell you where it's crashing - one presumes in the memcpy. Check that you're not running off the end of image.GetData() or lr.pBits. lr.Pitch might be somewhat useful for giving you a clue, but don't rely on it - it does funny things on DXTn textures. It might be worth running a for loop (you'll need it to pack it out to power of 2 anyway) - see Texture.cpp for the bit that packs out the texture.

Something else you'll likely run into (when it's not crashing at least) is that xbox may require that DXT1 be swizzled, I'm not sure - you may be able to "just" modify the code in DirectXGraphics.cpp or whatever it is for this (it unswizzles and unpacks DXT1,3,5).

That's about all the help I can give. Have fun!

Cheers,
Jonathan


- galvanash - 2010-12-15

jmarshall Wrote:Why not use D3DXCreateTextureFromFile or whatever it is - the XDK contains functions that'll likely be able to load .dds images. Take a look through the XDK documentation.

Thank you! I switched to using this call (much simpler). It is working (i.e. the call is successful - returns D3D_OK), and it is no longer crashing... But nothing gets drawn (the fanart background is just white). Oh well, Ill keep trying to figure out whats happening. Thank you very much for the pointers.

EDIT: SUCCESS!!! Thank you very much - you got me on the right track. I had everything right after I switched to using D3DXCreateTextureFromFile (as you suggested), but I wasn't settings the width and height in the CPicture.m_info struct (imageLib does that part in the normal code path - I missed it). I just set the width and height and xbmc started displaying the DXT1 texture. Yay! Now I just got to test and test and test.... Smile


- acbeef - 2010-12-16

Just a quick question ... I didnt see it posted
Does the dds conversion happen on cutom backgrounds for skins or do you have to convert those images manually

Ie: conditional weather folder, movies , tvshows...etc

Thx


- ashlar - 2010-12-19

acbeef Wrote:Just a quick question ... I didnt see it posted
Does the dds conversion happen on cutom backgrounds for skins or do you have to convert those images manually

Ie: conditional weather folder, movies , tvshows...etc

Thx
+1 on this question. Is it worth doing it?


- dtviewer - 2010-12-19

Have to say this made an absolutley amazing difference on my Revo!

I have many many photos in my picture section (thousands), and they tend to have large thumbnails. (Nikon D90 shooter)
It was painful browsing my picture gallerys to the point I was shopping a more powerful computer to replace the Revo.
Not any more!
All my picture thumbnails now show up instantly, with hardly any noticeable difference in quality.
It was a bit of a pain to browse every folder so the dds process could see each thumbnail, but once I did its like I have a new HTPC. I actually enjoy browsing my pics on the xbmc box more than my quad core home pc.

Thanks for this..........


Converting JPG to DDS? - rossl1986 - 2010-12-23

Hi,

I'm a bit confused by all of the articles that appear on the forum regarding converting the fan-art jpg's to dds images. I know that I have to add

<useddsfanart>true</useddsfanart>

to the advancedsettings.ini file in order that it starts using dds images instead.

However what confuses me is that in new versions of XBMC (r28714 and above), XBMC will create the dds images when you view the fan-art of each movie. So does this mean that I no longer have to use one of the batch processes and the NVidia Texture tool to batch convert all of the fan-art images as XBMC does this automatically each time a scroll past a movie?

I have the latest stable release (Dharma 10.0, Live version) with the Aeon65 skin running on an Acer 3610. This skin is a little bit slow when scrolling through movies and this seems to be the best way to speed things up.

Thanks.


- dan1son - 2010-12-23

rossl1986 Wrote:Hi,

I'm a bit confused by all of the articles that appear on the forum regarding converting the fan-art jpg's to dds images. I know that I have to add

<useddsfanart>true</useddsfanart>

to the advancedsettings.ini file in order that it starts using dds images instead.

However what confuses me is that in new versions of XBMC (r28714 and above), XBMC will create the dds images when you view the fan-art of each movie. So does this mean that I no longer have to use one of the batch processes and the NVidia Texture tool to batch convert all of the fan-art images as XBMC does this automatically each time a scroll past a movie?

I have the latest stable release (Dharma 10.0, Live version) with the Aeon65 skin running on an Acer 3610. This skin is a little bit slow when scrolling through movies and this seems to be the best way to speed things up.

Thanks.

Yes it means you don't have to manually convert them. It can take a while to do, but basically it'll do it after you view the fanart for the first time. It's not an immediate speed increase, but over time it'll get far snappier. You can look at the logs to see how it's going.

The nvidia tools can use Cuda if your GPU supports it, I'm not sure if XBMC will or not. It takes a couple of minutes to do one of my ION box, and about 10 seconds to do the same one on my gaming machine with an Nvidia GT 240. The GPU makes a massive difference.


- voochi - 2010-12-31

Just wanted to say I did this on my Acer Revo 3610 and the speed difference is very noticeable.

Thanks XBMC guys, amazing Big Grin


- Metsadah - 2011-01-04

I love the dds fanart option, truly very fast. Only problem is that my fanart sometimes disappears after a while, starting a video and going back fixes this problem. I think this happens when I scroll too fast, but im not sure. Anybody else with this issue.

Besides adding the setting in the advancedsettings.xml is there something else that you can do to tweak things?


- Malexx - 2011-01-05

Iam a litle bit lost here.

Will the Extrathumbs and extrafanart i have in my MovieName Root Folder also automaticly becompressed when using the advancedsettings?

Or do i need to compress them.
And which tool is required if i want to compress the fanarts manually and the thumbs etc also?

i Searched through the Thread but its not clear for me.

Thanks in Advance


Do existing jpg's get transformed into DDS? when enabled? - Marcus263 - 2011-01-06

I'm in the middle of writing up a comprehensive guide for optimising the performance of Apple TV; so far I've taken the Alaska Revisited skin stripped it down to the core, repacked the textures for speed, written up some startup scripts to disable unnecessary services (Printer, Airtunes, Network Time, PBS etc) and given XBMC a 'nice' high priority, optimised all image and XML files to take up a small footprint and it seems to be working. We only have 250megs of RAM to work with and a bad processor but so far so good.

I'm on the bit where I'm optimising the fan art, I've temporarily disabled DDS in advancedsettings.xml so that I can optimise the JPG files (currently set at .tbn). My question is this; A current fan-art downloaded with a file size of 100kb, when optimised with certain tools gives me a 50-60% optimisation, so let's say it's reduced to 50kb in file size. If I then enable DDS in advancedsettings.xml, will it re-encode the existing optimised 50kb file or will it download the original file, re-encode, then save as a DDS, ultimately negating the initial optimisation?

Thank you.


Problems when browsing with DDS thumbs enabled - 80sretroparty - 2011-01-08

I recently tried enabling DDS for thumbs as the normal thumbs were taking too long to load on my Mac Mini (2009 model), however since doing so XBMC has become very jerky when browsing the library.

If I'm using the Panel view in Alaska Revisited, for example, whenever I skip down a row of thumbs XBMC freezes momentarily before displaying the next row.

The weird thing is that DDS works perfectly on my PC, with exactly the same scraper/skin settings. I also tried it on another Mac, which is of a similar spec to the PC, and that has the same issues with jerkiness.

Is there something in the Mac's settings that needs to be changed in order for DDS to work properly?

Any help would be appreciated. Cheers.


- rossl1986 - 2011-01-09

dan1son Wrote:Yes it means you don't have to manually convert them. It can take a while to do, but basically it'll do it after you view the fanart for the first time. It's not an immediate speed increase, but over time it'll get far snappier. You can look at the logs to see how it's going.

The nvidia tools can use Cuda if your GPU supports it, I'm not sure if XBMC will or not. It takes a couple of minutes to do one of my ION box, and about 10 seconds to do the same one on my gaming machine with an Nvidia GT 240. The GPU makes a massive difference.

Now I have another problem. I realised that it hadn't been converting the images at all, so I decided to export my video library using the single files option. All of the fan-art images were still jpegs. I then checked the log file and it says

Error loading special://profile/advancedsettings.xml, no <advancedsettings> node

All I have in my advancedsettings.xml file is the useddsfanart tag.I've checked and re-checked it and I can't see any mistakes. Are there any other reasons why I would get this error?


- Brent212 - 2011-01-09

rossl1986 Wrote:Now I have another problem. I realised that it hadn't been converting the images at all, so I decided to export my video library using the single files option. All of the fan-art images were still jpegs. I then checked the log file and it says

Error loading special://profile/advancedsettings.xml, no <advancedsettings> node

All I have in my advancedsettings.xml file is the useddsfanart tag.I've checked and re-checked it and I can't see any mistakes. Are there any other reasons why I would get this error?

My guess is that you're missing the <advancedsettings> tag. You should have:

Code:
<advancedsettings>
  <useddsfanart>true</useddsfanart>
</advancedsettings>