Jump to content

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


sarbian

Recommended Posts

Well, if some DDS format don't work I'd like to look into it even if it's not as critical now that ATM 4 do the convert/cache.

Righto, do I need to make a dropbox account and upload to there or is there another way?

It occurred to me that maybe it was something to do with using CKAN to install DDSLoader?

Edited by MartGonzo
Link to comment
Share on other sites

I mean, freeimage should be uninstalled AFTER building, just to check if the executable loads the one from its directory. And if libsquish is also compiled as dynamic library, you should do the same for it. (BTW why that happens? By default it only builds the static library.)

No idea man... I think 'dyld' or whatever dynamic library loader somehow has a hardcoded path. Maybe it's a OS X or Mach-O thing, but you're not supposed to move shared libraries after you link a program using them.

Also I'm not entirely sure if this is needed anymore (haha) since ATM seems to convert and cache every image file into DDSLoader-compatible formats? Not entirely sure.

Link to comment
Share on other sites

I tried out the latest ATM ( still increases memory use for me ) but afterwards once I'd removed it again, DDSLoader is erroring and so breaking all sorts of things. The DLL seems to initially load fine, but then:


[LOG 14:24:23.291] AddonLoader: Instantiating addon 'Settings' from assembly 'DDSLoader'
[EXC 14:24:23.294] NullReferenceException: Object reference not set to an instance of an object
UrlDir+.MoveNext ()
UrlDir+.MoveNext ()
GameDatabase.GetConfigNodes (System.String typeName)
DDSLoader.Settings.Awake ()
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GameDatabase:StartLoad()
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LoadingScreen:Start()

followed by Texture Replacer going nuts every texture load ( example here ):


[LOG 14:24:30.183] Load(Texture): 000_Toolbar/update-available
[LOG 14:24:30.184] [TR.TextureReplacer] System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1[System.Boolean].get_Value () [0x00000] in <filename unknown>:0
at TextureReplacer.Loader.processTextures () [0x00000] in <filename unknown>:0
at TextureReplacer.TextureReplacer.LateUpdate () [0x00000] in <filename unknown>:0

which would appear to be because no textures are being loaded - as they're 95% converted dds. Eventually it stops loading. I'd updated MM which I reverted to no effect, so the only thing I can think of is ATM writing some config somewhere DDSLoader reads & isn't liking - deleting & reinstalling DDSLoader didn't change anything either. What's it looking for at that point in the loading sequence?

--

Edit: found an empty .cfg in a completely unrelated tree, removing that has started textures loading again - I'm not sure that's an actual fix ( I'd still like to know where DDSLoader looks for it's config data ) but it's movement, at least.

Edited by Van Disaster
Intermittent?
Link to comment
Share on other sites

Sarbian - am just curious - why wouldn't Squad have implemented a mod like this already, if it increases loading speeds over 30x ?

Let's try mind reading.

mindreader2.jpg

Hum, no. The reception is not good.

Joke apart I don't know. They may be reluctant to use this code since it's an undocumented method and Unity could remove it later.

To make things a bit clearer : all the stuff in the assets file are handled by Unity code, and not KSP code. So it does not mean KSP has DDS loading, just that Unity use DDS for its compressed texture format (which makes sens since it's fast).

Link to comment
Share on other sites

Joke apart I don't know. They may be reluctant to use this code since it's an undocumented method and Unity could remove it later.

To make things a bit clearer : all the stuff in the assets file are handled by Unity code, and not KSP code. So it does not mean KSP has DDS loading, just that Unity use DDS for its compressed texture format (which makes sens since it's fast).

The thing is that many of the assets that come with KSP (everything in KSP_Data as NathanKell mentions above) are already compressed as DDS.

Link to comment
Share on other sites

Does my post say different ? I know stuff are in compressed in DDS in the asset. They are in DDS because Unity compress them that way when it create the asset, not because the dev did.

Link to comment
Share on other sites

Hey Sarbian, two questions

Back in 1.6 upd, DDSloader is said to import BoulderCo/ATmconfig, just wanted to know if the access path got updated too cause it changed in the newer atm

Aside from that, I'm having trouble with some icons overrides with ATM, and I was wondering if DDSloader could fix it. I'm using the ingame texture settings sometimes around a lot of parts to diminish lag.... And I noticed that some applaucher and toolbar icon where getting their textures rescaled by that ingame setting. It's not really consistent, so it might be my overrides that are just poorly written, but I can't see where is my error. So my question is ( cause you're not in charge of atm :P ) , this ingame setting panel, would it rescale dds textures too? It seems to rescale ''some'' .png icons, but not all of them, although they're all .png. The other thing I though about was the ''make not readable'' option, could it prevent the game from rescalling ?

In the end, I'm just wondering how that ingame setting is interacting with your mod and with ATM, and how to optimize the three of them. Idealy, I would like to scale down only terrain and part texture ingame. ''Not readable'' sound like exactly it for me, but I'm a total padawan in graphics so I don't really now what not readable implies. I know also that ATM suggest to put that setting to high res and to use atm as your scaler, but I find it pretty convenient to change it ingame and to flush a few hundred of mb of RAM before crashing, and then reload them when it get smoother.

Link to comment
Share on other sites

To paraphrase the immortal R. Lee Ermey " Sarbian, you can come over to my house and meet my sister".

I've had the exact same experience, moar mods, less trouble. Seriously hope SQUAD takes notice! If Unity doesn't incorporate this, I think they should! Between your loader and lilleman's tool, the process now couldn't be simpler. Step 1: cut a ho... wait wrong procedure....

Step 1: Run lilleman's tool and pick your gamedata folder, sit back and let the magic happen. (shhh just let it happen)

Step 2: Install your mod an load the game. Soak in the goodness.

Used to be with ATM only, I was red-lining the memory usage and able to do maybe 1 to 2 missions (launch, do something, return) before the game would run out of mem and crash. Now I've done at least 10, even left the game running all night in 2x to see if it would stay running doing a SCANsat scan, got up this morning and yep, still running.

In short, you're the god of the kerbals now, and you should be immortalized with a statue at the KSC (SQUAD!)

+1 , fantastic job!

Link to comment
Share on other sites

I'm trying this out to see if I can get my 7.5GB GameData folder crunched down since my main machine is off line and getting rebuilt (it appears the I pushed my M4AT-E MoBo to its limit, and poof).

I used the KSP texture converter program and installed the DDS plugin and nothing seems different. Nothing has changed at all. Did I do something wrong?

EDIT: Do i have to delete (move/back up) the original textures?

Edited by Eskandare
Link to comment
Share on other sites

I'm looking into using this plugin for the textures in mod. Two questions, the first being: what's the practical difference between DXT1 and DXT5 in KSP. Secondly, what are the uses of mipmapped textures in KSP?

Link to comment
Share on other sites

I'm looking into using this plugin for the textures in mod. Two questions, the first being: what's the practical difference between DXT1 and DXT5 in KSP. Secondly, what are the uses of mipmapped textures in KSP?

DXT1 is half smaller than DXT5, but doesn't support transparency (except full transparency/no transparency). Mipmaps should be used for all model textures, otherwise they get ugly when you look them from a distance or under a sharp angle. In stock KSP (without ATM or TextureReplacer installed) all textures except PNGs and JPEGs have mipmaps.

Link to comment
Share on other sites

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