Merge branch 'master' of https://github.com/plane000/inferno
This commit is contained in:
10
README.md
10
README.md
@@ -1,7 +1,7 @@
|
|||||||
# Inferno Pathtracer
|
# Inferno Pathtracer
|
||||||
[](https://travis-ci.org/plane000/inferno)
|
[](https://travis-ci.org/plane000/inferno)
|
||||||
|
|
||||||
Inferno is a CPU Only, progressive unidirectional pathtracing engine written in C++.
|
Inferno is a CPU Only, progressive, unidirectional pathtracing engine written in C++.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -10,10 +10,10 @@ Inferno is a CPU Only, progressive unidirectional pathtracing engine written in
|
|||||||
* Supports OBJ Files
|
* Supports OBJ Files
|
||||||
* Supports many material properties
|
* Supports many material properties
|
||||||
* Uses multiple types of acceleration structures
|
* Uses multiple types of acceleration structures
|
||||||
* Fully capable GUI adds much runtime customization to the scene and render settings
|
* Fully capable GUI adds many runtime customizations to the scene and render settings
|
||||||
* Custom threadpool for best performance
|
* Custom threadpool for best performance
|
||||||
|
|
||||||
### Installation
|
### Build Instructions
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/plane000/inferno
|
git clone https://github.com/plane000/inferno
|
||||||
@@ -26,7 +26,7 @@ make
|
|||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
There are many example scenes that I have made already. Just change the CurrentTest variable inside the CMakeList to the name of the file you wish to demo.
|
There are many example scenes that I have made already. Just modify the CurrentTest variable inside the CMakeLists.txt to the name of the file you wish to demo.
|
||||||
|
|
||||||
### Basic Scene
|
### Basic Scene
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
### References
|
### References
|
||||||
|
|
||||||
While programming this I found a few resources especially useful. Below is some listed.
|
While I have been working on this project, I have found a few resources to be especially useful. Below are a few I have listed.
|
||||||
|
|
||||||
* [Scratch A Pixel - Global Illumination](https://www.scratchapixel.com)
|
* [Scratch A Pixel - Global Illumination](https://www.scratchapixel.com)
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ glm::vec3 ConeBounce(glm::vec3 reflectDir, float theta) {
|
|||||||
return glm::normalize(d);
|
return glm::normalize(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
float FresnelReflect (Material* mat, glm::vec3 normal, glm::vec3 incident) {
|
float FresnelReflect(Material* mat, glm::vec3 normal, glm::vec3 incident) {
|
||||||
float n1 = 1.0f;
|
float n1 = 1.0f;
|
||||||
float n2 = mat->Index;
|
float n2 = mat->Index;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include "../src/inferno.hpp"
|
#include "../src/inferno.hpp"
|
||||||
|
|
||||||
static const int width = 600;
|
static const int width = 2000;
|
||||||
static const int height = 600;
|
static const int height = 2000;
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
InfernoEngine inferno;
|
InfernoEngine inferno;
|
||||||
@@ -19,16 +19,16 @@ int main(int argc, char** argv) {
|
|||||||
scene->sky = sky;
|
scene->sky = sky;
|
||||||
|
|
||||||
Material* mat = new GlossyMaterial({ 1.0f, 1.0f, 1.0f }, 0.2f, fastDegreetoRadian(30.0f));
|
Material* mat = new GlossyMaterial({ 1.0f, 1.0f, 1.0f }, 0.2f, fastDegreetoRadian(30.0f));
|
||||||
//std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//models//dragon-cornell-size.obj", "E://Projects//Inferno//resources//models", mat);
|
std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//models//lucy.obj", "E://Projects//Inferno//resources//models//", mat);
|
||||||
std::vector<Triangle*> tris = LoadTrianglesBasic("/home/ben/programming/inferno/resources/models/lucy.obj", "/home/ben/programming/inferno/resources/models/", mat);
|
//std::vector<Triangle*> tris = LoadTrianglesBasic("/home/ben/programming/inferno/resources/models/lucy.obj", "/home/ben/programming/inferno/resources/models/", mat);
|
||||||
|
|
||||||
Mesh* mesh = new Mesh(tris);
|
Mesh* mesh = new Mesh(tris);
|
||||||
mesh->Translate({ -0.05f, -1.01, -3.8f });
|
mesh->Translate({ -0.05f, -1.01, -3.8f });
|
||||||
mesh->Optimise();
|
mesh->Optimise();
|
||||||
scene->meshs.push_back(mesh);
|
scene->meshs.push_back(mesh);
|
||||||
|
|
||||||
// std::vector<Triangle*> tris1 = LoadTrianglesBasic("E://Projects//Inferno//resources//models//cornell-box.obj", "E://Projects//Inferno//resources//models//");
|
std::vector<Triangle*> tris1 = LoadTrianglesBasic("E://Projects//Inferno//resources//models//cornell-box.obj", "E://Projects//Inferno//resources//models//");
|
||||||
std::vector<Triangle*> tris1 = LoadTrianglesBasic("/home/ben/programming/inferno/resources/models/cornell-box.obj", "/home/ben/programming/inferno/resources/models/");
|
//std::vector<Triangle*> tris1 = LoadTrianglesBasic("/home/ben/programming/inferno/resources/models/cornell-box.obj", "/home/ben/programming/inferno/resources/models/");
|
||||||
|
|
||||||
Mesh* mesh1 = new Mesh(tris1);
|
Mesh* mesh1 = new Mesh(tris1);
|
||||||
mesh1->Translate({ 0.01f, -1.0, -3.6f });
|
mesh1->Translate({ 0.01f, -1.0, -3.6f });
|
||||||
|
|||||||
Reference in New Issue
Block a user