Skip to content

Commit

Permalink
Change expected path to models to be the "models" subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
ehainesnv committed Aug 28, 2019
1 parent 4e29ad8 commit 27a0cc8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build
*.gz
*.zip
Session.vim
/models/*
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ most recent NVIDIA developer driver).

The literally only *external* library we use is GLFW for windowing, and
even this one we actually build on the fly under Windows, so installing
it is only required under Linux.
it is required only under Linux.

Detailed steps below:

Expand Down Expand Up @@ -117,7 +117,7 @@ This is how this should look like in Linux:
And here, in Windows:
![Example 1 Linux output](./example01_helloOptix/ex01-windows.png)

Note: if you do not see this output file, you may have a driver that
**Note:** if you do not see this output file, you may have a driver that
does not work properly with OptiX 7 or some other cause. Normally the
console window will disappear before you can see the error. To run and
see the console window's messages, use the Visual Studio option "Start
Expand All @@ -131,8 +131,8 @@ This is the first "real" OptiX example, and maybe somewhat
surprisingly, the biggest "step" in all of the examples.

The actual raygen program that this example launches is actually
very(!) small, and pretty much trivial; and there's no other programs,
not even geometry, nor a single ray being traced ... but to launch
very(!) small, and pretty much trivial; and there are no other programs,
not even geometry, nor a single ray being traced... but to launch
this simple raygen program we nevertheless have to go through the
entire process of creating Modules, Programs, and, in particular, a
valid "Shader Binding Table" (SBT), before we can launch our little
Expand Down Expand Up @@ -190,10 +190,12 @@ meshes with one cube (and one color) each.
## Example 7: First Real Model

This example takes the previous "multiple meshes" code unmodified, but
introduces a simple OBJ file format parser (using Syoyo Fuyita's
tinyobj [https://github.com/syoyo/tinyobjloader]), and hooks the resulting triangle meshes up to
introduces a simple OBJ file format parser (using [Syoyo Fuyita's
tinyobj](https://github.com/syoyo/tinyobjloader), and hooks the resulting triangle meshes up to
the previous example's render code.

For this example, you must download the [Crytek Sponza model](https://casual-effects.com/data/) and unzip it to the (non-existent, until you create it) subdirectory `optix7course/models`.

And la-voila, with exactly the same render code from Sample 6, it
suddenly starts to take shape:

Expand All @@ -203,7 +205,8 @@ suddenly starts to take shape:

This example shows how to create and set up CUDA texture objects on
the host, host to pass those to the device via the SBT, and how to use
those texture objects on the device.
those texture objects on the device. This one will take a bit of time
to load in Debug - it's worth the wait!

![Adding Textures](./example08_addingTextures/ex08.png)

Expand Down
8 changes: 4 additions & 4 deletions example07_firstRealModel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ namespace osc {
#ifdef _WIN32
// on windows, visual studio creates _two_ levels of build dir
// (x86/Release)
"../../sponza.obj"
"../../models/sponza.obj"
#else
// on linux, common practice is to have ONE level of build dir
// (say, <project>/build/)...
"../sponza.obj"
"../models/sponza.obj"
#endif
);
Camera camera = { /*from*/vec3f(-1293.07f, 154.681f, -0.7304f),
Expand All @@ -138,8 +138,8 @@ namespace osc {
} catch (std::runtime_error e) {
std::cout << GDT_TERMINAL_RED << "FATAL ERROR: " << e.what()
<< GDT_TERMINAL_DEFAULT << std::endl;
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your project dir?" << std::endl;
exit(1);
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your optix7course/models directory?" << std::endl;
exit(1);
}
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions example08_addingTextures/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ namespace osc {
#ifdef _WIN32
// on windows, visual studio creates _two_ levels of build dir
// (x86/Release)
"../../sponza.obj"
"../../models/sponza.obj"
#else
// on linux, common practice is to have ONE level of build dir
// (say, <project>/build/)...
"../sponza.obj"
"../models/sponza.obj"
#endif
);
Camera camera = { /*from*/vec3f(-1293.07f, 154.681f, -0.7304f),
Expand All @@ -138,8 +138,8 @@ namespace osc {
} catch (std::runtime_error e) {
std::cout << GDT_TERMINAL_RED << "FATAL ERROR: " << e.what()
<< GDT_TERMINAL_DEFAULT << std::endl;
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your project dir?" << std::endl;
exit(1);
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your optix7course/models directory?" << std::endl;
exit(1);
}
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions example09_shadowRays/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ namespace osc {
#ifdef _WIN32
// on windows, visual studio creates _two_ levels of build dir
// (x86/Release)
"../../sponza.obj"
"../../models/sponza.obj"
#else
// on linux, common practice is to have ONE level of build dir
// (say, <project>/build/)...
"../sponza.obj"
"../models/sponza.obj"
#endif
);

Expand All @@ -139,8 +139,8 @@ namespace osc {
} catch (std::runtime_error e) {
std::cout << GDT_TERMINAL_RED << "FATAL ERROR: " << e.what()
<< GDT_TERMINAL_DEFAULT << std::endl;
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your project dir?" << std::endl;
exit(1);
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your optix7course/models directory?" << std::endl;
exit(1);
}
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions example10_softShadows/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ namespace osc {
#ifdef _WIN32
// on windows, visual studio creates _two_ levels of build dir
// (x86/Release)
"../../sponza.obj"
"../../models/sponza.obj"
#else
// on linux, common practice is to have ONE level of build dir
// (say, <project>/build/)...
"../sponza.obj"
"../models/sponza.obj"
#endif
);

Expand All @@ -148,8 +148,8 @@ namespace osc {
} catch (std::runtime_error e) {
std::cout << GDT_TERMINAL_RED << "FATAL ERROR: " << e.what()
<< GDT_TERMINAL_DEFAULT << std::endl;
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your project dir?" << std::endl;
exit(1);
std::cout << "Did you forget to copy sponza.obj and sponza.mtl into your optix7course/models directory?" << std::endl;
exit(1);
}
return 0;
}
Expand Down

0 comments on commit 27a0cc8

Please sign in to comment.