MemoryEfficient Sliding Window Progressive Meshes Pavlo Turchyn University

  • Slides: 22
Download presentation
Memory-Efficient Sliding Window Progressive Meshes Pavlo Turchyn University of Jyvaskyla

Memory-Efficient Sliding Window Progressive Meshes Pavlo Turchyn University of Jyvaskyla

Previous work • Progressive mesh is a data structure used to encode a large

Previous work • Progressive mesh is a data structure used to encode a large number of mesh approximations – – prog. mesh is similar to undo/redo mechanism of a text editor undo/redo keeps record of modifications done on text prog. mesh keeps record of modifications done on mesh by performing a certain number of modifications, one obtains the mesh with required number of triangles • Progressive meshes are problematic for GPUs – mesh modifications must be performed on CPU – each mesh instance requires updating its mesh data – then the updated data has to be transferred from CPU to GPU • Sliding window progressive mesh (SWPM) is a solution for view-independent LOD

Previous work Vertex split Half-edge collapse • Progressive mesh contains information what to do

Previous work Vertex split Half-edge collapse • Progressive mesh contains information what to do – which edge to collapse, which vertex is split • SWPM contains triangulations – these “precomputed” triangulations can be stored in static on-GPU memory buffers

Definitions Half-edge collapse “Patch” “Simplified patch” • Patch is a set of triangles •

Definitions Half-edge collapse “Patch” “Simplified patch” • Patch is a set of triangles • … that includes all triangles incident to a given vertex – this vertex is called inner vertex • Simplified patch is a patch after applying simplification operator that removes the inner vertex

SWPM simplification algorithm

SWPM simplification algorithm

SWPM simplification algorithm • Step 1: find the set of inner vertices – it

SWPM simplification algorithm • Step 1: find the set of inner vertices – it follows from the patch definition that the inner vertices belong to an independent set

SWPM simplification algorithm P 4 P 2 P 3 P 9 P 5 P

SWPM simplification algorithm P 4 P 2 P 3 P 9 P 5 P 10 P 6 P 1 P 8 P 7 P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 • Step 1: find the set of inner vertices • Step 2: construct the patches – criterion: a patch should not contain topologically isolated triangles – all patches (denoted P 1, . . . , P 10 in our example) are stored in a list

SWPM simplification algorithm Q 4 Q 2 Q 3 Q 9 Q 5 Q

SWPM simplification algorithm Q 4 Q 2 Q 3 Q 9 Q 5 Q 10 Q 6 Q 1 Q 8 Q 7 P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Q 8 Q 9 Q 10 • Step 1: find the set of inner vertices • Step 2: construct the patches around inner vertices • Step 3: simplify the patches to obtain “simplified patches” – all inner vertices are removed – the simplified patches (denoted Q 1, . . . , Q 10) are appended to the list of patches

SWPM simplification algorithm P 1 P 2 P 3 P 4 P 5 P

SWPM simplification algorithm P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Q 8 Q 9 Q 10 • This memory buffer is the main SWPM data structure • Required number of triangles is obtained by choosing the corresponding subsequence of elements (“window”) – window size is 10 elements in our example

SWPM index dataset size • SWPM buffer holds triangles as triples of indices •

SWPM index dataset size • SWPM buffer holds triangles as triples of indices • Such an index buffer consumes 4 -6 times more memory than the index buffer of the initial mesh – often SWPM index buffer is bigger than vertex buffer of the mesh • – C is the amount of memory for storing a single triangle – is the number of triangles in the buffer • In order to minimize the buffer size, we have to minimize • Minimal is bounded – where |T 0| denotes the number of triangles in the initial mesh

SWPM index dataset size • Under certain assumptions, the following estimate holds – is

SWPM index dataset size • Under certain assumptions, the following estimate holds – is the average degree (valence) of the inner vertices – is a mesh-dependent parameter that reflects triangulation structure Feasible triangles quality

Mesh connectivity optimization • Idea: change mesh connectivity in order to reduce 16% dataset

Mesh connectivity optimization • Idea: change mesh connectivity in order to reduce 16% dataset reduction

Clustered patches B 0 : P 1 P 2 P 3 P 4 P

Clustered patches B 0 : P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Q 8 Q 9 Q 10 B 1 : • This is the simplest mesh we can render from the buffer B 0 – But what if we need even simpler mesh? • Using this mesh as the initial one, we construct another SWPM buffer B 1

Clustered patches Q 4 Q 2 Q 3 Q 9 Q 5 Q 10

Clustered patches Q 4 Q 2 Q 3 Q 9 Q 5 Q 10 Q 6 Q 1 Q 8 Q 7 Q 22 Q 33 Q 44 Q 55 Q 66 Q 77 Q 88 Q 9 Q 10 B 0 : P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q B 1 : • Idea: construct the “clustered patches” – a clustered patch is a patch (see definition) – a clustered patch is a union of several consecutive simplified patches • Then, obtain simplified patches (by deleting all inner vertices)

Clustered patches B 0 : P 1 P 2 P 3 P 4 P

Clustered patches B 0 : P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Q 8 Q 9 Q 10 B 1 : • Consider the buffers B 0 and B 1 – each clustered patch represents several consequtive simplified patches, so the first part of B 1 is identical to the part of B 0 – thus, it is sufficient to store only the last part of B 1

Clustering algorithm Q 4 Q 2 Q 3 Q 9 Q 5 Q 10

Clustering algorithm Q 4 Q 2 Q 3 Q 9 Q 5 Q 10 Q 6 Q 1 • Input: the set of simplified patches Q 8 Q 7

Clustering algorithm • Input: the set of simplified patches • Step 1: construct special

Clustering algorithm • Input: the set of simplified patches • Step 1: construct special vertices connectivity graph – any two vertices that belong to the same patch must be connected with an edge – resulting graph is not planar

Clustering algorithm • Input: the set of simplified patches • Step 1: construct special

Clustering algorithm • Input: the set of simplified patches • Step 1: construct special vertices connectivity graph • Step 2: find the set of inner vertices – inner vertices belong to an independent set – it is possible to use the same program code, which is used in the original SWPM simplification algorithm to find the set of inner vertices

Clustering algorithm • • Input: the set of simplified patches Step 1: construct special

Clustering algorithm • • Input: the set of simplified patches Step 1: construct special vertices connectivity graph Step 2: find the set of inner vertices Step 3: construct the clustered patches – a clustered patch must include all simplified patches indcident to its inner vertex

Clustering algorithm • • Input: the set of simplified patches Step 1: construct special

Clustering algorithm • • Input: the set of simplified patches Step 1: construct special vertices connectivity graph Step 2: find the set of inner vertices Step 3: construct the clustered patches • Step 4: since clustered patch is a union of several consecutive simplified patches, thus one may have to reorder the list of simplified patches

The trade-off B 0 : P 1 P 2 P 3 P 4 P

The trade-off B 0 : P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 Q 8 Q 9 Q 10 B 1 : • It is possible to trade the size of SWPM index dataset for the number of approximations stored in SWPM • Replace the last part of B 0 with the last part of B 1 – resulting buffer is also SWPM

Results • Reduction of SWPM index dataset: – – via connectivity optimization: ~20% via

Results • Reduction of SWPM index dataset: – – via connectivity optimization: ~20% via clustering: ~20% via optimization+clustering: ~30% via optimization+clustering+trade-off: >50% • Clustering increases vertex cache miss ratio, but not significantly