small edits
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
newmtl backWall
|
||||
Ns 9.803922
|
||||
Ka 0.705000 0.705000 0.705000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Kd 0.900000 0.900000 0.900000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
@@ -14,7 +14,7 @@ d 1.000000
|
||||
newmtl ceiling
|
||||
Ns 9.803922
|
||||
Ka 0.705000 0.705000 0.705000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Kd 0.900000 0.900000 0.900000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
@@ -24,7 +24,7 @@ d 1.000000
|
||||
newmtl floor
|
||||
Ns 9.803922
|
||||
Ka 0.705000 0.705000 0.705000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Kd 0.900000 0.900000 0.900000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
@@ -34,8 +34,8 @@ d 1.000000
|
||||
newmtl leftWall
|
||||
Ns 9.803922
|
||||
Ka 0.248333 0.248333 0.248333
|
||||
#Kd 1.000000 0.000000 0.000000
|
||||
Kd 0.750000 0.250000 0.250000
|
||||
Kd 1.000000 0.000000 0.000000
|
||||
#Kd 0.750000 0.250000 0.250000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.500000
|
||||
@@ -45,18 +45,18 @@ d 1.000000
|
||||
newmtl light
|
||||
Ns 9.803922
|
||||
Ka 0.780000 0.780000 0.780000
|
||||
Kd 0.780000 0.780000 0.780000
|
||||
Kd 0.900000 0.900000 0.900000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 100000
|
||||
illum 30
|
||||
|
||||
newmtl rightWall
|
||||
Ns 9.803922
|
||||
Ka 0.227000 0.227000 0.227000
|
||||
#Kd 0.000000 0.000000 1.000000
|
||||
Kd 0.250000 0.250000 0.750000
|
||||
Kd 0.000000 1.000000 0.000000
|
||||
#Kd 0.250000 0.250000 0.750000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.500000
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib cornell.mtl
|
||||
mtllib cornell-box.mtl
|
||||
o cornell
|
||||
v -0.990000 0.000000 -1.040000
|
||||
v 1.000000 0.000000 -1.040000
|
||||
|
||||
@@ -50,7 +50,7 @@ Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 15
|
||||
illum 30
|
||||
|
||||
newmtl rightWall
|
||||
Ns 9.803922
|
||||
|
||||
@@ -84,7 +84,7 @@ s 1
|
||||
f 13//1 14//1 15//1 16//1
|
||||
usemtl light
|
||||
f 9//2 10//2 11//2 12//2
|
||||
semtl floor
|
||||
usemtl floor
|
||||
5//3 6//3 7//3 8//3
|
||||
usemtl ceiling
|
||||
f 17//2 18//2 19//2 20//2
|
||||
|
||||
@@ -10,6 +10,6 @@ float rand01() {
|
||||
}
|
||||
|
||||
float rand11() {
|
||||
std::uniform_real_distribution<float> distribution(1, 1);
|
||||
std::uniform_real_distribution<float> distribution(-1, 1);
|
||||
return distribution(generator);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ std::vector<Triangle*> LoadTrianglesBasic(std::string path, std::string basePath
|
||||
bool illum = false;
|
||||
if (tinyMtl.illum > 0.0f) illum = true;
|
||||
// TODO: Weird bug where imported illumination is always equal to 15
|
||||
if (illum) tinyMtl.illum = 50;
|
||||
mtl = new Material({ tinyMtl.diffuse[0], tinyMtl.diffuse[1], tinyMtl.diffuse[2] }, tinyMtl.illum, 0.0f, 0.0f, 0.0f, false, illum);
|
||||
} else {
|
||||
mtl = baseMaterial;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "../src/inferno.hpp"
|
||||
|
||||
static const int width = 500;
|
||||
static const int height = 500;
|
||||
static const int width = 2000;
|
||||
static const int height = 2000;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
InfernoEngine inferno;
|
||||
@@ -18,20 +18,20 @@ int main(int argc, char** argv) {
|
||||
Sky* sky = new SolidSky({ 0.0f, 0.0f, 0.0f }, 0.0f);
|
||||
scene->sky = sky;
|
||||
|
||||
Material* mat = new GlossyMaterial({ 1.2f, 1.2f, 1.2f }, 0.1f, fastDegreetoRadian(20.0f));
|
||||
// std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//models//dragon-cornell-size.obj", "E://Projects//Inferno//resources//models", mat);
|
||||
Plane* plane = new Plane({ 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f, 0.0f, 0.0f, 0.0f, false, false));
|
||||
scene->objects.push_back(plane);
|
||||
|
||||
Material* mat = new GlossyMaterial({ 1.3f, 1.3f, 1.3f }, 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("/home/ben/programming/inferno/resources/models/dragon-cornell-size.obj", "/home/ben/programming/inferno/resources/models/", mat);
|
||||
|
||||
Sphere sphere1({ 0.0f, -0.6f, -4.0f }, 0.4f, mat);
|
||||
scene->objects.push_back(&sphere1);
|
||||
Mesh* mesh = new Mesh(tris);
|
||||
mesh->Translate({ 0.01f, -1.0, -3.6f });
|
||||
mesh->Optimise();
|
||||
scene->meshs.push_back(mesh);
|
||||
|
||||
// Mesh* mesh = new Mesh(tris);
|
||||
// mesh->Translate({ 0.01f, -1.0, -3.6f });
|
||||
// mesh->Optimise();
|
||||
// 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("/home/ben/programming/inferno/resources/models/cornell-box.obj", "/home/ben/programming/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/");
|
||||
|
||||
Mesh* mesh1 = new Mesh(tris1);
|
||||
mesh1->Translate({ 0.01f, -1.0, -3.6f });
|
||||
|
||||
Reference in New Issue
Block a user