Jump to content

[0.90] DDSLoader 1.9 (Mar 9) - Loads DDS Texture "Boringly fast" edition


sarbian

Recommended Posts

That on the left is a mipmap.

No it's not. Look at the size of it. It's at 100% zoom. Also this is viewed in DirectX Texture Tool, any dds file it opens that has mipmaps will say as much in the title: Mip 1 of X. Mip 1 is always the full resolution version, there is no mip 0.

Link to comment
Share on other sites

Why? I prevents a bunch of warning messages during loading and I see no downsides in this.

Sorry, I was talking about the GIMP dds plugin. :P

It's really painful if you have a bunch of compressed normal maps mixed with some of them having the flag and some not.

Link to comment
Share on other sites

@Telanor: I've made some tests with the lastest version of KER, and it should be OK. The compression algorithm is quite agressive with icons and small textures in general, so as a workaround, they are now saved in an uncompressed format. ModsExceptions.txt also got a new line for KerbalEngineer, otherwise the toolbar icon is detected as a normal.

I'm wondering if I should convert A8, L8, A8L8, L16 and stuff like this into dds: those compression methods are more effective than dxt's. I'm not sure there will be any benefits for these particular formats.

Still, for now the program can't convert them at all, and it's a problem for the rescaling options. I think I can save them in their original format, even rescaled. Problem with this is: the program don't keeps tracks of what's been converted, it only ignore files that are not tgas, pngs or mbms. So if a rescaling batch is launched several times, those textures will be rescaled every time... It could have a file to store this files list somewhere in the GameData folder (or directly in the program folder), but it's not really an elegant solution...

Edited by Lilleman
Link to comment
Share on other sites

No it's not. Look at the size of it. It's at 100% zoom.Also this is viewed in DirectX Texture Tool, any dds file it opens that has mipmaps will say as much in the title: Mip 1 of X. Mip 1 is always the full resolution version, there is no mip 0.

Ok, it looked a bit strange because the left window was bigger (I looked at the min/max/close buttons) and therefore the whole thing looked zoomed.

Isn't the direct3d implementation meant to be used for realtime compression? Maybe that's why.

So if a rescaling batch is launched several times, those textures will be rescaled every time... It could have a file to store this files list somewhere in the GameData folder (or directly in the program folder), but it's not really an elegant solution...

Rescaling to a power of 2?

Once the texture has such a resolution it should no longer be rescaled, should it?

EDIT: I guess you mean shrinking them for less memory consumption, right?

I thought the game does already do this if you have the right settings?

Edited by slumpie
Link to comment
Share on other sites

Used the converter (after copying my gamedata folder) deleting old files, game seemed to be loading then crashed before the main page. Looked at the log and I ran out of memory. EVE was trying to load a texture IIRC.

Link to comment
Share on other sites

@Slumpie: Yep, it's only a problem for shrinking textures, if you let the Resize ratio to 1, this won't be a problem. I suppose the game reduce the resolution to reduce charge on the GPU, but it still has to load the texture with full size before that, so it's not the best for RAM usage.

@John FX: It should delete files automatically if it successfully convert them to dds. Unsupported formats are left untouched. You don't have to delete anything after a batch. But the memory issue is weird, it shoudln't happen. Does this install worked without conversion?

Link to comment
Share on other sites

Also Lilleman, it looks like your application is written in C#, might I suggest you use Ookii dialogs' VistaFolderBrowser rather than the winforms one you used. Its free and open source. The winforms one is the old XP style and is really a pain to use.

Edit: Looked at the source, you used VB I guess, but it should still work I think.

Edited by Telanor
Link to comment
Share on other sites

I forgot to uncheck the "Use windows XP Visual style" checkbox before compiling this:blush:... I'll do it for the next release (I noticed some bugs in the arguments detection process that needs to be fixed, I'll try to do it for tomorrow).

Edit: It's VB.NET, so once compiled it's the same executable as it would have been with C#.

Edited by Lilleman
Link to comment
Share on other sites

OK, I thought you were talking about window style (I'm keeping the "Windows 95" all-grey theme, so I don't really pay attention to aestethic). I'll look into this.

