Commit Graph

39 Commits

Author SHA1 Message Date
890c04c44a Added XYZ color spectrum sampling code.
This will be critical for spectral rendering, whenever I get
around to it.
2016-06-07 08:14:19 -07:00
0b5a3de2dd Added command line flag to set number of render threads. 2016-06-05 10:08:27 -07:00
5ec1f534cf Implemented bucketed rendering. 2016-06-05 01:27:55 -07:00
a681ba461e Implemented basic multi-threaded rendering.
It's a bit inefficient because a thread is spawned for each pixel.
Need to implement bucketing.
2016-06-03 21:03:04 -07:00
43c5a94ebb Cleaned up command line options. Removed old procedural scene code. 2016-06-02 23:00:31 -07:00
039943e0cb Auto-formatting code with new version of rustfmt. 2016-06-02 22:43:35 -07:00
99dc371a75 Beginnings of a mesh parser. Also cleaned up some unused imports. 2016-05-25 08:16:05 -07:00
f5dd8f7a14 Got the bare beginnings of scene file parsing and rendering working.
It still doesn't parse or render any actual objects in the scene,
so all renders are just black.  But the basic structures are in
place.  Yay!
2016-05-21 15:14:10 -07:00
4988a6d1e6 Added AssemblyBuilder and got instancing working (sans testing...).
The AssemblyBuilder is responsible for collecting the data needed
to actually create an Assembly.  AssemblyBuilders are now the
only way to create an Assembly, which guarantees that Assemblies
aren't half-baked.

Also got instancing working with transforms and such.  It may not
be _really_ working because I don't have a complex test case for
it yet.  But that will come later.
2016-04-23 20:14:10 -07:00
901fc88f63 Assemblies now use BVH accel and actually utilize instances. 2016-04-23 13:37:38 -07:00
e96798ab6b Lazily committing a bunch of stuff.
Includes:
- More scene parsing code.  Making good progress!
- Making the rendering code actually use the Scene and Assembly
  types.
- Bare beginnings of a Tracer type.
2016-03-12 00:33:11 -08:00
38d33ed144 More work on scene parsing.
Using Nom to help with parsing the contents of leaf nodes.
2016-03-10 23:58:19 -08:00
25f8e0782a Added Assembly and Scene types.
This is in preparation for real scene data, as parsed from real
psy files.  Exciting!
2016-03-08 21:57:51 -08:00
147b22b861 Added ability to print the debug data of a data tree file.
This is purely for debug purposes, to make sure everything is
working correctly.  Should be removed in the future.
2016-03-06 23:25:37 -08:00
6268a61770 Realized I already did most of the DataTree work in another file.
Weird, to be frank.  It was a lot of work.  Can't believe I don't
even remember doing it before.  Oh well.

In any case, I've improved the 'old' one quite a bit.  It should
be more robust now, and will provide errors that may actually be
useful to people when a file fails to parse.
2016-03-06 22:47:41 -08:00
d769ccecee Beginning work on DataTree and associated parsing. 2016-03-06 12:27:33 -08:00
655c16542d Implemented basic deformation motion blur for triangles.
Not 100% happy with the interface of the BVH building yet, and
there are still some missing features as well.  But it's a start!
2016-01-05 07:44:37 -08:00
c1b063411f First steps towards motion blur support. 2016-01-03 21:21:46 -08:00
907d15f643 Started creating an interface for surfaces.
Testing it out by making a bogus TriangleMesh surface type.
2016-01-03 00:09:23 -08:00
a14a93f5a1 BVH now no longer directly references the objects it indexes.
Everything is done with indices anyway, so there was no reason
for it to store an internal reference to the object data.  This
gets rid of the type parameter and lifetime parameter on the BVH
struct itself, which will also make it easier to bundle it with
the data it indexes, which will be important later on.
2016-01-02 22:55:20 -08:00
470618fa6a Created a Renderer type to be in charge of rendering. 2016-01-02 22:34:36 -08:00
d25f8308a2 Now using Camera to generate rays in test scene. 2016-01-02 21:23:17 -08:00
7c5c2e4308 Implemented a Camera type. 2016-01-02 20:27:53 -08:00
9b5e6ad23d Replaced BVHTraverser with a method that takes a closure.
This is not only simpler conceptually, but also turns out to have
better performance.
2016-01-02 13:10:06 -08:00
5278675fb7 BVH can now have multiple objects per leaf. 2016-01-02 12:35:00 -08:00
cb8db6a0b6 Added command-line control of sample count, and more interesting default scene. 2016-01-02 11:17:52 -08:00
eaeec4c207 BVH now works on slices of Rays, taking a breadth-first approach. 2015-12-31 13:12:15 -08:00
53c9ff9534 Made a BVHTraverser iterator that traverses a BVH with a ray.
It yields the objects that the ray needs to be tested against.
Thus it is the responsibility of the code using the iterator
to actually do the object-level ray tests and update the ray's
max_t etc. accordingly.

This keeps all of the BVH-related code generic with respect to
what kind of object/data the BVH actually contains, which means
the same BVH code can be used for both scene-level and
triangle-level data.
2015-12-31 11:15:35 -08:00
1c660dda13 Generalized the BVH to... pretty much anything.
The BVH is now generic over any kind of data.  The building
function takes in a closure that can bound the given data type
in 3d space, and the rest just works.
2015-12-31 00:32:38 -08:00
7f7870534c Implemented a very basic BVH for lists of triangles.
This isn't a good implementation by any means.  It's just to get
things started.
2015-12-29 16:56:33 -08:00
a66059d13e Implemented anti-aliasing with permuted halton sequence. 2015-12-29 13:42:40 -08:00
54f4c278ca Added triangle/ray intersection code.
As a test, the image written out is now a raytraced triangle,
with its color representing its UV coordinates.
2015-12-28 14:43:30 -08:00
539dc47b4e Fixed stupid bug in data tree parsing code. 2015-12-28 00:58:41 -08:00
37f0eb33dd Added basic "data tree" parsing.
The code here is a bit messy right now.  Just did enough to get
it working.  But it needs to be cleaned up and report parse
errors in a human-readable way, among other things.
2015-12-28 00:49:15 -08:00
b20910a252 Created BBox, an axis-aligned 3d bounding box type. 2015-12-27 00:44:59 -08:00
3f614f3728 Added command line parsing and PPM image writing.
Also the beginnings of a Ray struct.
2015-12-27 00:13:35 -08:00
e239f5aaaf Moved all the 3d math stuff into its own module. 2015-12-26 19:27:32 -08:00
ff10e696c8 Finished vector/point/normal/matrix code.
Sans bugs, optimization, and possibly convenience functions down
the line.
2015-12-26 17:50:37 -08:00
aa6b72493b First commit.
WIP basic 3d math code.
2015-12-26 00:38:29 -08:00