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