Skip to content

Plugins: Consider plugin that uses / enables use of BatchedMesh  #417

@gkjohnson

Description

@gkjohnson

Provide a variant of 3d tiles renderer that uses three.js' BatchedMesh to reduce draw calls. Related to gkjohnson/batched-3d-tiles-demo.

Useful for things like google earth and mars tiles.

For an initial set of requirements:

  • Requires all geometry to be of a similar size or maximum-size.
  • Requires that all geometry use a similar size of texture and at most one texture.
  • Requires that all tiles must use a common tile material / shader.

Process:

  • On geometry load copy the texture into a texture array and geometry into the BatchedMesh in a pre-determined buffer size along with the transform.
  • Discard the original geometry on load and store the BatchedMesh and texture index.
  • If we find a mesh that is too large to fit in the pre-allocated buffer length then create a new BatchedMesh.
    • instead we can just ask for a larger buffer allocation than is typical and optimize / expand later if we reach capacity
  • Implement a custom traversal algorithm for raycasting against batched mesh.
    • Specifically we'll want to support individually intersecting each tile from within the batched mesh to take advantage of the 3d tiles hierarchy

Open Questions:

  • Interoperability with other plugins (custom fade shader, etc)?
    • Unsupported for now
  • What happens if something like bvh is used under the hood?
    • Separate plugin required

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions