Giter VIP home page Giter VIP logo

3d-rasterizer's Introduction

Abstract

https://parkcymil.notion.site/Gaussian-Rasterizer-b4d2902d58c24e8280431579519e345d

How to use

  • Place .ply model files under resources/model directory
  • From main.cu, modify Model model = loader.importModel("model/MY_MODEL.ply"); to point to appropriate model file.
  • Run the executable

Contribute

Install GLFW

  1. Download GLFW pre-compiled binaries for Windows 64-bit
  2. Unzip the file to extract include and lib-vc2022 folders
  3. Rename lib-vc2022 to lib
  4. Place the folders under the project root

Install GLAD

  1. Download glad.zip from GLAD load generator
  2. Unzip the file to extract include and src folders
  3. Place them under the project root

Install GLM

  1. Download glm-light.zip
  2. Unzip the file to extract glm folder
  3. Place it inside include under the project root

Install FreeType2

  1. Download ft2132.zip
  2. Unzip the file to extract include folder
  3. From Visual Studio, build the FreeType2 to obtain freetype.lib file
  4. Place them under the project root

Project Structure

img.png

Build project

  1. Run CMake to build the project
  2. The executable file will be generated under deploy folder

3d-rasterizer's People

Contributors

lazoyoung avatar

Watchers

 avatar

3d-rasterizer's Issues

Load 3d model from .ply file

  • PlyLoader loads vertex and face elements from a .ply file
  • Model represents a model's geometry imported from PlyLoader
  • Revise shader if necessary

Coordinate systems

image

  • Let the vertex shader transform coordinates from one space to another
  • Each Geometry has its own Local space
  • A Transform maps the object's coordinates to World space
  • A Camera transforms the entire scene into its View space
  • Subsequently, the camera projects the view into 2-dimensional Clip space

Draw geometry

  • A Geometry has a list of vertex and a shader used to draw itself
  • A Transform defines the position and rotation of the object

Create shaders

  • Vertex shader
  • Fragment shader

Use GLSL shaders to draw a triangle

Bake normal vectors

The bottom line is that some objects do not have the normal vectors that diffuse lighting depends on.
We apply cross product between two vectors in a mesh to compute its normal vector.

  • OpenMP accelerated
  • CUDA accelerated
  • Option to compare two

Show frame rate

  • Profiler calculates frame-rate by taking the time difference between two consecutive frames
  • Text renders any given text on the screen

Enhance shader

  • Read from file
  • Allow users to define uniform variables

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.