Jump to content

[0.22] Universe Replacer v4.0


Tingle

Recommended Posts

I have 16GB ram, so i dont think that is the problem.

I converted the skybox to jpg, now the 4k pack works fine.

Iam using 25 mods, loadtime is about 5 min when loading in background, and 2 min with active window. Loading time of universe replacer with jpg is 5 seconds.

Having 16gb of ram doesn't matter with KSP as it cannot utilize more than the first 4 (assuming you are running the 32-bit windows version). Having 25mods suggests to me that you are very close to that limit.

Edited by Sandworm
Link to comment
Share on other sites

I noticed something strange with the replacer plugin

When loading the game with these mods

28.07.2013 21:14 <DIR> B9_Aerospace

26.07.2013 17:53 <DIR> Cabana

01.08.2013 07:39 <DIR> DockingPortAlignment

25.07.2013 04:00 <DIR> EditorExtensions

28.07.2013 21:14 <DIR> ExsurgentEngineering

28.07.2013 21:14 <DIR> Firespitter

25.07.2013 04:04 <DIR> Kethane

28.07.2013 21:14 <DIR> KineTechAnimation

28.07.2013 17:24 <DIR> Large Ramp

25.07.2013 04:35 <DIR> MechJeb2

24.07.2013 22:50 <DIR> NovaPunch2

28.05.2013 21:55 <DIR> ProceduralDynamics

28.07.2013 21:14 <DIR> ResGen

12.07.2013 21:07 <DIR> **Squad** (Not a Mod)

31.05.2013 20:07 <DIR> udk_lethal_d0se

03.08.2013 23:01 <DIR> UniverseReplacer

Ok, i discovered another issue, more on that later ;P

Edited by eRe4s3r
Link to comment
Share on other sites

Ok, so here are the benchmark results for 24bit (non-alpha) images:

TGA Uncompressed - 15x 4k 24bit images @ 720MB loaded in 9.784s

TGA Compressed - 15x 4k 24bit images @ 399MB loaded in 9.341s

PNG Max Compression - 15x 4k 24bit images @ 158MB loaded in 18.882s

JPG Q12 - 15x 4k 24bit images @ 88,5MB loaded in 15.986s

JPG Q10 - 15x 4k 24bit images @ 35,6MB loaded in 14.750s

JPG Q08 - 15x 4k 24bit images @ 21,2MB loaded in 13.307s

So TGA Compressed provides the best loading times and considering the quality in between JPG Q12, JPG Q10 and PNG is barely noticable, JPG Q10 would be the file size winner.

Here is a folder containing a image in different qualities for comparison: http://ge.tt/2Mi0r4o/v/0

Update: It seems that the slow loading speeds for PNG's is a Unity bug that will be fixed in the next update of KSP because they are updating to Unity 4.2. So PNG will probably be the choice of format with a good tradeoff in between loading speed and file size.

As for textures with a alpha channel, TGA Compressed and PNG are the only options, considering the DatabaseLoader which is responsible for loading assets from the GameData folder only supports TGA, JPEG, PNG and MBM files. And the only one of those that support ALPHA channels are TGA and PNG. As for a benchmark:

TGA Compressed - 15x 4k 32bit images @ 520MB loaded in 7.104s

PNG Max Compression - 15x 4k 32bit images @ 182MB loaded in 20.881s

And here again TGA is faster but PNG offers a much lower file size. As for users that use Photoshop, you will need the SuperPNG plugin to save PNG with an ALPHA channel. Also, don't be fooled by the resulting saved image looking like it saved transparency instead of alpha. To make the alpha channel appear again in Photoshop, hold SHIFT while opening the PNG and select 'Alpha appears as separate channel'.

Edited by Tingle
Link to comment
Share on other sites

This means the plugin gets loaded during initializing and *the tga's with it* Essentially this means, the ram usage of 6 4k x 4k TGA textures is 900MB , while it is only about 300MB with JPG's

Something can't be right there. It nearly appears as if the TGA's are loaded twice. But I could be wrong.. anyhow that's why it crashes ;)

That's Unity for you. :sigh:

Link to comment
Share on other sites

Ok, apparently I had a funny issue on my KSP that was not related to the plugin that caused some bad ram usage readings.

Firstly the 4k x 4k tga's use much more ram than they should and crash my KSP despite there being 1.2GB of avilable ram left for KSP to use.

But 4k PNG's load fine, and 4k JPG's load fine both with only slight variations in ram usage.

So I correct myself, the ram usage is only weird with the 4k tga's, and I don't know why.

if you convert them to PNG or JPG ram usage is fine.

Weirdness ;)

Edited by eRe4s3r
Link to comment
Share on other sites

Um, I'm running the 4ks.4kx skybox TGA right now, along with plenty of mods (including kw/novapunch) and ksp is still taking only 1.8gb of my 3.8 available ram So I really doubt that the skybox is responsible for 1.2 of that 1.8. Do you not have any dedicated vram on your card? ie integrated/on-board graphics?

Link to comment
Share on other sites

I got 16GB of Ram and a 670GTX ;p

Sigh, I am not really sure why it's doing this, but it crashes on load with the TGA's, I assume out of memory. It works with the PNG's, so clearly VRAM is not the issue ;P

I am guessing one of the mods I have pushes the game beyond 4GB together with the TGA's

