Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Field 3D



The 3d Fields are used to display the world 3D terrain. There are two ways to manage the terrain:
  • The Map3DFieldManager class which read all the SRTM directory and display its content
  • The Field Cell 3D Map Items which allows to specify a resolution and the part of world to display
The SRTM directory which will contain the tiles is specified through the maps3D.fieldDirectory configuration property. Both Map3D Field Manager and Map Item Field Cell 3D both use a Map3DLoader (which construct a SRTMPlot) to get a JavaFX 3D model from a SRTM file.

Using a Map3DFieldManager

The Map3DFieldManager class is not very evolved and uses a FIELD_RESOLUTION fix by default to 300. For yet, it's not active anymore because we used the Field Cell 3D Map Item. We can imagine active it again to load SRTM files according to movement of the camera and adapt resolution of titles according to camera distance.

Map3D Field Cell 3D

The Map3D Field Cell 3D mapItem defines a portion of the world map. You must specify in it the resolution wanted to display the map[1]
A Big resolution increases details but decrease performance. You'll should use a low resolution on part of map you don't really need or who have few elevations differences
.

If you use two map items who define or shared the same zone, they will be display twice. This maybe a point to correct to display only the best resolution asked of those shared zones. Yet, you have to cut in rectangles your zone to display to apply differents resolutions on each part. The zone will be then only displayed if a file data (as SRTM) defines the elevations in it.

Note: the Map Item Field Cell 3D has a imageFile parameter still unused yet in the renderer code, we still use the images files as specified above. It was meant to use custom images instead. Maybe the code need to adapt to the texture location when the parameter is not empty.

SRTM characteristics

See SRTM Usage in 3D Maps.

SRTM texture

A texture can be applied on the generated 3D Plot. Two types of texture can be used:
  • Image Texture
  • Palette Texture

Image Texture

An image can be applied on the field (like a satellit screenshot) to be rendered on the 3d plot generated. Simply put an image with the same name of your .zip (or .asc). Image must be in .png or .jpg. Notice that you have the possibility to display only a part of your SRTM file using a FieldCell3D map item. In this case, you will don't need to adapt your image to the display part, it's will automatically be cropped. You just need to defined your image for the full SRTM file.

Palette Texture

Also, there is an option to apply instead a colored palette according to Z elevations of your plot.

The Palette is defined by a simple screenshot image (each pixel match with a Z elevation) in the hard code or the maps3D project, but we can imagine many others ways to define it[2]
This a Work to do!
.

The following parameters are hard coded in the SrtmPlot class and match with the dimension of the following internal PNG file: paletteZoomWithMoreWhite.png which has a 6128 px width size (this must be the result of the max-min values):
  • min = -766: the minimum elevation
  • max = 5362: the maximum elevation
We can see that max - min = 6128, which corresponds to the width of the image. Sea (blue colors) are between the minimum value and 0.
      public class SrtmPlot extends Plot3D {
      private static int min = -766;
      private static int max = 5362;    
See also Maps3D internal properties for others parameters.

Notes

  1. ^ A Big resolution increases details but decrease performance. You'll should use a low resolution on part of map you don't really need or who have few elevations differences
  2. ^ This a Work to do!

See also


Categories: dev | maps3d | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence