TODO
author Radek Brich <radek.brich@devl.cz>
Thu, 13 Dec 2007 00:08:11 +0100
branchpyrit
changeset 36 b490093b0ac3
parent 34 28f6e8b9d5d1
child 40 929aad02c5f2
permissions -rw-r--r--
new virtual Shape::intersect_bbox implementation of triangle-AABB intersection octree building updated and simplified with help of this new method octree made default for Python, it's currently much faster than kd-tree (both building and traversal)
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
====
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     3
 * concurrent read? (concurrent write should not occur)
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     4
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     5
Future Plans
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
     6
============
11
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     7
 * 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
     8
   - optimize structures
4d192e13ee84 move nearest_intersection() to Container, add dummy KdTree.load(), plus small fixes
Radek Brich <radek.brich@devl.cz>
parents: 7
diff changeset
     9
   - optimize construction: do not use bounding boxes of shapes, instead implement box-shape intersection
19
4e0955fca797 added Camera, currently w/o Python binding
Radek Brich <radek.brich@devl.cz>
parents: 15
diff changeset
    10
   - save/load
31
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
    11
 * uniform grid, octree
b4e09433934a refraction
Radek Brich <radek.brich@devl.cz>
parents: 30
diff changeset
    12
 * textures (3D procedural, pixmaps later)
28
ffe83ca074f3 smooth triangles (aka Phong shading)
Radek Brich <radek.brich@devl.cz>
parents: 21
diff changeset
    13
 * update Python binding: Camera, new classes
21
79b516a3803d naive color driven sub-sampling
Radek Brich <radek.brich@devl.cz>
parents: 20
diff changeset
    14
 * namespace
32
8af5c17d368b new Raytracer option: oversampling
Radek Brich <radek.brich@devl.cz>
parents: 31
diff changeset
    15
 * stochastic oversampling
34
28f6e8b9d5d1 quaternion moved to extra header file
Radek Brich <radek.brich@devl.cz>
parents: 32
diff changeset
    16
 * absorbtion of refracted rays in dense materials (can be computed using shape distance and some 'absorbance' constant)
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
    17
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    18
New Classes?
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    19
============
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    20
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    21
container.h  -- Container
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    22
kdtree.h  -- KdTree
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    23
shapes.h  -- Triangle, Sphere
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    24
scene.h   -- Ray, Light, Camera, Scene
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    25
material.h -- Material, Texture
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    26
matrix.h  -- Matrix
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    27
vector.h  -- Vector3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    28
reader.h  -- Reader, WavefrontReader
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    29
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    30
KdTree top
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    31
wf = new WavefrontReader()
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    32
wf.setContainer(top)
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    33
wf.setTransform(monkey_pos_matrix)
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    34
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
    35
// more transform&reads
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    36
destroy wf
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    37
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    38
top.optimize()  -- i.e. build tree
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    39
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    40
Scene scene -- container with shapes, a camera and lights
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    41
scene = new Scene()
7
bf17f9f84c91 kd-tree: build algorithm - searching for all posible splits
Radek Brich <radek.brich@devl.cz>
parents: 6
diff changeset
    42
scene.setTop(top) -- top object in hierarchy
20
f22952603f29 new C++ demo: realtime.cc (real-time scene viewer using SDL)
Radek Brich <radek.brich@devl.cz>
parents: 19
diff changeset
    43
scene.setCamera(new Camera(eye, u, v, p))
3
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    44
scene.addLight(new PointLight(pos, color))
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    45
rt.setScene(scene)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    46
rt.render(w,h)
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    47
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    48
8f9cb0526c47 some notes in TODO
Radek Brich <radek.brich@devl.cz>
parents: 2
diff changeset
    49
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
    50
more parameters -- the data (ray origin and direction)