Non square textures?

Started by
12 comments, last by WoolyUK 20 years, 8 months ago
hi guys Im making a sports game, and am trying to make the pitch texture. However, the pitch isn''t square, its 5x7 units... How is best to design the pitch as a texture, because you can only have square textures i believe? 128x128 etc? I tried making the pitch as an image 500x700 pixels then resizing it to 512x512 and applying it as the pitch texture in opengl, but it looked to distorted and low quality. Any suggestions please? Thanks for any comments! Adam
Advertisement
Couldn''t you split it into several equal segments and make several squares for the pitch? Or two triangles?
Or...make the texture bigger than the pitch, and let it be stretched down into 500x700? That is..if opengl does that.
lol
No it doesn''t have to be a square... The dimensions just have to be a power of two. You might wanna try resizing it to 512*1024.
ASCII stupid question, get a stupid ANSI
Thanks for replies

I tried making it 512*1024 in paint shop pro then applying it to the 5x7 pitch in opengl and it still looks a bit distorted

It''s slightly better tho I think

Surely theres a way to get it perfect quality?

Thanks again,
Adam
You could make your pitch say, 500x600, then make a 512x512 texture, it''d look fairly close. As far as I understand you wont get a perfect texture in a 500x700 area, unless you split it into smaller textures.
lol
Have you tried using gluBuild2DMipmaps yet? That will auto-scale your image to powers of two and might make it look better, depending on the situation. Also, you could try playing around with the settings for MAG_FILTER and MIN_FILTER.
Try some of the loading code at www.gametutorials.com you can use images of all sizes.
as far as i know all geforces support NV_texture_rectangle, and all radeons support EXT_texture_rectangle (wich in the end are the same extensions and soon get mixed/fixed together into the ARB :D), so you could use them, depending on your minimum hw..

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

NV_texture_rectangle or EXT_texture_rectangle may work here!

BTW, does anyone know whats up with these ARB_texture_non_power_of_two extension???
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
yep, its (all guessed only:D) about the same as texture_rectangle.

but:
texcoords are between 0 and 1 again

it supports 1d,2d,3d textures, and possibly even cubemaps..

would be a too proprietary extension.. arb always tries to find a general solution, and only 2d textures, with changed coordinate-ranges and no mipmapping and no coordrepeating and all that definitely is not general..

how well it will be supported?.. dunno yet.. have to check dx9 specs what is supported there, and how much of it is supported on my card for example..

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement