Git Product home page Git Product logo

softrd's Introduction

SoftRd

Welcome to SoftRd, a 3D Software Rendering Engine based on C++.

This is my individual project due to my interest in computer graphic and rendering pipeline implementation. I developed this project by native C++ from the scratch and refer to OpenGL rendering pipeline standard from OpenGL Wiki. So currently it's completely a CPU based renderer without GPU acceleration.

Basically, the renderer is running on GUI based on SDL2.0 and it can load standard model files and render them into scenes by different mode and support basic lighting and different customizing shading effect.

Now I'm still building the windows version on visual studio, extending new features, optimizing structure and performance. Ideally, it can also support cross platform running on Mac.

Features

  • 3D engine with OpenGL style rendering pipline implementation including vertex shader, primitive assembly, rasterizing, fragment shader, per-sample operations.
  • Support rendering standard .obj file 3D model.
  • Support loading texture from popular image format such as .jpg, .png.
  • Renderer can render model or mesh in triangle or wireframe mode.
  • Support lighting based on Phong lighting model. User can set up different light types(directional light, spot light, point light) in the scene
  • Use GUI to output real-time rendering frames. Support keyboard control and interaction with different objects(models, lights, camera...) in the scene.

Effects

  • Single light source with object

    light test

  • Directional light

    dir light test

  • Point light

    point light test

  • Spot light

    spot light test

Implementation Details

Rendering Pipeline Implementation

For this project, basically, I primarily use native C++ 11 to build the total framework of all the rendering pipeline. It could be devided into the following C++ header files which in charges of each stage of the pipeline according to the OpenGL Rendering Pipeline

Rendering pipeline corresponding c++ header file:

    renderer.h    // control the main loop of renderer program
    |----vertex_shader.h    // vertex shader stage
    |----primitive_assembly.h // vertex post processing and primitive assembly stage
    |----rasterizer.h    // rasteration stage
    |----fragment_shader.h    // fragment shader stage
    |----per_sample_proccessing.h    // per-sample operations stage

Auxiliary Libraries

  • SDL2.0 -- For renderer's cross-platform GUI and keyboard I/O.
  • Assimp -- Import .obj model into self-defined model class object.
  • SOIL -- Import diffrent format of image file into texture class object.

Build

Full rebuild and boot (temp)

cd frontend/
sudo ./frontend.sh reinstall
yarn electron-dev

Reference

Notes

  • May rename to SquirrelRenderer(abrev sqrd)

softrd's People

Contributors

davidpypysp avatar

Stargazers

。。。 avatar Danny avatar  avatar

Watchers

James Cloos avatar  avatar Danny avatar

softrd's Issues

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.