Not needing power of 2 textures

What needs to be done to remove the power of two limitation on textures? Some kind of automatic rescaling of the pixles when a bad size is detected? Is this a difficult task? Ideas?

Resizing the texture could be the way to go, but there are some opengl extensions that permit non-power of two textures… Can’t remember there names, but looking at the LWJGL doc you should be able to find them :slight_smile:



Chman

I have answered with a artist type ot tut to the md2 problem of this, to sonic.



It’s also needed a resize of UVs. In md2 case, NST allows doing at a time. Though usually will require some retouch later on on the texture for a perfect job.



As a resize of a texture: is big—> small, with need some sharpen filter. If small—> big, also, but mor elikely add some detail more now u have more pixels :wink:



powers of 2 is more standard, though…



In some cases, non powers of two helps saving a lot of disk space and allow certain tricks, but like all, I’m all for compatibility with all cards…

Hi all,



on this subject i have a question :

does the power of two is needed when rendered in ortho mode ?

because i’ve made a try with 10*100 px texture in ortho mode and i can’t see any artifact.



Adenthar.

I think that non power of 2 textures work on some computers but not others but I can say for shore.

badmi , I think it depends on 3d cards, but neither I am sure…

The solution of many 3D cards is to place the image into a 2^n buffer, filling the missing values with black. Which is why you often times end up with a black banding. Some cards are able to handle the image as is and require no buffering. So might stretch it.



Stretching the image may sound like a good idea, but you might end up making the image much larger than you want. For example, if you have an image that’s 150x150 pixels, the next appropriate 2^n is 256x256, substantially larger in memory.



Is this something that needs fixing? All through out my 3D experience, I’ve always known (after my first attempt and texture mapping) that staying with 2^n textures is the way to go.

At the minimum, can we add a “warning” when a texture that’s not a power of two is loaded? That could solve a lot of FAQ.

as an artist, I always use power of 2 textures.



Most tools are prepared more for that…



btw, I’ve heard some ps1 devers used non power of two for optimizing (I indeed did some tasks for ps1, it’s weird…we found only 800ks or so for the whole textures thing at a time in an scenery…)



Yep, maybe just an alert.