Home Technical Talk

Max strange uv bug

Hello everyone, im having this strange bug in my models.. first a screenshot:

bug-1.jpg

Now you see the pixel wide transparency, well thats there because the object has a texture with one side transparent and the other opaque.. so max is basically rounding the uv over 1 and below 0 to take it to the next tile, even though the uvs are snapped and set at 0.0 and 1.0.. anyone knows why this might be happening?

btw there are two objects, one above the seam and the one with the seam..

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Could be a couple of things causing this:

    A) Mip-mapping (or texture filtering) means your texture edges are being blended across the edges. This happens by default on all textures but you can turn it off on a per-texture basis in the material settings. Just change the "filter" type to "linear" (i think it's quadratic by default, in the material editor when you have the bitmap selected).
    This won't make a difference in the viewport but it will in renders.

    B) I seem to recall max has a bug related to alpha channels as transparency - it seems to add an incorrect pixel row at one edge for some reason. If your transparency is being saved as an alpha channel in the diffuse image, instead try saving the alpha as a separate image on its own and just use the RGB channels as transparency instead of the alpha.
  • Rapchik
    Options
    Offline / Send Message
    yea decreasing the sampling makes the seam just a pixel thin, but its not the solution.. the thing is i export these from max to a game i am working on and the only data i am exporting are the vertices and uv coordinates.. and i still see the same bug in my game.. if i snap the uvs one pixel ahead it works fine.. but if i snap the uvs to 0 and 1 it doesnt.. any ideas what might be causing the uvs to go off i pixel? i checked the texture and it doesnt seem to have a line.. and they are different objects but i have snapped all the vertices..
  • Eric Chadwick
    Options
    Offline / Send Message
    Then this is likely caused by texture filtering... it's sampling from the other side of the texture. Three solutions...
    1. Turn off texture filtering (no blurriness, big blocky pixels instead! yuck)
    2. Shrink the UVs a little.
    3. Change the shader UVs to use Clamp mode instead of Wrap mode (so it samples the same side of the texture instead of tiling). Not possible in Max unless you make your own FX shader.
Sign In or Register to comment.