World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 02-04-2010, 10:28 AM   #1
anaxa_gore
Member
 
Join Date: Feb 2008
Posts: 34
anaxa_gore is on a distinguished road
Default 3D rendering problems (holes)

Hi,

I am using the BIL/DDS module for geoserver to produce bil files for my WWJ client. The client is getting the good elevations information, but i get a really bad rendering. As said in the title, there are a lot of holes in the map. I join a screenshot to illustrate the problem.

If somebody gets an idea...
Thanks,
Thomas
Attached Images
File Type: png dted_holes.png (472.6 KB, 248 views)
anaxa_gore is offline   Reply With Quote
Old 02-05-2010, 01:11 PM   #2
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Can you be more specific as to what we are seeing in your screenshot - which layers are active for instance. Are you using one of the SDK example app or a more elaborate application of yours?
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 02-07-2010, 07:46 PM   #3
m_k
Bored Explorer
 
m_k's Avatar
 
Join Date: Nov 2004
Location: Warsaw, Poland
Posts: 1,808
m_k is an unknown quantity at this point
Default

I think that you can get rid of those holes by enabling tiles struts or skirts (or whatever they're called in WWJ)... but don't ask me how
The missing tile at the bottom is another issue.
__________________
Hot stuff: FAQ, forum search, DirectX, .NET, Video Card Compatibility list
m_k is offline   Reply With Quote
Old 02-08-2010, 12:16 AM   #4
damienpp
Member
 
Join Date: Sep 2009
Location: Adelaide, Australia
Posts: 35
damienpp is on a distinguished road
Default

I remember having similar problems where my elevation data wasn't interpolated or aligned properly. Also we had trouble when the tiles weren't a certain size (possibly 150x150, but I don't remember for sure).
damienpp is offline   Reply With Quote
Old 02-08-2010, 10:02 AM   #5
Peter Skvarenina
Junior Member
 
Join Date: Jul 2009
Location: Frankfurt am Main
Posts: 15
Peter Skvarenina is on a distinguished road
Default

Hi Thomas,

I had exactly the same problems when trying to use custom elevation and had solved them as you can see on the following thread:
http://forum.worldwindcentral.com/sh...ad.php?t=24024

I will give you some tips that helped me:

First, the holes on the tile borders might be related to the possibility that your tile borders aren't aligned properly - I had similar effects when the first/last column/row of surrounding tiles didn't match. They have to be the same.

Second, the disappearing tiles close to the viewpoint might be related to two things - first you might not have correct numbers of elevation levels set in your elevation model configuration file and/or your dataset has uneven number of levels on different parts of the world. Set it exactly to the number of levels you have - if you set it to a larger number the elevation lookup would fail and you would end-up with a flat tile. If the number of levels is lower in certain parts of the world, you would have to write your own graceful failover function that looks up elevation from levels above. The other reason for this problem might be bad matching of elevation extremes values to your tiling schema, forcing tile to be removed when computing set of visible tiles. You can try to work around this problem by redefining a few methods in the BasicElevationModel that return elevation extremes to some pre-defined range such as [-11000, 9000]. Also, another possibility is incorrect near plane computation for view frustum occurring in the BasicView class - this would however point to wrong elevation look-up (at least that was in my case).

Also, by default World Wind interpolates elevations of tiles to a grid of 23x23 points per tile. This explains why there are some strange artifacts when zooming in/out especially in areas with concentrated large elevation changes.

I was using completely non-standard size 129x129 as well as a different tiling schema (top level tile of 180x180 degrees, quadtree)

Hope some of these ideas would help you solve these problems!
Peter
Peter Skvarenina is offline   Reply With Quote
Old 02-09-2010, 01:20 PM   #6
anaxa_gore
Member
 
Join Date: Feb 2008
Posts: 34
anaxa_gore is on a distinguished road
Default

Hi everybody and thanks for your answers,

Patrick, I am not using the SDK example.
In the screenshot, there is the BMNGOneImageLayer and a VMAP layer representing the terrain elevation lines. The VMAP layer is served through the Geoserver WMS, using the DDS plugin developped by what_nick (working very well...thanks !).
The elevation model is created from a geoserver WMS layer. This layer is generated from DTED data. This data has been converted into geotiff, then I created a pyramid from the generated tiff files. So I am sure that the first/last column/row of surrounding tiles match.

I am creating the elevation model in WorldWind this way :

Code:
av.setValue(AVKey.PIXEL_TYPE, AVKey.INT16);
av.setValue(AVKey.DATA_TYPE, AVKey.INT16);
av.setValue(AVKey.BYTE_ORDER, AVKey.BIG_ENDIAN);
av.setValue(AVKey.IMAGE_FORMAT, "application/bil16");

av.setValue(AVKey.NUM_LEVELS, 10);
av.setValue(AVKey.TILE_WIDTH, 150);
av.setValue(AVKey.TILE_HEIGHT, 150);

ElevationModel elevationModel = (ElevationModel) factoryElevation.createFromDataConfig(configuration, av);

getWwd().getSceneController().setVerticalExaggeration(1.5);
getWwd().getModel().getGlobe().setElevationModel(elevationModel);
I tried to change the NUM_LEVELS to 1, and I don't get any hole on the map, but the data resolution is then really bad ! 10 is the number of pyramid levels on the server.

When I launch my WW application, The cache folder is created and I get the attached XML file which describe the layer. Immediatly, I get the "getLayerExtremeElevations: GRAVE: Error parsing value", probably due to the fact that the
Code:
<ExtremeElevations/>
is not set... Is that important ?

Another thing : I can't understand the LEVEL_ZERO_TILE_DELTA...

If somebody gets an idea, il will be great !
Thanks again for your help,
Thomas

PS : I hope I give enough information...?
Attached Files
File Type: txt MOUA_dted_1~dted_1.xml.txt (1.2 KB, 95 views)
anaxa_gore is offline   Reply With Quote
Old 02-09-2010, 02:35 PM   #7
anaxa_gore
Member
 
Join Date: Feb 2008
Posts: 34
anaxa_gore is on a distinguished road
Default

Ok so, I finally understood what Peter meant when he said :
"You can try to work around this problem by redefining a few methods in the BasicElevationModel that return elevation extremes to some pre-defined range such as [-11000, 9000]".
In fact, I didn't want to redefine any method so I didn't use this first.
But instead of redefining some methods, it seems that adding the following two lines when creating the elevation model do the same !

Code:
av.setValue(AVKey.ELEVATION_MIN, -11000d);
av.setValue(AVKey.ELEVATION_MAX, 9000d);
So now it seems to work fine !
I am going to try with other datasets to validate that everything is working !
Thanks again,
Thomas
anaxa_gore is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Texture rendering problems related to mouse movement Unregistered Development Help 2 10-31-2009 12:56 AM
Rendering 3D Vector Data Using Shadow Volumes nigel_ht Development Help 1 10-23-2009 04:48 AM
Rendering a custom 3D elevation layer with an own algorithm Peter Skvarenina Development Help 2 07-24-2009 06:44 PM
Problems Rendering a Sphere muggels_mark Development Help 2 07-16-2008 08:09 PM
Rendering different SurfacePolylines with the same thickness fabrizio.giudici Development Help 3 08-30-2007 12:06 PM


All times are GMT +1. The time now is 05:33 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.