README
author Radek Brich <radek.brich@devl.cz>
Mon, 19 May 2008 22:59:04 +0200
branchpyrit
changeset 98 64638385798a
parent 96 9eb71e76c7fd
child 102 de3e9ea18f56
permissions -rw-r--r--
add sections about demos to README update doxygen comments
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
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    40
The download script uses 'tar' and 'wget' utilities.
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    41
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    42
For Windows, these are available here:
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    43
http://gnuwin32.sourceforge.net/packages/wget.htm
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    44
http://gnuwin32.sourceforge.net/packages/libarchive.htm
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
    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: 6
diff 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: 96
diff changeset
    49
Threads are used to render rays paralelly. Arbitrary number
94
4c8abb8977dc update README
Radek Brich <radek.brich@devl.cz>
parents: 66
diff changeset
    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: 94
diff changeset
    52
For Windows, get Pthreads library here:
6
d8d596d26f25 pthreads and other fixes for Windows
Radek Brich <radek.brich@devl.cz>
parents: 4
diff changeset
    53
http://sources.redhat.com/pthreads-win32/
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
    54
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
    55
98
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    56
Python Demos
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    57
------------
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff 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: 96
diff changeset
    59
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
    60
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
    61
Python module.
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
boxes.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    64
        512 cubes with reflections and refractions
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    65
        4x oversampling, two lights, octree
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
bunny.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    68
        glass bunny, ~70k polygons
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    69
        4x 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
car.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    72
        low poly car model, LWOB format
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    73
        9x 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_shadow.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    76
        three spheres, sharp shadows
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    77
        4x oversampling, two lights, kd-tree
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    78
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    79
spheres_ao.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    80
        three spheres, ambient occlussion
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
spheres_glass.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    83
        row of glass spheres
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    84
        4x oversampling, three lights, kd-tree
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
render_nff.py [input.nff] [output.png]
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff 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: 96
diff changeset
    88
        reads stdin if no args given
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
triangles_*.py
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    91
        older examples using OBJ file format
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    92
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
C++ Demos
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    95
---------
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff 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: 96
diff changeset
    97
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    98
realtime.exe
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
    99
        one hundred spheres with reflections
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   100
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   101
realtime_bunny.exe
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   102
        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
   103
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   104
spheres_shadow.exe
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   105
        "interactive" version of spheres_shadow.py
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
textures.exe
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   108
        demo of different texture mappings
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   109
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   110
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   111
Control keys:
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
        Up, Down, Left, Right   look around
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   114
        w/s                     forward, backward
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   115
        c                       print camera coordinates
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
        spheres_shadow demo supports also:
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff 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: 96
diff changeset
   119
        z/x                     change camera focal length (-/+)
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   120
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   121
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   122
License
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
This software is published under terms of MIT license.
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   125
See COPYING for full text of license.
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   126
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   127
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   128
Website
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   129
-------
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 14
diff changeset
   130
Latest version can be obtained at http://wiki.fiction.cz/Pyrit