Skip to content

Frustum: IntersectsBox function can produce incorrect results #27756

@gkjohnson

Description

@gkjohnson

Description

The Frustum.intersectsBox function can produce a false positive in some cases where a box outside the frustum is large enough and positioned such that it crosses multiple frustum planes and therefore is not marked as separated by a single plane. This article suggests that checking whether the planes of the box separate the shapes will provide a more consistent result (though still not perfect in all cases). In order to do that we'd likely need to store or compute the edge points of the frustum.

This is related to 3DTilesRendererJS. We were using an OBB / Frustum intersect function based on the three.js AABB implementation and were seeing that a lot of tiles were visible despite being a large distance from the camera.

cc @WestLangley

Reproduction steps

Configure a box and frustum such that they produce the error case (See jsfiddle)

Code

See jsfiddle.

Live example

https://jsfiddle.net/89rtuaqp/2/

The box is colored red if it intersects the visualized camera frustum.

Screenshots

image

Version

161

Device

No response

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions