Giter Club home page Giter Club logo

pbr-demo's Introduction

Sam Sartor / [email protected]
Daichi Jameson / [email protected]>
Final Project / Physically Based Rendering

Description
===========

	This program demonstrates PBR shading on a variety of textured models.
	
Usage
=====

	The program takes several command line arguments. You can use --help to
	list them off, but generally you only need to worry about the -o argument.
	It is followed by a list of directories. Each directory should contain:
		model.obj (including texture and normal coordinates)
		normal.png
		albedo.png
		metalness.png
		roughness.png

	A set of example directories is found in "objects/".

	In general, the command you want is:
		[program executable] -o objects/buddha_wood objects/cerberus objects/painted_metal objects/rusty_car objects/teapot_wood

	The camera is an arc-ball. Click+Drag to rotate. Scroll to zoom.

	"esc" exits the program. "m" cycles through the available objects (from
	the directory list). "c" toggles between default light colors and
	randomized light colors. Up/Down adjusts exposure. Right/Left adjusts gamma.

Details
=======

	We implemented this project using a language Sam is particularly fond of
	called "Rust". He likes it for all sorts of reasons and he could spend
	months listing them off, but you don't want to read that.

	High-level, robust, and multi-threadable access to OpenGL is provided
	through a library called gfx. Gfx can also use DirectX 11, DirectX 12,
	Metal, and Vulcan as backends. However, that does require writing separate
	shaders for each platform and insuring consistent buffer layout between
	them. Given that this class is focused on OpenGL, this program just uses
	OpenGL always.

	The render function is src/app.rs::App::render(). src/app.rs::App::new()
	sets up all the pipeline stuff which is defined using a cool gfx macro in
	src/define.rs. The render passes are:
 	
 	 	- Render scene to gbuffer
 	 	For each light:
 	 		- Render scene to shadowbuffer
 	 		- Do deferred pass for single light (additive blending into luminance buffer)
 	 	- Do post processing (convert HDR luminance buffer to LDR output)

	Further details are in the paper.

Building
========

	If you have Rust installed (https://www.rustup.rs/), execute "cargo run
	--release -- -o [objects]" in the project's main directory. Nightly is NOT
	required, but it is generally better. I have also included linux and
	windows executables.

Time: ~12h (not including copy-and-pasted code from previous projects)
Fun: ... (PBR is AWESOME!)

pbr-demo's People

Contributors

samsartor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.