Commit Graph

82 Commits

Author SHA1 Message Date
5bc97f69b8 Actually use the background color from the scene file. 2016-07-16 13:54:41 -07:00
8cd445813a Removed some dead code. 2016-07-16 13:36:34 -07:00
c2eb421fd8 Actually use seed in renders.
This is important for animations, where you don't want the same
noise pattern every frame.
2016-07-10 17:56:42 -07:00
e4f9a54e48 Leave console output on a newline. 2016-07-10 17:47:28 -07:00
5b461220a5 PsychoBlend now exports meshes as meshes, and Psychopath renders to PNGs. 2016-07-10 17:42:28 -07:00
e8ee371423 Silence some warnings. 2016-07-10 16:46:14 -07:00
da46878243 Print render progress and auto-determine bucket size.
The bucket size is automatically determined based on a target
number of samples per bucket.
2016-07-10 16:40:30 -07:00
5df583c2d0 Multiple light sources are now handled. 2016-07-10 00:10:49 -07:00
0880a0f19d Make renderer actually use the material system properly.
The intersection code still isn't using any kind of shading,
and materials aren't parsed by the parser, but the renderer
class itself is using them.
2016-07-07 19:51:19 -07:00
543f2719e4 Fixed bugs in global illumination.
It was a stupid thing in the Lambert closure.  It was returning
the wrong direction vector.
2016-07-04 11:54:46 -07:00
e56ac418da Beginnings of global illumination.
There are still some obvious bugs in it that I haven't tracked down,
so the renders aren't correct yet.
2016-07-03 01:18:50 -07:00
6e8f0894fd Image struct can now dole out buckets in a thread-safe way.
This avoids the whole-image locking that was being done before,
which was causing a lot of thread contention.
2016-07-02 16:27:19 -07:00
02a0740cac More proper use of light sources. 2016-07-01 00:00:38 -07:00
f927dd0d46 Silencing a bunch of compiler warnings. 2016-06-29 15:23:07 -07:00
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
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
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
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
039943e0cb Auto-formatting code with new version of rustfmt. 2016-06-02 22:43:35 -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
99dc371a75 Beginnings of a mesh parser. Also cleaned up some unused imports. 2016-05-25 08:16:05 -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
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