IsraelAbebe / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Blender loader uses nearest filtering for textures #541

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load a blender model that uses textures

What is the expected output? What do you see instead?
It is expected that the model will use the "Trilinear" filtering mode, e.g. 
bilinear filtering and mipmapping. However, Blender forcefully sets the texture 
filtering modes to nearest and disables mipmapping!
This severely reduces performance for large textures due to lack of mipmapping, 
furthermore, the nearest filter looks ugly and unfit in a modern engine.

In the end of CombinedTexture.flatten():
"// the filters are required if generated textures are used because
// otherwise ugly lines appear between the mesh faces
resultTexture.setMagFilter(MagFilter.Nearest);
resultTexture.setMinFilter(MinFilter.NearestNoMipMaps);"

The comment mentions that "ugly lines" appear between the faces, this issue 
appears in blender as well and is caused by the margin property being too low, 
causing generated mipmaps to leak "blackness" onto parts of the texture.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 14 Sep 2012 at 4:33