(By the way, it seems like Ooki is compatible with .NET only, anyone knows of a similar, cross-platforms GUI library? I'm considering re-writing the whole thing with Mono and SharpDX, so Linux and Mac users could use it as well)

Link to comment
Share on other sites

I suppose the game reduce the resolution to reduce charge on the GPU, but it still has to load the texture with full size before that, so it's not the best for RAM usage.

The difference between starting the game with full resolution setting and eight resolution is about 1.5GB, at least on my installation with a notable number of mods installed.

It doesn't really matter if opengl or direct3d is used, the difference is about the same. The only thing opengl does is to directly load stuff into the video memory, a whopping 2.4GB when playing with full resolution textures, again just on my modded installation...

Although I actually don't know how efficient it is by doing so. Also some textures, yes I mean those damn icons, that should stay the same get downscaled as well...

Link to comment
Share on other sites

I noticed a few bugs with arguments, and some of them are not acknowledged. Flags and agencies logos are rescaled as well... I'm rewriting that part, and cleaning the code a bit in the process. I'll release it asap, probably tomorrow. For now, better not use the resizing option, sorry.

Link to comment
Share on other sites

Looks like another set to add to the exceptions: ORS(X) textures need to be readable in order for the resource maps to work:

Stop Doing Dumb Things With Your Map Textures: UnityEngine.UnityException: Texture 'CommunityResourcePack/Karbonite/Minmus_Karbonite' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

at (wrapper managed-to-native) UnityEngine.Texture2D:GetPixel (int,int)

at ORSX.ORSX_PlanetaryResourceMapData.loadPlanetaryResourceData (Int32 body) [0x00000] in <filename unknown>:0

KSP-AVC also appears to be hardcoded to look for a png file


KSP-AVC -> System.IO.IsolatedStorage.IsolatedStorageException: Could not find file "C:\KSP 0.25 - Copy\GameData\KSP-AVC\Textures\OverlayBackground.png".

Edited by Telanor
Link to comment
Share on other sites

@John FX: It should delete files automatically if it successfully convert them to dds. Unsupported formats are left untouched. You don't have to delete anything after a batch. But the memory issue is weird, it shoudln't happen. Does this install worked without conversion?

Yes, it works fine with no compression/conversion and there are no double copies around. Would you like a log?

EDIT : I use ORSX in case it is relevent

Edited by John FX
Link to comment
Share on other sites

I thought I got Karbonite pack working... I'll download the last version and test this again. I'll also test mods listed in JohnFX's log and see if everything is converted correctly. Thanks for your patience, guys!

Edit-update (no need to up this thread for nothing): Rewriting the arguments part and cleaning the code took me much more time that I excpected, and I don't have enough time to test all mods for today. I'm also writing proper readme and license files, and I've found a snippet of code that would allow to have a proper folder browser dialog without having to use an external library. I'll probaly start a new thread in the "Tools/applications" sub-forum, as I would like to keep Sarbian's thread clean from my errors.

Edited by Lilleman
Link to comment
Share on other sites

@JohnFX: I took a look but I weren't able to reproduce a crash with mods listed in your log. I see you used EVE, do you have a particular texture pack that comes with it?

@Telanor: NavyFish's mod is looking for png, and once again, it seems to be hard-coded... I just added an exception for it. I looked into a new folder opening dialog, but the snippet I've found is quite large and I don't want to just make a copypasta, so I need a bit more time to add it properly.

@Slumpie: I...Kinda forgot about the "Icons" things... I'll add a checkbox for the next release, for now you'll have to add a new line to ModsExceptions.txt, sorry.

Anyway, this program now have his own thread, keep an eye on it for updates!

Link to comment
Share on other sites

Thanks to all the modders and coders who made this possible. Load time with ATM and DDS on stock install.. 41 seconds from the time i click the button until i get main menu sounds. This is simply amazing and keep up the good work!

Link to comment
Share on other sites

An other patch from Shaw came in.

1.5 Added suppport for skipping first N mipmaps (including original image), so this effectively works as a texture reduction. Number of skipped mipmaps can be configured in a .cfg file which contents looks like:

DDSLoader

{

mipmapBias = 1

normalMipmapBias = 2

}

normalMipmapBias specifies bias for normal maps, while mipmapBias for other mipmapped textures. Both values shoud be 0 in the default configuration file, of course.

(default config file not included in this version)

Next version I ll think about a way to allow some file to no be read only, so we can use dds on more mods files

Link to comment
Share on other sites

I love this mod, but since I started playing with this mod, I have run into... This thing.

GF1sLjB.jpg

The symbols all black out. It's weird. Any idea why this happens?

EDIT: it only seems to happen when I use the Repuslors from this pack:

http://forum.kerbalspaceprogram.com/threads/84102-WIP-PARTS-PLUGIN-0-25-Kerbal-Foundries-wheels-anti-grav-repulsors-and-tracks

Edited by Mekan1k
Link to comment
Share on other sites

I just wanted to drop by this thread as well and give a real heartfelt thanks for rescuing my KSP dreams. I recently hit the point where even ATM plus -force-OpenGL mode were not enough to prevent memory crashes. But once I used Lilleman's conversion tool on the entire gamedata folder, using -force-opengl pulled my memory use down to 2.3 GB! My RAM worries are completely gone! At least, compared to the 3.7 GB I was hitting before, which insta-crashes once I try to go into the VAB/SPH.

(Before anyone says this is impossible, I have done tests. For whatever reason, dx9 gains no RAM benefit from pre-converting textures to dds, but dx10, dx11, and openGL all display a massive reduction in RAM usage, on the order of about 35% for me)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...