Large unoptimized textures

If you find a bug within PR:BF2 (including PRSP), please report it here.
Post Reply
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

Large unoptimized textures

Post by Rabbit »

bump map is saved at 2048x2048 and is to large.
Image

AfSoccer "I just don't see the natural talent."
Image
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

gb_ah64 has unusually large cockpit sheet

Post by Rabbit »

its 2048x2048 rather than everything else having 1024x1024
Image

AfSoccer "I just don't see the natural talent."
Image
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

pl_f16_c unusually large

Post by Rabbit »

All other factions have f-16 sheet at 1024x1024 while pl has it at 2048x2048 with alpha attached to it as well.
Image

AfSoccer "I just don't see the natural talent."
Image
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

polish vehicles large sheets

Post by Rabbit »

shilka 2048x2048
rosomak 1p saved as dxt3
rosomak woodland saved as 32bit A8R8G8B8
bmp1 saved as dxt3
brdm2 saved as 2048x2048
dzik ext and int saved as 2048x2048
star trucks textures saved at 2048x2048

Not sure if dxt3 is anything important. Also all 2048x2048 have alphas on them.
Image

AfSoccer "I just don't see the natural talent."
Image
User avatar
Mineral
Retired PR Developer
Posts: 8534
Joined: 2012-01-02 12:37
Location: Belgium

Re: Large unoptimized textures

Post by Mineral »

Thanks I'll take a look. DXT3 is used when you want a better alpha layer normally i think. But that shouldn't apply here :)

edit: lol polish trucks textures combined to 24+ mb. Not bad
Last edited by Mineral on 2018-02-08 14:30, edited 2 times in total.
Image
Valmont
Posts: 159
Joined: 2014-10-21 13:43

Re: Large unoptimized textures

Post by Valmont »

[R-DEV]Mineral wrote:Thanks I'll take a look. DXT3 is used when you want a better alpha layer normally i think. But that shouldn't apply here :)

edit: lol polish trucks textures combined to 24+ mb. Not bad
Mineral, this guy Project Reality Forums - View Profile: B4rr3l is basically BF2's 2018's texture guru of the year! He tried all posible texture formats like DXT1,2,3 and several others until he found out what looks best and weights less for every type of asset (Sky, ground, vehicle, shadow, 3p/1p models textures etc.)

You can literally tell him: "Can you optimize all our textures to look 10x better while taking up 1/3 of the memory and the guy will ***** do it. Yes, looks like magic but I call it trial and error!

Also the guy is a super cool brazilian army member so he not only knows about technical details but also knows his way around guns and military s***

Let it be an experiment, have him then handle you the modifications and test if it looks better while keeping/improving fps. You basically got nothing to loose and he will probably gonna ask for credits and/or maybe one/two assets :-D
Last edited by Valmont on 2018-02-08 15:40, edited 1 time in total.
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

Re: Large unoptimized textures

Post by Rabbit »

static c-130 bump map is 2048 while texture sheet is 1024
Image

AfSoccer "I just don't see the natural talent."
Image
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

Re: Large unoptimized textures

Post by Rabbit »

polish kits are 2048x2048. Even if alpha is saved to the bump map that is 50 2048x2048 kits running around on a map.
Image

AfSoccer "I just don't see the natural talent."
Image
User avatar
Mineral
Retired PR Developer
Posts: 8534
Joined: 2012-01-02 12:37
Location: Belgium

Re: Large unoptimized textures

Post by Mineral »

All our kit textures are 2048, for good reason :) They are always in your face. Alpha is on bump as well already.
Image
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

Re: Large unoptimized textures

Post by Rabbit »

considering even semi large cars have a texture sheet of 1024 and more performance issues reported with each release it should be at least considered lowering their quality.
Image

AfSoccer "I just don't see the natural talent."
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Large unoptimized textures

Post by Rhino »

Cheers Rabbit, ye many of the Polish textures aren't totally optimized.
Valmont wrote:Mineral, this guy Project Reality Forums - View Profile: B4rr3l is basically BF2's 2018's texture guru of the year! He tried all posible texture formats like DXT1,2,3 and several others until he found out what looks best and weights less for every type of asset (Sky, ground, vehicle, shadow, 3p/1p models textures etc.)

You can literally tell him: "Can you optimize all our textures to look 10x better while taking up 1/3 of the memory and the guy will ***** do it. Yes, looks like magic but I call it trial and error!

Also the guy is a super cool brazilian army member so he not only knows about technical details but also knows his way around guns and military s***

