Advertisement

texturing acting up

Started by August 27, 2003 07:58 PM
6 comments, last by heat511 21 years, 6 months ago
hi everyone and thanks in advance for the help im starting to make an engine for an fps and im running into some weird texturing problems just making the floor this first picture shows my program using linear texturing... it has a result similar to what i want as far as the middle is concerned but gets pretty weird off to the side [img]http://www.zyphon.com/rampantmjolnir/drew/sans_mip.jpg[/img] to try to fix this problem i tried using mipmapping... which gave me a better result sort of, but grey bleeds over onto the grout(if i spelled that right at all) for the tile. [img]http://www.zyphon.com/rampantmjolnir/drew/mip_problem.jpg[/img] im not really sure if this problem is just my graphics card or what... which is a geforce 4 mx 420 thanks again, drew [edited by - heat511 on August 27, 2003 9:05:13 PM]
that mipmapping thing isn''t a problem: thats what its supposed to do. It generates levels of detail for different distances from the camera and calls these textures as necessary. Low resolution ones are very blurry so the gray would bleed over I guess
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Advertisement
damn... i was hoping i did mipmapping wrong somehow... so what do you suggest to fix it?
its common for colors to blend/bleed in mipmaps especially at the extremes. But ur images seems to show that even the early stages (except the highest mipmap) already get blurred badly.

I''m not sure how much this will help, but u could try setting the texture blending mode to GL_LINEAR_MIPMAP_NEAREST. It disables bilinear filtering for mipmaps and MAY work, though if it does it may end up looking a little pixellated.

Another alternative is to do your own mipmaps instead of letting openGL automate it for you. Its because opengl generates the mipmaps based on the initial, largest mipmap. So everytime it reduces the image size for the following mipmap, distortion occurs in the output hence the blurring. If you were to do it manually, i mean that u create actual sharp textures of differing levels externally and load them one-by-one as mipmap textures. it is tedious but it may work. do tell
- To learn, we share... Give some to take some -
actually i already had mipmap_nearest what''s the syntax for non-nearest mipmapping maybe that''ll work better...

what im kinda thinking that may work (if this is possible anyway) is using normal old linear texturing for my close texturing since it looks fine, then mipmapping at distance.... altho im not sure how i would do this or if it would look any better

i would try manually mipmapping w/ textures but i can''t even imagine how i would get it to tile (no pun intended) correctly
opengl automatically tiles the texture.. the lower resolution copies of the mipmapped texture are still scaled to be the same size, so as long as you have REPEAT enabled (as opposed to CLAMP_TO_EDGE or something), which is default, it will tile just fine. Err on second thought I don't think it does automatically tile. Uh I'll post the statement to enable tiling in a few hours

[edited by - uber_n00b on August 28, 2003 9:13:03 AM]
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Advertisement
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

you need these two lines when building textures to have them tile
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
thanks ubernoob, that was exactly what i needed.... once i get the ''game'' to a more presentable level ill post it

This topic is closed to new replies.

Advertisement