TODO
author Radek Brich <radek.brich@devl.cz>
Fri, 28 Mar 2008 21:47:32 +0100
branchpyrit
changeset 51 89fec8668768
parent 49 558fde7da82a
child 57 1e92c21b9a61
permissions -rw-r--r--
remove debug messages - algorithm seems stable, but it's slow
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     1
Bugs
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     2
====
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
     3
 * bad sphere/box transmisivity
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
     4
   Inside-out transition is ignored as every second intersection is ignored to avoid duplicit
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
     5
   intersect points. This solution should be replaced by moving ray origin a little forward, which
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
     6
   should work as well and without side-effects.
31
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     7
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     8
Future Plans
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     9
============
46
6493fb65f0b1 Doxygen
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
    10
 * changing main ray tracing algoritm to more flexible architecture with a Sampler object:
49
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    11
  - enhance Sampler to support subsampling
46
6493fb65f0b1 Doxygen
Radek Brich <radek.brich@devl.cz>
parents: 44
diff changeset
    12
  - rewrite pthreads
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    13
 * namespace
11
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    14
 * kd-tree:
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
    15
   - optimize structures
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    16
   - optimize construction: use box-shape intersection instead of bounding boxes of shapes
40
929aad02c5f2 Makefile: added help and distclean target, plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 34
diff changeset
    17
   - optimize traversal -- no std::vector
19
4e0955fca797 added Camera, currently w/o Python binding
Radek Brich <radek.brich@devl.cz>
parents: 15
diff changeset
    18
   - save/load
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    19
 * textures (3D procedural, pixmaps)
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    20
 * update Python binding: Camera, other new classes
32
8af5c17d368b new Raytracer option: oversampling
Radek Brich <radek.brich@devl.cz>
parents: 31
diff changeset
    21
 * stochastic oversampling
34
28f6e8b9d5d1 quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents: 32
diff changeset
    22
 * absorbtion of refracted rays in dense materials (can be computed using shape distance and some 'absorbance' constant)
44
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    23
 * implement efficient AABB-ray intersection using Plucker coordinates
3763b26244f0 MIT license for sources
Radek Brich <radek.brich@devl.cz>
parents: 40
diff changeset
    24
 * generalization: Camera "shader" (ray generator), surface shader and maybe light & background shaders
14
fc18ac4833f2 replace Plane with axis-aligned Box (because infinite Plane is not usable with kd-tree)
Radek Brich <radek.brich@devl.cz>
parents: 13
diff changeset
    25
49
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    26
Performance Weak Points
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    27
=======================
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    28
 * Raytracer::render -- allocating and deallocating every sample
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    29
558fde7da82a workaround for divide by zero bug in octree
Radek Brich <radek.brich@devl.cz>
parents: 46
diff changeset
    30
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    31
New Classes?
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    32
============
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    33
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    34
shapes.h  -- Triangle, Sphere
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    35
scene.h   -- Ray, Light, Camera, Scene
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    36
material.h -- Material, Texture
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    37
reader.h  -- Reader, WavefrontReader
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    38
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    39
wf = new WavefrontReader()
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    40
wf.setContainer(top)
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    41
wf.setTransform(monkey_pos_matrix)
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    42
wf.read("monkey.obj")
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    43
// more transform&reads
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    44
destroy wf
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    45
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    46
Scene scene -- container with shapes, a camera and lights
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    47
scene = new Scene()
20
f22952603f29 new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents: 19
diff changeset
    48
scene.setCamera(new Camera(eye, u, v, p))
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    49
scene.addLight(new PointLight(pos, color))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    50
rt.setScene(scene)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    51
rt.render(w,h)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    52
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    53
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    54
constructors have zero or one parameter by default -- the object to copy data from
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    55
more parameters -- the data (ray origin and direction)