Anyhow, for people with that crash, converting it to jpg or png will fix it. But why exactly I don't know.

Edited by eRe4s3r
Link to comment
Share on other sites

Ok, so here are the benchmark results for 24bit (non-alpha) images:

TGA Uncompressed - 15x 4k 24bit images @ 720MB loaded in 9.784s

TGA Compressed - 15x 4k 24bit images @ 399MB loaded in 9.341s

PNG - 15x 4k 24bit images @ 158MB loaded in 18.882s

JPG Q12 - 15x 4k 24bit images @ 88,5MB loaded in 15.986s

JPG Q10 - 15x 4k 24bit images @ 35,6MB loaded in 14.750s

JPG Q08 - 15x 4k 24bit images @ 21,2MB loaded in 13.307s

So TGA Compressed provides the best loading times and considering the quality in between JPG Q12, JPG Q10 and PNG is barely noticable, JPG Q10 would be the file size winner.

As for textures with a alpha channel, TGA Compressed is the only option, considering the DatabaseLoader which is responsible for loading assets from the GameData folder only supports TGA, JPEG, PNG and MBM files. And the only one of those that support a ALPHA channel is TGA. As for a benchmark:

TGA Compressed - 15x 4k 32bit images @ 518MB loaded in 7.104s

Here is a folder containing a image in different qualities for comparison: http://ge.tt/2Mi0r4o/v/0

Updated my last post. Now after this benchmarking I will update the first post recommending the correct file formats and update Rareden's Texture Pack accordingly.

Link to comment
Share on other sites

And update to v2.2 :).

v2.2 - Further performance improvements. Added support for the Sun's corona and space appearance of all planets and moons. (here is a bit of information on how planet and moon textures work)
Edited by Tingle
Link to comment
Share on other sites

Just tried the 4K textures and had no issues with it. I have maybe a dozen mods loaded. That's with TGA's.

Looks great!

Edit: Just saw the file format change for the textures. Updated them. Still no issues. :)

Even with all the mods KSP is still only using 1.88 gig.

Edited by DChurchill
Link to comment
Share on other sites

JPG 10 can be a bunch worse than 12 when dealing with dark but noisy images like star fields. You will see artifacts near dim stars

There is that, optimally the starfield will need to be de-noised with the levels tool in ps. But Q10 isn't a problem in KSP, because there are no sprites in space that brighten the starfield beyond the default. If you look around, you will notice the sun darkens the starfield (correctly) and anything else isn't anywhere near powerful enough to make artifacts visible.

@ Tingle

Did you notice any weird ram usage at all? Or is the TGA compressed related massive spike in RAM usage just on my end?

And can we have a corona template, screenshot, thumbnail or the actual original file ? ;) Hard to correctly come up with a sprite without seeing how the original one looks (at least) since there are many ways to do coronas in game engines... ^^

Link to comment
Share on other sites

Read the disclaimer on the first post regarding original content from the game, but the corona is a non-alpha texture with the size 2048x512, it also seems to use black as a transparency key. Here's a low res-programmer art version :P:

ztrghef.jpg

About the RAM usage, yes, I noticed weird behavior with large TGA files - I have a couple theories as to what and why, but they are very technical and I don't really feel like explaining :P. In short, small file sizes are a good thing, the slow loading speeds is just something we have to take into account. Texture pack creators should just be careful with their file sizes when creating textures that require an ALPHA channel, due to the lack of file format support for GameData files, we are stuck with using 32bit TGA's.

Edited by Tingle
Link to comment
Share on other sites

Read the disclaimer on the first post regarding original content from the game.

Whoops ;) I knew I should have read that part. (sorry ;p) But the "programmers art" version is indeed all I needed to understand how it works.

About the RAM usage, yes, I noticed weird behavior with large TGA files - I have a couple theories as to what and why, but they are very technical and I don't really feel like explaining :P. In short, small file sizes are a good thing, the slow loading speeds is just something we have to take into account. Texture pack creators should just be careful with their file sizes when creating textures that require an ALPHA channel, due to the lack of file format support for GameData files - we are stuck with using 32bit TGA's.

So I am not insane! ;p Can't we just add an alpha channel to a PNG and save it with the 4 channels intact (You can do that by converting a 32bit tga with GIMP to png) That way we could get the compression of PNG and working alpha. Assuming the loader doesn't just flat out ignore the PNG.

Random thought ;P

Either way, the new starfield adds so much to KSP.. now to figure out how to make the corona less ugly.

Edited by eRe4s3r
Link to comment
Share on other sites

downgraded to 2.1 works fine again

Ok, I just updated the 2.2 file, can you try it out and tell me if it still does it, I seemed to fix it on my end.

Whoops ;) I knew I should have read that part. (sorry ;p) But the "programmers art" version is indeed all I needed to understand how it works.

So I am not insane! ;p Can't we just add an alpha channel to a PNG and save it with the 4 channels intact (You can do that by converting a 32bit tga with GIMP to png) That way we could get the compression of PNG and working alpha. Assuming the loader doesn't just flat out ignore the PNG.

Random thought ;P

Either way, the new starfield adds so much to KSP.. now to figure out how to make the corona less ugly.

Oh doh! I completely forgot that PNG's can have an alpha channel. I'll do a quick benchmark for the sake of completing the data from earlier and update the first-post recommendation.

Link to comment
Share on other sites

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