Let it be an experiment, have him then handle you the modifications and test if it looks better while keeping/improving fps. You basically got nothing to loose and he will probably gonna ask for credits and/or maybe one/two assets :-D
FYI what Barrel basically does is take a texture, and makes it 4x (or more) the size (both in terms of pixel area and memory used) which is awesome if you want HD textures like he is doing and can do since he is just making vBF2 HD and that has nowhere near as many assets as we have and on much smaller maps so he has far more free memory to play with than we do. If we did that with PR, no one would be able to load up a map as you will have exceeded the memory limit for the engine.

While yes, loads of our textures could be saved at a higher rez and in better formats to save on memory, it isn't as simple as just resaving a texture, for the most part. Firstly before you resave a texture, you want the original uncompressed texture so you don't get re-re-compression errors, especially if saving from DXT5 to DXT1 which then the re-re-compression is seriously bad, get purple splotches all over your guns for example. Then to really optimize a model you will probably need to redo its entire texture and shader technique setups in order to make the most of it, some not being possible without also modifying the objects UVs and texture formats if it has transparent textures embedded in its main sheet and taking up loads of memory for hardly any transparent area used. If that is the case then you're looking at a major overhaul which can take a minimum of a weeks work to fix just that.

I've been doing just that for the Lynx which before had its alpha on its main sheet for only a few small windows and the net, note the texture is also only saved in 1024x1024 and in DXT5 to allow for the alpha and has a total memory usage (with all its mips) of 1.33mb (all data you can see in the bottom of the screenshot)
Image

After a lot of work and other optimizations, tweaks and fixes I've moved all the transparent parts onto their own sheet and this has allowed the texture to be saved in DXT1, which is 1/2 the size (memory wise) of DXT5 or DXT3 (there is no DXT2 btw) because there is no alpha, which has also then allowed for the texture to be saved at 2048x2048, 4x the rez, with only a marginal increase in memory useage from 1.33mb as it was before, to 2.66mb, so 2x the memory useage for 4x the pixel area.
Image
zoomed in to 100% as per the shot of the old texture:
Image

With of course the small addition of a new 512x512 (256x256 for the normal and spec) "alpha" sheet that has all the transparent parts on it (windows and netting etc) for an extra 341kb (426kb including normals and spec):
Image

Now if someone was to just take the old setup and just make it 4x the rez to the same 2048x2048 and they would have to save it at DXT5 (or DXT3 which is same mem usage) the textures would then be 5.33mb instead of 3mb (including the extra transparent sheet's textures).

This BTW isn't going into all the normal and spec map optimizations that have also been done at the same time.


Also Valmont, Barrel has said quite a few times now he has no interest on working on PR's textures, which is a shame since we could use someone like him since we simply don't have enough people with the time to go through all these hundreds of assets we have and ensure they have their textures in the most optimized setup possible. But I can't blame him, it is very boring, tedious work with very little reward.
Image
Valmont
Posts: 159
Joined: 2014-10-21 13:43

Re: Large unoptimized textures

Post by Valmont »

Thanks for such detailed explanation Rhino you're truly an amazing person, a gentleman and your passion for the project really shows, and it always has even after all these years, I really cannot praise you Devs enough.

I also have some texture optimization knowledge and will put my free time into optimizing textures using your various tutorials.
[R-DEV]Rhino wrote: Also Valmont, Barrel has said quite a few times now he has no interest on working on PR's textures, which is a shame since we could use someone like him since we simply don't have enough people with the time to go through all these hundreds of assets we have and ensure they have their textures in the most optimized setup possible. But I can't blame him, it is very boring, tedious work with very little reward.
I know Barrel and the guy loves not only BF but PR as well. Probably he is just used to making all the calls when it comes to the way of doing things and has a hard time following guidelines but he will still be willing to do this experiment:

- Take PR's most resource consuming map and "optimize/improve" its textures (sky, ground and assets textures) the way Barrel wants/knows, then we check how many fps are down from the regular version or how "unstable" it becomes. If after all the changes the maps still exibits the same FPS, memory usage and stability then it gets implemented.

PS: Barrel already has most of BF2's original uncompressed textures so there shouldn't be any re-re-compression artifacts for him.

Recently he made a breaktrough in texture memory optimization by sharing weapon's textures and I am sure he could come with many such ideas for optimizations for PR without increasing its memory usage footprint.

If you want to I can talk to him so we can make this experiment :-o
Rabbit
Posts: 7818
Joined: 2006-12-17 15:14

Re: Large unoptimized textures

Post by Rabbit »

Not sure if it was ever added but the sheet for the citv on the m1a2 is 512x512, way to large for what it is.
Image

AfSoccer "I just don't see the natural talent."
Image
Post Reply

Return to “PR:BF2 Bugs”