Skip to content

Building the DAG #7

@adam-ce

Description

@adam-ce

The goal of this super item is to create the server side DAG structure, that is, a static directory structure serveable by Apache or similar. As input we have our base mesh (structura fundamentalis).

We need to do that in parallel, and streamable (can't load the whole 1TB mesh). Crucial for this is, that any operation has only local support. It also needs to be deterministic. What i mean by that: Say we have two processes, and both work on overlapping regions, they might produce overlapping artifacts (nodes). In that case the artifacts must be equal.

overview:
I believe, that this is possible by defining a shifting grid. E.g.: for zoom level 20 we use the same grid as structura fundamentalis. for zoom level 19 the grid is shifted by 1/2, so that simplification etc can cross the grid border. one cell on level 19 would cover 3*9 cells on level 20 (26 of them partly, 1 completely).

In each cell, we have many meshlets (clusters in nanite speech), stored in structure zoom/x/y/z/uuid.meshlet. uuid.meshlet is stored in the cell where it's centre lies. these meshlets store the geometrical information at that level. one could form a world wide mesh by selecting the desired zoom level where it exists, and the highest available where it doesn't.

build operations (adapted from nanite)
the build is conducted bottom up. on each level, we take the available geometry either from structura fundamentalis or from the lower level.

  • select meshlets by looking into the 27 cells of zoom+1, and choosing all where the centroid falls into the current cell.
  • group meshlets (clusters): we group the meshlets of one cell into M groups (disjoint geometry may produce more groups, e.g. two trees without trunks). For CPU based draw calls M will be 1.
  • merge triangles into M sets. we will have to match vertices by their coordinates. that's why i would be a fan of double coordinates to avoid numerical errors .
  • simplify
  • split into meshlets (clusters). we need to store the error of the group, as the same LOD decision must be taken for all meshlets in the group. the new meshlets are stored in the grid of the current zoom level (zoom/x/y/z/uuid.meshlet like above).

once all that is done, we can go on to create the next LOD (bottom up), repeating the process of grid shifting, splitting, simplification and so on.

this task does not include BVH building

sub tasks

  • lit reserach, go through Lukas' repo and find references / libs
  • decide on architecture, which part in c++, which in python

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Next

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions