MipLevels = 13

Expanding and utilizing the engine via C++.
27 posts Page 2 of 3
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Apr 17, 2020 10:42 am
well each minimap is effectively 50% of the size of the texture that came before, so if 1 texture is 10Mb the next will be 5Mb and so on and so forth 13 times or in what you have set 15 times. That setting being changed is going to do the same thing for all of your textures that are png or jpg. The thing about dds is you have to define your own mipmaps but you can generate them in something like photoshop with the dds tool. You might find it being better performance especially for models with only one or 2 LOD to have fewer mipmaps
Duion
Posts: 1626
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Apr 17, 2020 12:47 pm
16384x256 is a really stupid dimension, why would anyone do that? I mean it is already heresy to use non 1:1 ration textures, but luckily Torque3D is able to tolerate those, but 16384x256 is probably stretching the limit too far.

A mipmap is the texture divided by 2 to create the next lower res version, now try dividing 256 by 2 over 13 times.

256, 128, 64, 32, 16, 8, 4, 2, 1

As you can see you cannot even divide those 13 times, it is already over at 8 and even if you could, it would make no sense at all, on the other hand the 16384 can and has to be divided a lot more.

My guess is the flight gear developers do not use mipmaps or they are amateurs that have no clue how to do things or there is a secret absurd reason why it has to be that way.

Textures should always be in .dds format, which already includes the pre-made mipmaps inside the image and improves performance by a lot and atlas textures should be in 1:1 ratio or 1:2.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Apr 17, 2020 12:58 pm
the way it works is once the Y gets to 1 the X keeps dividing by 2 until it too gets to 1 so whenever the Y gets to 1 i think 16384 will be at 128 then it will keep regressing to 64 x 1 - 32 x 1 etc until the image is at a 1x1

The texture size does seem strange to me, can you upload the texture somewhere? or even a screenshot of it?
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Apr 17, 2020 11:30 pm
Sure, here's the texture:

http://chriscalef.com/files/atlas_facades.png

Thanks for the help! They probably don't use mipmaps in flightgear, I'll find out though.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Apr 17, 2020 11:48 pm
i would guess that flight gears engine doesnt do mipmapping or at least is selective mip mapping, import that texture as a dds file with no mip maps, you shouldnt get any errors and it would have a smaller footprint on vram because of both that and the dxt3 compression
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Apr 17, 2020 11:55 pm
Okay, I found the DDS plugin for gimp and installed it, seems to work fine. Should I use compression on it? If so, which one?
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Apr 17, 2020 11:56 pm
And yeah, it looks like flightgear does do mipmapping, but apparently not with this texture, this is coming from sort of a side project within flightgear, called osm2city.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Apr 17, 2020 11:57 pm
well there are some black areas on that texture map so im guessing it has alpha? but it doesnt seem to have any fading alpha so no banding should occur from DXT3
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sat Apr 18, 2020 12:02 am
Oh, nice, that came out smaller than the original png file! :-)
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sat Apr 18, 2020 2:15 am
Oh, nice, that came out smaller than the original png file! :-)
blessed is the DDS and its dxt compression lol

The thing is DDS format actually goes direct to gpu, as far as i know png and jpeg and a load of other formats have to go through some form of progressive compression before being read into memory on a gpu so with them as dds you just saved your gpu from having to work another step harder :D
27 posts Page 2 of 3

Who is online

Users browsing this forum: No registered users and 2 guests