Giter VIP home page Giter VIP logo

pbr-model-viewer's Introduction

PBR Model Viewer

A simple app for viewing 3D models, powered by Vulkan. Rendering uses Physically-Based Rendering (PBR) techniques, incorporating Image Based Lighting (IBL) with HDR environment maps to achieve realistic lighting.

Features

  • Loading all kinds of models using Assimp
  • PBR lighting model using the Cook-Torrance GGX
  • IBL using user selectable HDR environment maps, convolved and prefiltered at runtime
  • SSAO usable interchangably with baked AO maps provided during model loading
  • Instancing used to minimize draw calls
  • ImGui user interface

Compilation

To compile this code you need to have the LunarG Vulkan SDK installed.

The project is compiled simply using cmake:

cmake --build <build-directory-name>

When modifying shaders, they need to be recompiled. To compile shaders, first go into the shaders directory and run:

./compile.bat

Then, run an exporter tool (which is compiled alongside the main executable) that exports shader Spir-V code into an embeddable C++ source file:

cd <build-directory-name>
shader_export.exe

Keep in mind that currently this project requires your machine to support Vulkan 1.3 (which is subject for change in the future). All other dependencies are included in the deps subdirectory.

Controls

Press ` to open/close the GUI. Drag the left mouse button to rotate the camera around your model. Drag the right mouse button to pan your model.

Gallery

image image image image

Future improvements

  • Add more post-processing effects
  • More lighting customization (add point lights)
  • Maybe add shadows
  • Add a blur option for the background environment
  • Clean up code

pbr-model-viewer's People

Contributors

quazuo avatar

Stargazers

Šimon avatar

Watchers

 avatar

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.