Commit Graph

123 Commits

Author SHA1 Message Date
f1df7a3b1a Slight tweak to how ray offsets are done. 2016-06-29 15:00:44 -07:00
52acee33af Implemented rectangular area lights.
Also added Cornell Box test scene.
2016-06-29 14:30:42 -07:00
fd195576d1 First renders with lighting. Yay!
The lighting is super crappy, and pretty much hacked in.  Will
need to redo this properly soon.  However, this verifies that
certain other parts of the code are (mostly) working properly.
2016-06-27 23:16:39 -07:00
3b85b60a62 Implemented occlusion rays.
This is prep for lighting support: occlusion rays are useful for
speedier shadow tests.
2016-06-27 21:01:18 -07:00
6f6807009b Prepping for adding lighting.
The part of the renderer responsible for light transport has been
split out into a LightPath struct.  Also moving over to spectral
rendering, although it's a bit silly at the moment.
2016-06-26 23:08:24 -07:00
f7e57f2aee Scenes with lights now get parsed correctly. 2016-06-25 22:49:40 -07:00
c2d36e0d14 Beginnings of parsing sphere lights. 2016-06-23 20:46:57 -07:00
1cbf20e67f Beginnings of light sources. Yay! 2016-06-19 14:32:13 -07:00
d14e2c93b7 Converted Image over to store renders in XYZ colorspace. 2016-06-18 18:08:35 -07:00
18245b725c All final intersections are now done in world space.
BVH traversal still happens in local space, but final actual
surface intersection calculations are done in world space by
transforming the triangle into world space.  This is to improve
numerical consistency between intersections.
2016-06-09 01:04:12 -07:00
e2954ba5b0 Added more code for handling XYZ color and spectral samples. 2016-06-08 23:00:09 -07:00
61e3d47f56 Changed BBox/Ray intersection code to use more simd ops.
This, of course, depends on the simd ops being there, which
currently they are not.  But in the future, hopefully this will
make things speedy.  Will need to test, of course.
2016-06-08 22:57:22 -07:00
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
4493afd85b Updated todo.txt 2016-06-03 21:05:52 -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
fac46d6db3 Added gitignore for test_renders directory. 2016-06-03 18:15:48 -07:00
06c377ca10 Updated todo. 2016-06-02 23:06:48 -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
c3d3145817 Fixed bug in ray intersection code.
The max_t was getting overwritten during transforms.
2016-06-02 22:36:02 -07:00
a467a2a959 Updated Cargo.lock dependencies. 2016-06-02 22:30:10 -07:00
848d0afd40 Some minor code formatting cleanup and debug printing. 2016-05-28 14:35:37 -07:00
ef31093dcb Split xform stack out into its own type.
This is mainly just to make the tracer code read more cleanly.
All of the pushing and popping logic obscured the big picture
and made things a bit confusing.
2016-05-28 14:15:05 -07:00
56b5267b7a Fixed incorrect rendering angle.
The problem was in how the camera rays were generated.
2016-05-28 13:05:16 -07:00
1e93e53822 Mixed matrix parsing, and strip quotes from file path in parsing. 2016-05-28 01:24:58 -07:00
e3db7cd6ca Basic mesh parsing.
The test scene isn't rendering properly, presumably because
something isn't correct in the parsing (although it's not clear
it's in the mesh parsing).  Need to investigate.
2016-05-28 01:03:56 -07:00
99dc371a75 Beginnings of a mesh parser. Also cleaned up some unused imports. 2016-05-25 08:16:05 -07:00
d8cdf4d189 Cleaned up DataTree API and finished Instance parsing. 2016-05-23 00:08:12 -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
b58ba10f9b So the mutable aliasing in Tracer properly.
Apparently this is what UnsafeCell is for, and the code I wrote
before wasn't technically correct, even thought it worked in
practice.  Hooray for doing things properly!
2016-03-21 01:08:19 -07:00
e747d7fee8 Added a simple example .psy file for testing purposes. 2016-03-13 13:14:11 -07:00
f6891173eb Moved ray tracing responsibilities to the Tracer.
This is still pretty WIP, but it at least gets the functionality
back to where it was before.
2016-03-13 13:01:10 -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
62389d42ae Escaping now works in the DataTree tokenizer.
Also byte offsets of the tokens in the text are now stored in
the tokens, for eventual use in parse error messages.
2016-03-06 14:10:17 -08:00
d769ccecee Beginning work on DataTree and associated parsing. 2016-03-06 12:27:33 -08:00
a569586455 Adjusted the API of the BVH builder.
The bounder closure now returns slices of BBoxes instead of
filling in a given Vec.
2016-01-06 23:47:32 -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
d7f6142749 Image output now does proper sRGB correction. 2016-01-02 23:21:42 -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