Tremulous Forum
Media => Mapping Center => Topic started by: Darth Futuza on October 01, 2008, 04:48:50 am
-
Alright, so when you want to use custom textures I understand that the pixel sizes need to be in powers of 2. What exactly does this mean? EX: 1^2 (1), 2^2 (4), 3^2 (9), 4^2 (16), 5^2 (25), 6^2 (36)...etc OR 2, 4, 6, 8, 10....etc OR 2, 4, 8, 16, 32, 64, OR something else?
Just looking for a little clarification on that, so far I've only modified already in game textures for Quake3 Style maps.
Thanks.
-
"Powers of two" means 2n where n is a positive integer.
Textures of arbitrary dimensions can be used, but this is definitely not recommended as you'll need weird scaling/stretching and alignment values.
-
21=2
22=4
23=8
24=16
25=32
26=64
27=128
28=256
29=512
210=1024
etc.....
basically it doubles every time. remember that textures don't always have to be square, stuff like 256x1024 is ok too.
-
Alright, thanks.
-
Psst: http://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt
-
Hmm, the renderer seems to rescale any textures to powers of two on loading, so:
- your graphics driver may be able to use non-power-of-two textures, but tremulous will never use them
- you can use non-power-of-two textures, but they may look crappy in the game because they are interpolated
-
Yes, Quake has done this since forever. It is most noticeable when first looking at Quake with it's software renderer, and then at GlQuake. You will notice some real ugly interpolation on for example monster skins.