high res dragon
This commit is contained in:
62
resources/box.mtl
Normal file
62
resources/box.mtl
Normal file
@@ -0,0 +1,62 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 6
|
||||
|
||||
newmtl backWall
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl ceiling
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl floor
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.725000 0.710000 0.680000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl leftWall
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.750000 0.250000 0.250000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.500000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl light
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.780000 0.780000 0.780000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl rightWall
|
||||
Ns 9.803921
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.250000 0.250000 0.750000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.500000
|
||||
d 1.000000
|
||||
illum 1
|
||||
58
resources/box.obj
Normal file
58
resources/box.obj
Normal file
@@ -0,0 +1,58 @@
|
||||
# Blender v2.80 (sub 75) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib box.mtl
|
||||
o cornell
|
||||
v 2.730000 0.000001 -3.629600
|
||||
v 2.730000 -0.000001 3.455100
|
||||
v 2.730000 3.422800 3.455101
|
||||
v 2.730000 3.422801 -3.629599
|
||||
v -0.655200 3.405600 0.558401
|
||||
v -0.655200 3.405600 -0.767799
|
||||
v 0.627900 3.405600 -0.767799
|
||||
v 0.627900 3.405600 0.558401
|
||||
v -2.757300 -0.000001 3.455100
|
||||
v 2.730000 -0.000001 3.455100
|
||||
v 2.730000 0.000001 -3.629600
|
||||
v -2.702700 0.000001 -3.629600
|
||||
v -2.784600 3.422800 3.455101
|
||||
v -2.784600 3.422801 -3.629599
|
||||
v 2.730000 3.422801 -3.629599
|
||||
v 2.730000 3.422800 3.455101
|
||||
v -2.702700 0.000001 -3.629600
|
||||
v 2.730000 0.000001 -3.629600
|
||||
v 2.730000 3.422801 -3.629599
|
||||
v -2.784600 3.422801 -3.629599
|
||||
v -2.757300 -0.000001 3.455100
|
||||
v -2.702700 0.000001 -3.629600
|
||||
v -2.784600 3.422801 -3.629599
|
||||
v -2.784600 3.422800 3.455101
|
||||
vn -1.0000 -0.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 0.9999 0.0125 0.0022
|
||||
vn 0.9998 0.0194 0.0055
|
||||
vn 1.0000 0.0080 0.0000
|
||||
vn 0.9997 0.0239 0.0077
|
||||
usemtl rightWall
|
||||
s 1
|
||||
f 2//1 4//1 1//1
|
||||
f 2//1 3//1 4//1
|
||||
usemtl light
|
||||
f 6//2 8//2 5//2
|
||||
f 6//2 7//2 8//2
|
||||
usemtl floor
|
||||
f 10//3 12//3 9//3
|
||||
f 9//4 16//4 10//4
|
||||
f 10//3 11//3 12//3
|
||||
f 9//4 13//4 16//4
|
||||
usemtl ceiling
|
||||
f 14//2 16//2 13//2
|
||||
f 14//2 15//2 16//2
|
||||
usemtl backWall
|
||||
f 17//5 19//5 20//5
|
||||
f 17//5 18//5 19//5
|
||||
usemtl leftWall
|
||||
f 21//6 23//7 24//8
|
||||
f 21//6 22//9 23//7
|
||||
@@ -1,12 +1,10 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl wire_087224198
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
newmtl None
|
||||
Ns 500
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
d 1
|
||||
illum 2
|
||||
|
||||
2447892
resources/dragon-normals.obj
2447892
resources/dragon-normals.obj
File diff suppressed because it is too large
Load Diff
150016
resources/dragon.obj
150016
resources/dragon.obj
File diff suppressed because it is too large
Load Diff
12
resources/lucy-normals-larger.mtl
Normal file
12
resources/lucy-normals-larger.mtl
Normal file
@@ -0,0 +1,12 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Default_OBJ.001
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.900000 0.900000 0.900000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
200006
resources/lucy-normals-larger.obj
Normal file
200006
resources/lucy-normals-larger.obj
Normal file
File diff suppressed because it is too large
Load Diff
@@ -90,11 +90,12 @@ glm::vec3 RenderEngine::GetColour(Ray ray, int& depth) {
|
||||
// float angle = fastDegreetoRadian(.0f);
|
||||
// float s = uv.x * cos(angle) - uv.y * sin(angle);
|
||||
// float t = uv.y * cos(angle) + uv.x * sin(angle);
|
||||
// float S = 0.5f; float T = 0.5f;
|
||||
// float S = 0.4f; float T = 0.4f;
|
||||
// float pattern = (modulo(s * S) < 0.5f) ^ (modulo(t * T) < 0.5f);
|
||||
// colour.r = pattern; colour.g = pattern; colour.b = pattern;
|
||||
//}
|
||||
|
||||
|
||||
if (hit->material->Emissive) return (colour * hit->material->Emittance);
|
||||
|
||||
glm::vec3 direction = hit->material->Bounce(ray.direction, normal);
|
||||
|
||||
@@ -69,7 +69,7 @@ std::vector<Triangle*> LoadTrianglesBasic(std::string path, std::string basePath
|
||||
// tinyobj::material_t material = materials[shapes[s].mesh.material_ids[f]];
|
||||
|
||||
// Material* mat = new Material({ material.diffuse[0], material.diffuse[1], material.diffuse[2] }, 0.6f, material.illum);
|
||||
Material* mat = new Material({ 1.0f, 1.0f, 1.0f }, 0.4f);
|
||||
Material* mat = new Material({ 0.717f, 0.792f, 0.474 }, 0.5f);
|
||||
|
||||
// glm::vec3 normal = getNormal(
|
||||
// {avx[0], avy[0], avz[0]},
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "../src/inferno.hpp"
|
||||
|
||||
static const int width = 700;
|
||||
static const int height = 700;
|
||||
static const int width = 1000;
|
||||
static const int height = 1000;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
InfernoEngine inferno;
|
||||
@@ -21,17 +21,15 @@ int main(int argc, char** argv) {
|
||||
// scene->objects.push_back(new Sphere({ 0.0f, 0.0f, -8.0f }, 1.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.7f)));
|
||||
// scene->objects.push_back(new Sphere({ 2.0f, 0.0f, -6.0f }, 1.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f)));
|
||||
// scene->objects.push_back(new Sphere({ -2.0f, 0.0f, -9.0f }, 1.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f)));
|
||||
scene->objects.push_back(new Sphere({ 5.0f, 6.0f, 9.0f }, 5.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f, 5.0f)));
|
||||
scene->objects.push_back(new Plane( { 0.0f,-1.0f, 0.0f }, { 0.0f, -1.0f, 0.0f }, new Material({ 1.0f, 0.9f, 0.9f }, 0.1f)));
|
||||
scene->objects.push_back(new Sphere({ 25.0f, 26.0f, 25.0f }, 15.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f, 5.0f)));
|
||||
scene->objects.push_back(new Plane( { 0.0f,-1.0f, 0.0f }, { 0.0f, -1.0f, 0.0f }, new Material({ 0.847f, 0.792f, 0.658f }, 0.3f)));
|
||||
// scene->objects.push_back(new Plane( { 0.0f, 10.0f, 0.0f }, { 1.0f, 1.0f, 1.0f }, new Material({ 1.0f, 0.9f, 0.9f }, 0.0f, 1.0f)));
|
||||
|
||||
//std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//dragon-normals.obj", "E://Projects//Inferno//resources");
|
||||
std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//dragon-normals.obj", "E://Projects//Inferno//resources");
|
||||
// std::vector<Triangle*> tris = LoadTrianglesBasic("//home//ben//programming//inferno//resources//dragon-normals.obj", "//home//ben//programming//inferno//resources//resources");
|
||||
// for (const auto& object : tris)
|
||||
// object->Translate({ 0.0f, -5.0f, -20.0f });
|
||||
|
||||
//std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//lucy-normals.obj", "E://Projects//Inferno//resources");
|
||||
std::vector<Triangle*> tris = LoadTrianglesBasic("//home//ben//programming//inferno//resources//lucy-normals.obj", "//home//ben//programming//inferno//resources//resources");
|
||||
//std::vector<Triangle*> tris = LoadTrianglesBasic("E://Projects//Inferno//resources//lucy-normals-larger.obj", "E://Projects//Inferno//resources");
|
||||
//std::vector<Triangle*> tris = LoadTrianglesBasic("//home//ben//programming//inferno//resources//lucy-normals.obj", "//home//ben//programming//inferno//resources//resources");
|
||||
|
||||
//Mesh* mesh = new Mesh(tris);
|
||||
//mesh->Translate({ 0.0f, -1.01f, -3.0f });
|
||||
@@ -42,7 +40,7 @@ int main(int argc, char** argv) {
|
||||
// std::vector<Triangle*> tris = LoadTrianglesBasic("//home//ben//programming//inferno//resources//cornell.obj", "//home//ben//programming//inferno//resources//resources");
|
||||
|
||||
Mesh* mesh1 = new Mesh(tris);
|
||||
mesh1->Translate({ 0.0f, -1.0f, -3.0f });
|
||||
mesh1->Translate({ 0.0f, -1.0f, -3.8f });
|
||||
mesh1->Optimise();
|
||||
scene->meshs.push_back(mesh1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user