mainstringargs
mainstringargs

Reputation: 14381

Java WorldWind Surface Shape causing Rendering Artifacts

I'm using NASA WorldWind for Java to display some surface shapes, and I am seeing some strange artifacting occurring. I am running this example to show what is happening: https://github.com/NASAWorldWind/WorldWindJava/blob/develop/src/gov/nasa/worldwindx/examples/SurfaceShapes.java. Its strange because it only seems to affect Surface Shapes and it is only happening on this hardware (This seems to run as expected on Windows). Here is my hardware information:

Red Hat Linux Workstation 6.10 (Santiago)

2.6.32-754.17.1.el6.x86_64

lscpi | grep ‘VGA’

VGA Compatible Controller:  Matrox Electronics Systems LTd. MGA G200eW WPCM450 (rev 0a) 

glxinfo | grep OpenGL

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits)
OpenGL version string: 2.1 Mesa 11.0.7
OpenGL shading language version string: 1.30
OpenGL extensions:

In this screenshot, I am zoomed out:

enter image description here

Now I zoom in, and the shapes are there, and they themselves look correct:

enter image description here

Now if I turn off the Surface Shapes layer, the globe itself renders correctly:

enter image description here

I have limited ability to upgrade the hardware or install drivers, so I'm hoping there is some JOGL/OpenGL primitive I can apply to fix the issue.

I'm thinking the problem is likely in:

https://github.com/nasa/World-Wind-Java/blob/master/WorldWind/src/gov/nasa/worldwind/render/AbstractSurfaceObject.java

or

https://github.com/nasa/World-Wind-Java/blob/master/WorldWind/src/gov/nasa/worldwind/render/SurfaceObjectTileBuilder.java

Has anyone seen this before or have any thoughts?

Upvotes: 1

Views: 715

Answers (1)

mainstringargs
mainstringargs

Reputation: 14381

I figured this out on my own with some luck. In SurfaceObjectTileBuilder.java setting useMipmaps to false seems to fix the issue:

/** Controls if mip-maps are generated for surface tile textures. */
protected boolean useMipmaps = true;

Its not obvious what the negative side effects are or if this has performance implications, but for the time being it gets rid of the artifacting.

Upvotes: 1

Related Questions