Skip to content
/ clod Public

Cluster-based dynamic level of detail based on UE5's Nanite

Notifications You must be signed in to change notification settings

gfaster/clod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cluster Based Dynamic Level of Detail

This was my final project submission for Harvard CSCI E-72, Introduction to Computer Graphics. A good portion the OpenGL rendering code was provided as template code but object loading and the simplification work was written by myself.

A demonstration can be found at this YouTube video

The project is a basic implementation of Unreal Engine 5's Nanite level of detail system, which is detailed in this talk.

Technique

This level of detail method provides a way to render multiple different LODs simultaneously on the same object without any cracks forming. The steps to do so are as follows:

  1. Partition the mesh into triangle clusters, minimizing the edge-cut. I use a cluster size of 64.

  2. Partition the clusters into groups of no more than 4, minimizing edge-cut. The weights of the edges are the number of triangle edges shared between the two clusters.

  3. Within the groups, perform edge collapse while keeping edges on the boundary between clusters locked. I use a simple minimum edge length metric over the superior quadric error metric.

  4. Within the simplified groups, repartition the triangles into new clusters.

  5. Repeat steps 2 through 4 until sufficiently simplified.

The result is a DAG that represents hierarchical level of detail without introducing high-detail boundaries between subtrees that would form in a more naive algorithm.

Running it

Currently, due to an unknown reason when moving to using the Debian repositories, running always results in a crash related to METIS.

Requires libOpenGL, libSDL2, libMETIS, g++, and make. This was last tested on Debian 12.

make clod

About

Cluster-based dynamic level of detail based on UE5's Nanite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages