Skip to main content
Skip table of contents

Understanding Surfaces in Fledermaus 8

In FM7 a surface consisted of 2 components, a grid of height values and a grid of color values which were encoded and stored as 16-bit precision numbers. Generally, surfaces had one color value for each height value but we also support the possibility of more (or less) colors per height value – for example when draping a high-resolution image on a surface for example. Colors are stored as 32-bit RGBA values. Thus, for a one height to one color pixel surface the total storage requirement for the surface is 6 bytes per cell times the width times the height.  

Benefits: 

  • Fairly compact storage of surface data. 
  • Fast and simple to load and save. 
  • Color pixels can be stored at a different resolution than the height data (for texture mapped draped imagery as an example). 

  

Limitations: 

  • Limited precision of the height data. 
  • Once a surface was created its size was fixed. (ie. Growing or shrinking its bounds meant creating a new surface) 
  • Not ideal for streaming directly from disk especially as the grid sizes increase. 
  • Maximum size of the surface limited to 65535 x 65535 cells. 

  

  

Fledermaus 8 has a considerably more complex structure for representing a grid that has many advantages but also some different limitations. FM8 utilizes QPS’s grid5 technology for the basic grid storage. A key difference from FM7 is that the grid format is highly extensible meaning it can grow and shrink in size and is designed to support direct streaming from disk for extremely large surfaces. As such it has built in level of detail storage to support these operations. Furthermore, the actual storage structure of each cell is configurable and we support a number of predefined storage profiles (collections of data we store). Compared to Fledermaus 7 we often store quite a bit more information per cell which means a similar surface in FM8 is likely considerably larger depending on the storage profile used. Grid5 based surfaces also support arbitrary layers where each layer can have its own storage profile although all layers must share the same core cell size. In addition, FM8 surfaces support a special texture layer which is composed of RGBA cells and can have a different resolution then the main grid’s resolution.  

Benefits: 

The surface is extensible in numerous ways 

  • It can grow and/or shrink in area 
  • New surface layers can be added or existing ones removed 
  • Each layer can have a different configuration. 
  • A texture map image layer can be associated with the surface with a separate resolution 
  • The surface is constructed in a manner depending on the cell profile that it can work as a survey surface with new point files being added to update the surface over time. 
  • The surface is optimized for streaming and has multiple levels of detail. 
  • The surface can support extremely large coverage – at least 200k x 200k cells. 
  • The surface stores heights as high precision doubles (or in a manner high precision doubles can be computed). 

Limitations: 

  • Compared to an FM7 surface even the most basic configuration stores more data per cell. At a minimum it stores a height (8 byte double), a set of flags (2 bytes), and a lighting component (4 bytes) so 14 bytes per cell compared to 6 bytes for a FM7 surface. More sophisticated profiles go up to 64 bytes per cell. 
  • The extensible nature of the surface adds additional I/O complexity makes the surface slower to read and write then the FM7 surfaces. 
  • The full suite of level of detail surfaces effectively doubles the size of the surface compared to not storing any LOD variants. 

 

Basically, this means that compared to version 7, most FM 8 surfaces are considerably larger on disk to give the flexibility and streaming benefits.  

 

Fledermaus 8 Surface Grid Profiles 

Configuration Name 

Contents/Cell 

On Disk Size 

Suitable For 

Minimum 

Flags, sigmax, lighting 

2 + 8 + 4 = 14 bytes 

Static Grid 

Simple 

Flags, sigmax, lighting, count 

14 + 4 = 18 bytes 

Static Grid + Density

Standard 

Flags, sigmax, sigmax2, lighting, count 

18 + 8 = 26 bytes 

Static Grid, Acquisition 

Extended 

Flags, sigmax, sigmax2, lighting, count, min, max, gridxmin/max,  gridymin/max 

26 + 4 + 4 + 4*1 = 38 bytes 

Static Grid, Acquisition 

Complete 

Flags, sigmax, sigmax2, lighting, count, min,  max,  gridxmin/max,  gridymin/max, time, quality 

