245 Commits

Author SHA1 Message Date
Josh Holtrop
88444e25b8 added scenes/csg.fart, fixed bug in loading boolean objects in Scene-load.cc
git-svn-id: svn://anubis/fart/trunk@196 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-09 00:09:33 +00:00
Josh Holtrop
09e97510d8 added built-in timer around Scene::render() call
git-svn-id: svn://anubis/fart/trunk@195 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 22:51:47 +00:00
Josh Holtrop
db72b5ba82 scanning scene files for camera definitions before shapes and lights
git-svn-id: svn://anubis/fart/trunk@194 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 22:31:15 +00:00
Josh Holtrop
12eb2f2476 updated .todo, scenes/infinity.fart with a second light source
git-svn-id: svn://anubis/fart/trunk@193 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 21:08:17 +00:00
Josh Holtrop
9972ebdb41 fixed nasty bug in shapes/Cyl where intersection results were being allowed if they were negative
git-svn-id: svn://anubis/fart/trunk@192 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 16:03:52 +00:00
Josh Holtrop
14b6735c1c minor formatting
git-svn-id: svn://anubis/fart/trunk@191 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 15:29:50 +00:00
Josh Holtrop
1ad08d9998 cleaning up shapes/Cyl a bit
git-svn-id: svn://anubis/fart/trunk@190 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-07 19:17:47 +00:00
Josh Holtrop
feeaa34d62 tweaked Scene::calculateLightContribution() and scenes/cyls.fart slightly
git-svn-id: svn://anubis/fart/trunk@189 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-07 18:38:40 +00:00
Josh Holtrop
608939bff4 Scene-load setting light position based on the current transform
git-svn-id: svn://anubis/fart/trunk@188 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-06 23:32:00 +00:00
Josh Holtrop
24ef1eca3c added scenes/trans-boxes.fart, changed Scene to consider all back-faces as front-faces by inverting the normal vector, fixed bug in Scene::calculateLightContribution() which was messing up shadow values and back-face intensities for transparent objects
git-svn-id: svn://anubis/fart/trunk@187 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-06 19:12:26 +00:00
Josh Holtrop
b50c4de1bc added parser, nodes, Scene-load support for transparency in materials
git-svn-id: svn://anubis/fart/trunk@186 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-05 20:04:13 +00:00
Josh Holtrop
f9cf1381a6 working on shadows but they are appearing in weird places...
git-svn-id: svn://anubis/fart/trunk@185 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-04 02:03:21 +00:00
Josh Holtrop
7d0b4c5646 moved Lighting::computePhong() into Scene, removed Lighting module
git-svn-id: svn://anubis/fart/trunk@184 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-04 00:16:32 +00:00
Josh Holtrop
e5cae862eb updated sample scenes with reflections
git-svn-id: svn://anubis/fart/trunk@183 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 04:37:09 +00:00
Josh Holtrop
e233056880 added Color::operator*=(), added jitter computation to reflectance and transparency recursion, recursing now but there is still a jitter or recursion issue
git-svn-id: svn://anubis/fart/trunk@182 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 04:30:46 +00:00
Josh Holtrop
1f00625379 made verbose the default option
git-svn-id: svn://anubis/fart/trunk@181 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 03:22:12 +00:00
Josh Holtrop
73cc495a79 removed debug print
git-svn-id: svn://anubis/fart/trunk@180 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 03:08:11 +00:00
Josh Holtrop
bb5eb07c75 fixed bug in material definitions, added them to cyls.fart, they are working now!
git-svn-id: svn://anubis/fart/trunk@179 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 03:06:56 +00:00
Josh Holtrop
31e2604f98 Scene-load.cc handling material definitions
git-svn-id: svn://anubis/fart/trunk@178 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 02:56:33 +00:00
Josh Holtrop
fce4d82a73 added material definitions to parser
git-svn-id: svn://anubis/fart/trunk@177 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 02:30:43 +00:00
Josh Holtrop
56a5fa6166 added cyls.fart sample scene, removed hard-coded scene from Scene-load.cc; reading from a file is working!
git-svn-id: svn://anubis/fart/trunk@176 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-02 00:41:27 +00:00
Josh Holtrop
10500d08aa fixed parser bug with sphere_items, made VFOVNode inherit from NumberNode, updated sample scene infinity.fart, reading scene from a file appears to be working!
git-svn-id: svn://anubis/fart/trunk@175 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-02 00:25:41 +00:00
Josh Holtrop
84f6b04cd7 removed static const Material::white (had a problem with C++ since the order that the static const constructors were being called in was not correct according to the order that the code depended on them), made Shape constructor use a common default material instead of recreating one every time
git-svn-id: svn://anubis/fart/trunk@174 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-02 00:17:56 +00:00
Josh Holtrop
6a649ecac7 fixed Lighting to ignore dot products less than 0 for diffuse coefficients; this broke shapes/Subtract again. fixed Material::white to be assigned to by Material() as evidently it was not calling the constructor properly otherwise. added initializer in Material::Material() to set ambient color to white. Scene constructing PointLight instead of a raw Light when loading from a file
git-svn-id: svn://anubis/fart/trunk@173 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 23:50:53 +00:00
Josh Holtrop
adf7997417 added .todo file, commented out hard-coded sample scene
git-svn-id: svn://anubis/fart/trunk@172 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:52:51 +00:00
Josh Holtrop
65c447f85a filled out Scene::processLight(), added color keyword to light specification
git-svn-id: svn://anubis/fart/trunk@171 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:41:23 +00:00
Josh Holtrop
0ea6e96e0a filled out Scene::processTransformBlock()
git-svn-id: svn://anubis/fart/trunk@170 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:31:42 +00:00
Josh Holtrop
84249c8231 filled in Scene::processOptions()
git-svn-id: svn://anubis/fart/trunk@169 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 23:22:36 +00:00
Josh Holtrop
bb07e12193 added Scene::process{Camera,Options,TransformBlock}()
git-svn-id: svn://anubis/fart/trunk@168 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 22:59:11 +00:00
Josh Holtrop
32fcafc687 filled out Scene::processBool() to handle all boolean shapes; added Node::isShape() virtual function to determine whether a node object represents a shape node
git-svn-id: svn://anubis/fart/trunk@167 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 21:22:30 +00:00
Josh Holtrop
5a83786103 filled out Scene::processPlane()
git-svn-id: svn://anubis/fart/trunk@166 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 20:39:29 +00:00
Josh Holtrop
e40677ba77 added "cyl" token to parser and parser rules for cyl object
git-svn-id: svn://anubis/fart/trunk@165 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 20:32:23 +00:00
Josh Holtrop
0462a2e7bc working on Scene::process*() functions to load the scene from a file
git-svn-id: svn://anubis/fart/trunk@164 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 19:59:22 +00:00
Josh Holtrop
1924bea5cf added color token to parser for specifying both diffuse and ambient color in a material, added ColorNode, switched color nodes to inherit from VectorNode
git-svn-id: svn://anubis/fart/trunk@163 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 18:25:12 +00:00
Josh Holtrop
44ba550f68 moved sample scene a bit, reset plane color to white, showing a Subtract object in the sample scene
git-svn-id: svn://anubis/fart/trunk@162 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 17:10:20 +00:00
Josh Holtrop
9ef826df43 fixed bug in shapes/Plane which would return negative results, fixed bug in main/Scene which would not check for shape to be non-null after calling getRayClosestHit()
git-svn-id: svn://anubis/fart/trunk@161 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 17:07:30 +00:00
Josh Holtrop
c78e5941c8 stubbed out recursion, changed Scene::getRayHits() to Scene::getRayClosestHit()
git-svn-id: svn://anubis/fart/trunk@160 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 16:16:40 +00:00
Josh Holtrop
5035c80d94 Subtract working, but reflected normals being returned... and where did my plane and cyl go?
git-svn-id: svn://anubis/fart/trunk@159 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 00:06:12 +00:00
Josh Holtrop
ef25fe4a5b added Subtract, including Union and Subtract in Shape.h
git-svn-id: svn://anubis/fart/trunk@158 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-27 22:43:49 +00:00
Josh Holtrop
5af3f0deca i think i have union working, need to test after transparency is working
git-svn-id: svn://anubis/fart/trunk@157 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-27 22:29:27 +00:00
Josh Holtrop
27cea5e702 added Union shape based on Intersect
git-svn-id: svn://anubis/fart/trunk@156 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-27 18:34:08 +00:00
Josh Holtrop
16f38f1f27 added sample Intersect object to sample scene, added Color::magenta constant
git-svn-id: svn://anubis/fart/trunk@155 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:35:20 +00:00
Josh Holtrop
f7eb4cd4b9 finished implementing shapes/Intersect::intersect()
git-svn-id: svn://anubis/fart/trunk@154 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:22:15 +00:00
Josh Holtrop
527dc6f1dc added virtual ~Solver() in util/Solver to avoid compiler warnings
git-svn-id: svn://anubis/fart/trunk@153 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:05:43 +00:00
Josh Holtrop
bcbec65a8f converted shapes/Intersect::intersect() to using BoolIntersectionList
git-svn-id: svn://anubis/fart/trunk@152 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:04:26 +00:00
Josh Holtrop
2e6c62a032 working on Intersect::intersect()
git-svn-id: svn://anubis/fart/trunk@151 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 02:17:22 +00:00
Josh Holtrop
7d64dd745d got Shape::IntersectionList::merge() to sort the result with IntersectionComparator successfully
git-svn-id: svn://anubis/fart/trunk@150 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 00:38:09 +00:00
Josh Holtrop
25d6432dbd trying to get a custom comparator to sort my IntersectionList after a merge()
git-svn-id: svn://anubis/fart/trunk@149 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-23 22:26:46 +00:00
Josh Holtrop
56278a8337 changed IntersectionList into a class so i could add merge()
git-svn-id: svn://anubis/fart/trunk@148 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-23 21:39:56 +00:00
Josh Holtrop
5f18370846 merged /branches/2009-02-23_Shape_IntersectList_Update into trunk
git-svn-id: svn://anubis/fart/trunk@146 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-23 20:37:57 +00:00