Unoptimised textures

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Unoptimised textures

Post by UK_Eliter »

Dear all

I've found that the optipng tool (version 0.5, dated 14-jan-2006) can optimise textures in all the following OXPs. Apologies if any of these OXPs are not the latest versions (at least if the latest version of the OXP in question is optimised)

Accipiter.oxp
adcks_ffe_ships
aegidian-special
anarchies (a bit)
armoury (a bit)
asteroid storm
behemoth
cobra3njx
cobraIV
commies
constrictor (a little bit)
contractor
copperhead
copperhead yari
diamondback
dictators
dragon
eagle2
executive spaceways
fararm ships
fuelstation
galactic navy
galcops
gates
globestations2.0
griff_coriolis_normalmapped_alt
Griff_Debris_sets135_no_normal_map.oxp (a little bit)
impcourier2
imptrader
jabberwocky
Kestrel&Falcon
kirin
military fiasco (a little bit)
milmissile (a little bit, for the sole texture)
missile_spoof
missiles and bombs
missionaries
navaltorpedo
neocaduceus
ore processor
phoenix
pods 1.22 (a little bit)
RandomHits1.4.11
SecondWave 1.33 (a little bit)
SIRF20
Spectre (a little bit)
s-ships1
starsoarer
Ste3cV1.4
supercobra
TCAT 1.11
thargoid_wars 4.5.4
thargoidcarrier
Tianve1.3
tiger
Transports 2.52 (a little)
UPS-courier v1.7.8
UrutuMKIII
UrutuMKIV
vamp_reduxed_improved_engine_flame.oxp
vampires
Vector1.5
venom
werewolf
wolfwoods_variants
xarik
YOUR_AD_HERE (a bit)
YOUR_AD_HERE_set_A through to YOUR_AD_HERE_set_G
Z_GrOovy_System_Stations (a bit)
Z-ships_v1.0
ZygoRoids v1.1


I didn't much note before and after sizes, but I reckon I've saved quite a lot of space (ten megabytes or so?) and there does seem to be an increase in speed of startup. Slower computers might see more of a startup speed increase, and perhaps even an acceleration of game-play.

Note also that there are lots of OXPs I didn't test (i.e. didn't try to compress the textures in). Of the ones I did test, only a half dozen or so had fully optimized textures (or ones that were so close to that as makes no difference).

Desirable action: the owners of these OXPs optimise them, or we tell those who don't know how to use the tool how to use it. The second option is less desirable, partly because optipng-ing a load of OXPs takes, at least if you don't manage to automate it somehow, ages.

One final thing: I suppose it's possible that some OXPers might not want the texture quality loss that is involved, at least sometimes, in the optimization.
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: Unoptimised textures

Post by Yodeebe »

So if I was to go through this list, & remove any non essential ones from my game, would that solve my rare-but-annoying drop from 60FPS to 6FPS?
Image
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Unoptimised textures

Post by Smivs »

Well, the only one of mine there is Contractor, and on looking it seems that I didn't 'optimise' the textures too well for this ship, but TBH as they appear so rarely I don't think it will be causing problems on its own.
I have now reduced the textures folder from its current 1.6MB down to 1.1MB without any quality loss, and will include this in any future release.
If anybody wants the 'optimised' textures, a replacement Textures folder (zipped) is available here.

I am not familiar with Optipng, but it sounds interesting, so I'll go have a look. Thanks for the tip. :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Unoptimised textures

Post by Svengali »

Using optimization tools is a good thing and reduces not only traffic/filesize - it will speed up I/O transactions too. But it is necessary to check the output as well.

I'm always doing it for my OXPs and Globestations2.0 and Vector are optimized - further reduction will be lossy. One of the things OptiPNG does if no parameters are given is to look if the bitdepth can be reduced. For the above mentioned OXPs it means that the textures are converted to 8-bit,indexed - which is not wanted and lossy and may even cause trouble for shaders. Dead-optimization is not the way .-)

Edit:
The points I'm trying to think about before doing textures:
- Map-Size - it usually depends on the models size and planned details in the map
- Clusters in UV-Maps - don't waiste space, don't use backgrounds
- Required bit depth - specially think twice if you really need an alpha channel
- Mipmapping - expand the textured area by a few pixels

When done a few additional checks:
- Setup costs & Memory usage - luckily we have inbuild ways to check things (FPS, console.writeMemoryStats(); and shader debug)

Finally:
- Optimize - this is only the last step. The above mentioned things have a way higher impact on performance
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Unoptimised textures

Post by JensAyton »

UK_Eliter wrote:
there does seem to be an increase in speed of startup. Slower computers might see more of a startup speed increase, and perhaps even an acceleration of game-play.
Startup time and rendering speed will not be affected. There may be a marginal reduction in loading stutter during gameplay.
Svengali wrote:
For the above mentioned OXPs it means that the textures are converted to 8-bit,indexed - which is not wanted and lossy and may even cause trouble for shaders.
Not true; Optipng doesn’t do anything lossy. It will only reduce bit depth if there are no more than 256 distinct colours in the file. Shaders will not be affected in any way. (In general, the in-memory representation of the texture won’t change; the exception is if it’s converted to a greyscale or greyscale+alpha format, but even then shaders will see the same RGBA values as for the original texture. Any difference in appearance or functionality is a bug in Oolite, but it passes a test suite containing all PNG colour formats.)
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Unoptimised textures

Post by UK_Eliter »

This is all very informative! :)
Post Reply