38 + 8 + 1 = 47 bytes 

Static Grid, Acquisition, Dynamic Surface 1.0, ENC Production 

Dynamic_core 

Flags, reject, sigmax, sigmax2, lighting, count, min, max, gridmin-max 

38 + 4 = 42 bytes 

Static Grid, Acquisition, Dynamic Surface 2.0 

 

Dynamic_cube 

Dynamic_core + numhypo, selectedHypo, hypoCount, hypoStrength, cubeDepth, hypoUncertainty 

42 + 4 + 2 + 4 + 4 + 4 + 4 = 64 bytes 

Static Grid, Acquisition, Dynamic Surface 2.0 with Cube 

 

Imagery_rgba 

Flags, RGBA color pixel 

2 + 4 = 6 bytes 

Color Imagery (RGBA) 

The most basic “Minimum” configuration contains three elements.  

  1. A set of up to 16 flags – These flags are associated with a surface cell to provide items like cell validity, is it interpolated, and various other characterization flags.  
  1. A z value stored directly as double precision floating point number. 
  1. A lighting value (Either a normal or soft shadow algorithm parameters)  

Most of the other profiles are built on the basic one and add additional capability at the cost of increasing file size. Instead of storing the surface z values directly the Simple configuration store a sum of all the samples added to the cell and a count. The actual z value can be computed when needed. The standard configuration adds a sum squared value allows the computation of standard deviation. The dynamic core and dynamic cube configurations are what are used for the dynamic surface storage from Qinsy and Qimera and store additional information to help process survey grids. The Imagery_rgba configuration is used to store color imagery data.  

How are version 7 surfaces handled 

Other than internal structure differences, the largest difference between version 7 and 8 is that in version 8 we do not directly store the resulting color of the surface to be displayed rather we store shading information that allows us to determine the final color as the surface is streamed to the display. When a version 7 .sd file is loaded it is upgraded to a version 8 .surface file. Internally it is re-shaded based on information in the version 7 file. However, this mean’t that the resulting colors may not exactly match the original version 7 file colors. Thus, to make sure older surfaces do not visually change when simply loaded into FM8, the original colors are added as an additional texture (imagery) layer to the surface and the default options are set to show the textured colors. While this preserves the exact look and feel of a surface going from version 7 to 8 it does add extra storage and it is important to remember you are looking at the texture. If you are looking at a surfaces texture and you do operations like changing of a color map or color map range and expect to see the look of the surface change you will not until you turn off the texture. When you select a surface, the Drapped Imagery drop down menu controls the display of any color imagery attached to the surface. It always defaults to Visible, meaning that the texture should be shown by default if a texture is present in the file. If you change it to Hidden then you will see the surface shaded based on the selected color map and shading options. The Visible with Shading option shows the texture but additionally applies the shading to the surface to illumination the texture based on the shading options set. 

 

If you change shading options, color maps, color map ranges, etc. And don’t seem to see a visible change then very likely you have the Draped Imagery option set to Visible and the surface has attached imagery. The downside of the having an attached image is that makes the file that much larger adding 6 bytes per pixel for the storage. When upgrading fm7 surfaces we always create a texture layer to make it look identical by default. However, if this is not required you can remove the texture by right clicking and selecting the <currently non-existant option to be there for v8.4.0>. This will make the resulting surface smaller and faster to render because there is less work to do. 

 

 Creating Surfaces in FM8 

Compared to FM7 there are more options when making a new surface in FM8. The Gridding Type dropdown menu controls the type of surface and algorithm used to make it.  

  

If you want to create a surface that matches FM7 use the Weighted Moving Average (height only) option. This produces a surface with the minimum profile using the FM7 WMA algorithm.  

 

The Height Only option also produces a minimum profile surface but averages only the points that fall within each cell. The Height and Bin Statistics produces a large surface with the Dynamic_Core profile so you get shallow, average, and deep surfaces along with counts, and std. Deviation. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.