Mip Map generation from PNG is adding black lines!


Created a j3m with the materials fine, however I’m now getting problems with what looks to be auto generated mip-maps.


When very close to the model there are no black lines, they only appear when distance between the camera and model increases.

My suspicion is that the black areas are caused by the mip maps generated from the normal map (PNG), but that’s a guess.

Question: How can I change / set the automatic MipMap generation to avoid this problem?

Thanks in advance :slight_smile:

1 Like

You cannot, this is a general problem with texture atlases/uv maps. The border areas get mixed into the actually colored areas when you move away and the mipmap blurring starts. In theory you see the whole texture mixed down to one grey pixel when you move away so far that the geometry is only a few pixels large. Most 3d editors can extend the borders of the texture parts on the atlas to avoid this issue at “normal” distances. If you paint it by hand, make sure you leave a small border with the same color.

I suppose you baked your normalmap. Increase Bake Margin to 20 pixels (in blender baking tool).

Working model with baked normal map and mipmaps can be found here: http://code.google.com/p/jme-glsl-shaders/downloads/list


Yes, this problem was due to the margin being too small when I generated the normal map in Blender3D.

Setting to margin of 20 (the same margin chosen during the UV mapping) and no more problems!