Jump to content
  • Advertisement
Sign in to follow this  

Detail Texturing / Mip Mapping bug

This topic is 5164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Have a look http://people.ucsc.edu/~asue/lander/img.php?src=landerDetail.jpg I just got multitexturing working so I put a detail texture on my terrain you can see it on the mountain to the left, just some random noise for now.. till i get complicated but look at the ugly dark redish polygons down it the distant valley Im using a mip map to fade out the detail texture as it gets farther away each mip map is a blurrier and whiter variant of the same noise texture it looks to me, like those red artifacts are coming from the very bottom mipmap level, since they only appear in the distance, and for polys that are seen nearly edge-on the bottom mipmap is just a single white pixel bmp the fact that it shows up red tho makes me suspiscious... id guess some bug in the loader im using NeHe's bmp loader code anyone have any ideas whats causing it? as long as im here..... what are some good detail textures? and can anyone explain all the different multitex combine/blend modes? maybe teach me how to do that one cool one with the rgb channels to define multiple detail tex's? ps - The blue/silver thing in the middle is a Lunar Lander, my art kinda sucks... [Edited by - haphazardlynamed on August 26, 2004 7:04:52 AM]

Share this post

Link to post
Share on other sites
Try to build the mipmaps with gluBuild2DMipmap.Also,see if disabling the fog solves the problem.Fog and multitexture don't always work right.

Share this post

Link to post
Share on other sites
tried disabling fog, that doesnt help, like i said i suspect something wierd about the mipmap

having no fog does make it a lot easier to see the problem though
have a closer look
here I have set the height to 0 on the terrain


switching to GL_NEAREST_MIPMAP_NEAREST to make the mipmap transisitons explicit
and changing the texture colors around
reaveals that the problem is in my second to last mipmap
the 2*2 map
the red squares are 'holes' in the map
regardelss of what color i make it, they always appear
loading a different 2*2 bmp for this level has the same problem

based on the way the holes are centered on the corners of verts
its like theres a problem with the pixel interpolation when its texturing......one of the 2 pixels is reading properly, the other is reading as 0 or something
only for the 2*2 map tho
something funky about that size....

anyone know more about biitmaps and their formats and potential ways this could happen?

[Edited by - haphazardlynamed on August 26, 2004 10:48:58 PM]

Share this post

Link to post
Share on other sites
I have a workaround for the time being

I use a fake large level0 bmp that looks like the 2*2 one
use gluBuild2dMipmaps to fill up all the mipmap levels (including the 2*2) with that image

then overwrite the rest of them with my propor handadjusted mipmaps

really bugs me tho
i get the feeling this will come back to haunt me at some point

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!