简体   繁体   English

导致渲染伪影的 Java WorldWind 表面形状

[英]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.我正在使用 NASA WorldWind for Java 来显示一些表面形状,我看到一些奇怪的伪影发生。 I am running this example to show what is happening: https://github.com/NASAWorldWind/WorldWindJava/blob/develop/src/gov/nasa/worldwindx/examples/SurfaceShapes.java .我正在运行这个例子来展示正在发生的事情: https : //github.com/NASAWorldWind/WorldWindJava/blob/develop/src/gov/nasa/worldwindx/examples/Sur​​faceShapes.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).这很奇怪,因为它似乎只影响表面形状,而且只发生在这个硬件上(这似乎在 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:在此屏幕截图中,我缩小了:

在此处输入图片说明

Now I zoom in, and the shapes are there, and they themselves look correct:现在我放大,形状就在那里,它们本身看起来是正确的:

在此处输入图片说明

Now if I turn off the Surface Shapes layer, the globe itself renders correctly:现在,如果我关闭 Surface Shapes 图层,地球本身会正确呈现:

在此处输入图片说明

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.我升级硬件或安装驱动程序的能力有限,所以我希望可以应用一些 JOGL/OpenGL 原语来解决这个问题。

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 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 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?有没有人见过这个或有任何想法?

I figured this out on my own with some luck.我靠运气自己想通了这一点。 In SurfaceObjectTileBuilder.java setting useMipmaps to false seems to fix the issue:SurfaceObjectTileBuilder.java 中将 useMipmaps设置为 false 似乎解决了这个问题:

/** 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.负面影响是什么或者这是否对性能有影响尚不明显,但目前它摆脱了伪影。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM