Detail Texturing / Mip Mapping bug

Started by
3 comments, last by haphazardlynamed 19 years, 8 months ago
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]
Advertisement
Try to build the mipmaps with gluBuild2DMipmap.Also,see if disabling the fog solves the problem.Fog and multitexture don't always work right.
using automatic mipmap generation would spoil the effect i want though
wouldnt it?
i manually tweak the mipmap colors to get them to fade out the texture over distance
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

http://people.ucsc.edu/~asue/lander/img.php?src=landerDetail3.jpg




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]
Fine
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

This topic is closed to new replies.

Advertisement