

Joined: Tue Apr 04, 2017 11:44 am

Posts: 236





greetz



PS: take your own example:

Hairless_Wookiee wrote: ...

Size X : 1024 (128)

Size Y : 1024 (128)

...

Mip Start : 3

...

Mip Sizes :

(0) -> 1024x1024 = 0x100000 bytes

(1) -> 512x512 = 0x40000 bytes

(2) -> 256x256 = 0x10000 bytes

(3) -> 128x128 = 0x4000 bytes

(4) -> 64x64 = 0x1000 bytes

(5) -> 32x32 = 0x400 bytes

(6) -> 16x16 = 0x100 bytes

(7) -> 8x8 = 0x40 bytes

(8) -> 4x4 = 0x10 bytes

(9) -> 2x2 = 0x10 bytes

(10) -> 1x1 = 0x10 bytes

= 0x155570 bytes



officially its a 1024x1024 texture, but it starts officially at mip 3, from the list below you can see, thats actually 128x128. now if you add all sizes from 10 to including 3, it >should< match the amount of data in the chunk, but it doesnt has to. it can have all mips, then the size would have to match 0x155570, it could also only have data for 64x64 and smaller, thats why you only know the real size after export. I could display the guessed mip start, but you can already see if from the preview, which is always the biggest resolution available you really dont like to read my posts, do you? that info you see there, is what is STORED in the res data, I just display whats stored as META DATA. it has a variable called firstMip which already shows you in the brackets the real size it would expect (because it may start with mip 1,2,3... and so on, instead of 0) and I additionally check for the real size before exporting. just sum the mip sizes up and compare at which level you would reach the amount of data in the chunk. also mip = resolution. if the original size was 2048x2048, it makes a 2048x2048mip, a 1024x1024mip, a 512x512mip, a 256x256mip AND SO ON. now they stored not the biggest mip plus all smaller ones, but started with a smaller one instead. so even if the meta data SAYS its a 2048x2048 texture and it SAYS it starts with mip 2 (which would be 512x512), doesnt mean there is that much data in the chunk! if there is only data for 256x256 and smaller, I can not magically find data that does not exist! Games are cooked! That means resolutions get downgraded to allow portability and what not, so on compiling of the resulting game, the engine decided which sizes it actually wants to store (no need for a 2048er texture, when the ingame object at best gets a handful rendered pixels on screen)greetzPS: take your own example:officially its a 1024x1024 texture, but it starts officially at mip 3, from the list below you can see, thats actually 128x128. now if you add all sizes from 10 to including 3, it >should< match the amount of data in the chunk, but it doesnt has to. it can have all mips, then the size would have to match 0x155570, it could also only have data for 64x64 and smaller, thats why you only know the real size after export. I could display the guessed mip start, but you can already see if from the preview, which is always the biggest resolution available



