Giter Club home page Giter Club logo

clod's Introduction

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

clod's People

Contributors

gfaster avatar

Stargazers

 avatar Jacob avatar Yixian Wang avatar P. A. Minerva avatar Pavel Novotný avatar

Watchers

 avatar

Forkers

drwbns

clod's Issues

Windows build hitting a snag

Hey Gavin. This work you did is really awesome but I'm using Visual Studio on a Windows machine and it has been a pain to build. I finally was able to build and run it but I am hitting a weird access violation. Any ideas? Also, does it use some custom library versions of GKlib or Metis? Thanks for any help!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.