| author | Radek Brich <radek.brich@devl.cz> | 
| Sun, 31 May 2009 23:06:03 +0200 | |
| branch | pyrit | 
| changeset 100 | c005054bf4c1 | 
| parent 98 | 64638385798a | 
| child 102 | de3e9ea18f56 | 
| permissions | -rw-r--r-- | 
| 4 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 1 | ================== | 
| 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 2 | Pyrit Ray Tracer | 
| 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 3 | ================== | 
| 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 4 | |
| 44 | 5 | |
| 6 | File Organization | |
| 7 | ----------------- | |
| 94 | 8 | /build -- output directory for binaries and other generated files | 
| 44 | 9 | /ccdemos -- ray tracer demos in C++ | 
| 10 | /demos -- ray tracer demos in Python | |
| 96 
9eb71e76c7fd
added Python binding for material.h classes
 Radek Brich <radek.brich@devl.cz> parents: 
94diff
changeset | 11 | /docs -- Doxygen generated documentation | 
| 44 | 12 | /include -- header files | 
| 13 | /models -- common models for use by demos | |
| 14 | /src -- ray tracing library source code | |
| 15 | /tests -- test programs for classes | |
| 94 | 16 | /tools -- auxiliary programs | 
| 44 | 17 | |
| 18 | ||
| 19 | Building | |
| 20 | -------- | |
| 94 | 21 | Type 'scons pyrit' to build and 'scons -h' for list of targets. | 
| 44 | 22 | |
| 23 | Requirements: | |
| 66 | 24 | SCons | 
| 44 | 25 | pthreads (see bellow) | 
| 94 | 26 | libpng, zlib | 
| 44 | 27 | Python 2.4 or newer for Python module and demos | 
| 28 | SDL for interactive C++ demos | |
| 94 | 29 | |
| 30 | It should build with these compilers: GCC, IntelC, MSVC | |
| 31 | GCC is default in Linux, MSVC is default in Windows. | |
| 32 | ||
| 33 | ||
| 34 | Downloading model files | |
| 35 | ----------------------- | |
| 36 | Not all models are included in distribution. To download the large | |
| 37 | Stanford models, type 'scons download-models', which will download | |
| 98 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 38 | and extract the archives to appropriate location. | 
| 94 | 39 | |
| 40 | The download script uses 'tar' and 'wget' utilities. | |
| 41 | ||
| 42 | For Windows, these are available here: | |
| 43 | http://gnuwin32.sourceforge.net/packages/wget.htm | |
| 44 | http://gnuwin32.sourceforge.net/packages/libarchive.htm | |
| 44 | 45 | |
| 14 
fc18ac4833f2
replace Plane with axis-aligned Box (because infinite Plane is not usable with kd-tree)
 Radek Brich <radek.brich@devl.cz> parents: 
6diff
changeset | 46 | |
| 4 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 47 | Pthreads | 
| 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 48 | -------- | 
| 98 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 49 | Threads are used to render rays paralelly. Arbitrary number | 
| 94 | 50 | of threads can be used. | 
| 4 
c73bc405ee7a
multi-threaded rendering via pthreads
 Radek Brich <radek.brich@devl.cz> parents: diff
changeset | 51 | |
| 96 
9eb71e76c7fd
added Python binding for material.h classes
 Radek Brich <radek.brich@devl.cz> parents: 
94diff
changeset | 52 | For Windows, get Pthreads library here: | 
| 6 
d8d596d26f25
pthreads and other fixes for Windows
 Radek Brich <radek.brich@devl.cz> parents: 
4diff
changeset | 53 | http://sources.redhat.com/pthreads-win32/ | 
| 44 | 54 | |
| 55 | ||
| 98 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 56 | Python Demos | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 57 | ------------ | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 58 | All demos render images and write the result to PNG file | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 59 | named with same base name as the script. | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 60 | Scene is constructed using classes imported from pyrit | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 61 | Python module. | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 62 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 63 | boxes.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 64 | 512 cubes with reflections and refractions | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 65 | 4x oversampling, two lights, octree | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 66 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 67 | bunny.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 68 | glass bunny, ~70k polygons | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 69 | 4x oversampling, two lights, kd-tree | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 70 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 71 | car.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 72 | low poly car model, LWOB format | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 73 | 9x oversampling, two lights, kd-tree | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 74 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 75 | spheres_shadow.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 76 | three spheres, sharp shadows | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 77 | 4x oversampling, two lights, kd-tree | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 78 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 79 | spheres_ao.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 80 | three spheres, ambient occlussion | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 81 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 82 | spheres_glass.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 83 | row of glass spheres | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 84 | 4x oversampling, three lights, kd-tree | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 85 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 86 | render_nff.py [input.nff] [output.png] | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 87 | renders nff files (http://tog.acm.org/resources/SPD/) | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 88 | reads stdin if no args given | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 89 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 90 | triangles_*.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 91 | older examples using OBJ file format | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 92 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 93 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 94 | C++ Demos | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 95 | --------- | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 96 | Compiled interactive demos. Camera can move freely in the scene. | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 97 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 98 | realtime.exe | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 99 | one hundred spheres with reflections | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 100 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 101 | realtime_bunny.exe | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 102 | bunny model (it loads silently, so be patient) | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 103 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 104 | spheres_shadow.exe | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 105 | "interactive" version of spheres_shadow.py | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 106 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 107 | textures.exe | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 108 | demo of different texture mappings | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 109 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 110 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 111 | Control keys: | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 112 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 113 | Up, Down, Left, Right look around | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 114 | w/s forward, backward | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 115 | c print camera coordinates | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 116 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 117 | spheres_shadow demo supports also: | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 118 | r/t, f/g, v/b move the light (-x/+x, -y/+y, -z/+z) | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 119 | z/x change camera focal length (-/+) | 
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 120 | |
| 
64638385798a
add sections about demos to README
 Radek Brich <radek.brich@devl.cz> parents: 
96diff
changeset | 121 | |
| 44 | 122 | License | 
| 123 | ------- | |
| 124 | This software is published under terms of MIT license. | |
| 125 | See COPYING for full text of license. | |
| 126 | ||
| 127 | ||
| 128 | Website | |
| 129 | ------- | |
| 130 | Latest version can be obtained at http://wiki.fiction.cz/Pyrit |