PDA

View Full Version : Texture mapping - How to deal with JPGs > 1024 x 1024



kodonnell
10-29-2001, 09:22 AM
I have a 1847 x 1748 JPG image of a map that I want to use as a texture on a quad. I'm using MFC and I know that windows won't handle anything > 1024 x 1024. Should I cut up the image into 4 textures and tile them on the quad? How would the mipmaps work? If I zoom in/out would the tiles match?

heiman
10-29-2001, 10:08 AM
The maximum texture size depends upon the OpenGL implementation. On my Win2K system, which uses a Wildcat 4110 card, the maximum texture size is 2048x2048 pixels. You can determine the maximum texture size for your implementation by passing GL_MAX_TEXTURE_SIZE into glGetIntegerv.

I have broken-up very large textures and applied them to "flat" quads. I do not see any separation between textures when I zoom in. So this method should work for flat quads. I'm not sure what you will see if you apply textures to curved surfaces.

Regards,
Scott

Rob The Bloke
10-30-2001, 03:20 AM
Originally posted by heiman:
I have broken-up very large textures and applied them to "flat" quads. I do not see any separation between textures when I zoom in.

Just make sure you have texturing set to clamp rather than repeat.... prevents texture blending errors at the seams

Omaha
10-31-2001, 04:54 PM
If you have a texture that's say, 512x512 but your max size is 256x256, obviously you have to break it into four quadrants. Now, when you are drawing your object, say, a single quad, do you have to enable multitexturing to apply all four to a single quad, or would you have to draw more than one quad overall?

Bob
11-01-2001, 12:49 AM
You will have to split the quad into four pieces aswell. You can do it with multitexturing over one single quad, but it won't be as easy as splitting the quad.