Skip to content

BasicTerrain Sector calculation issue (performance issue) #216

@EMaksymenko

Description

@EMaksymenko

Something wrong with terrain tessellation.

Each time, when terrain level of details changed by user, BasicTessellator adds some top level tiles to current tiles collection by mistake and cause situation, when BasicTerrain contains wrong Sector value (e.g. half globe -90 to 90, even if you are looking on a small terrain part from small altitude). This situation disappears after all detailed tiles become loaded and than top level tiles start to be ignored.

Wrong sector value cause to render useless drawables, which are based on terrain sector clipping.

WWJ version does not have this issue and always return correct dc.getViewingSector size. But WWA returns -90 to 90 degree sector on every details change.

To reproduce this place break point in BasicTessellator loop on top level tiles:

        // Subdivide the top level tiles until the desired resolution is achieved in each part of the scene.
        for (int idx = 0, len = this.topLevelTiles.size(); idx < len; idx++) {
            this.addTileOrDescendants(rc, (TerrainTile) this.topLevelTiles.get(idx));
        }

and check what tiles to be added into collection.

You will find that sometimes condition tile.mustSubdivide(rc, this.detailControl) for several top level tiles return false and this tile is added to the tile list together with detailed tiles subdivided from other top level tiles. This top level tile will union with terrain Sector and override its values by -90 to 90 degrees even if you are looking very close to the ground.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions