Commit Graph

445 Commits

Author SHA1 Message Date
276e3d361b Renamed Arena to MemArena. Less ambiguous. 2017-04-09 16:22:34 -07:00
6f043b575a Implemented a basic memory arena in a sub-crate. 2017-04-09 15:53:06 -07:00
f6ffd8d30b Fixed a typo in a comment. 2017-03-29 13:20:58 -07:00
7223f69151 Implemented a more efficient orthonormal basis function.
Algorithm taken from the paper "Building an Orthonormal
Basis, Revisited" by Duff et al.
2017-03-29 13:19:51 -07:00
4a86c4122a Laying some groundwork for a simple shading system. 2017-03-14 00:27:25 -07:00
114f11c583 Fixed bug in GTRClosure that was resulting in all NaN outputs. 2017-03-12 00:33:36 -08:00
0b05d364e4 Added GTR surface closure.
Not tested yet, just a straightforward conversion from the C++
Psychopath codebase.  So there are probably bugs in it from the
conversion.  But it compiles!
2017-03-07 08:31:57 -08:00
3842a8a9a6 Updated crate dependencies. 2017-03-07 08:26:38 -08:00
db1ddeb64d Updated .gitignore file. 2017-02-23 19:59:22 -08:00
f4445417dc Reorganizing the module tree.
Enough things had accumulated that it seemed to make sense to
group some stuff together.  So here it is.
2017-02-14 00:14:08 -08:00
d504ca5e6a Got DistantDiscLights working! Yay!
This involved fixing a bug in PsychoBlend.  It was including
translation in how it was transforming the sun lights' direction
vector.
2017-02-13 00:03:34 -08:00
3cbb816d4b Added DistantDiskLight (a.k.a. sun light) parsing and data structures.
Also created a proper World struct in the process, to store all
infinite-extent type stuff.

Note that I goofed and did a new rustfmt pass but forgot to
commit before making these changes, so there's a lot of
formatting changes in this too.  *sigh*
2017-02-12 20:29:08 -08:00
746b3b0c1f Replaced try!() macros with new ? operator. 2017-02-06 16:20:58 -08:00
f1e558de05 Updated todo. 2017-02-06 16:08:52 -08:00
c3f3599c09 Added sun lamp exporting to PsychoBlend.
Psychopath does not yet use this info, however.
2017-02-06 16:06:55 -08:00
0e8d708ff0 Made samples per bucket configurable. 2016-10-16 14:55:00 -07:00
bb4e57795f Added support for OpenEXR output. 2016-10-09 20:34:58 -07:00
0d189f763d Changed LightTree traversal to be a bit better in its choices.
After some experimentation, it's pretty clear that the LightTree
performs a lot better with a model of spherical _volume_ light
sources.  This makes sense considering that generally they
represent a distribution of other lights in space.

This is a quick hack to make it behave a bit more like that.  But
the long-term solution will be to adjust how
estimate_eval_over_solid_angle() of surface closures is implemented.
2016-08-21 15:27:15 -07:00
7f1ab59c5e Implemented alternative SAH split that uses off-axis split planes.
It doesn't seem to actually perform better, generally, but I'm
leaving it in for future reference for other things.
2016-08-21 15:26:47 -07:00
c71b00ca31 LightTree now works with lights in hierarchical instancing. 2016-08-21 00:19:43 -07:00
97b5ef77f8 Code cosmetics: organize and alphabetize crate/mod/use statements. 2016-08-20 18:10:55 -07:00
f75c0c78fe Moved TransformStack into its own module.
It's clear at this point that it will be useful outside of Tracer.
2016-08-20 17:43:26 -07:00
c997c55739 Separate timing of rendering and image writing in print out. 2016-08-20 16:25:12 -07:00
cf49cdbb02 Moved int hash functions into own file, and use in quick_select(). 2016-08-14 16:03:17 -07:00
fbeadfce29 Use quick select for balanced BVH building.
This gets rid of a crate dependency, and also is faster.
2016-08-14 00:51:21 -07:00
024ca560af Minor optimization in the transform stack.
Got rid of the scratch space by writing directly into the main
stack vector when merging transforms.  Involves a small bit of
unsafe code.
2016-08-06 01:51:20 -07:00
91d88cbdf9 Updated todo. 2016-08-03 20:20:32 -07:00
08576b9934 Cleaned up console output. 2016-07-31 12:27:06 -07:00
c6f6266a38 Added timer output so you can see how long things take. 2016-07-31 12:05:28 -07:00
024437c657 Updated todo. 2016-07-31 11:49:53 -07:00
d12b76a933 Minor tweak to horizontal add and multiply for Float4.
In theory this should make it more pipeline-able.
2016-07-31 11:49:01 -07:00
b4939f88c8 Silence some warnings. 2016-07-31 11:19:30 -07:00
3e7b142cd8 Implemented light tree sampling, for better sampling of many lights. 2016-07-31 11:14:33 -07:00
1f94791b6b Moved SAH splitting code into its own function.
This is in prep for the light tree, where we'll want to use that
code.
2016-07-30 21:20:01 -07:00
2b05f65024 Updated dependencies. 2016-07-30 20:23:20 -07:00
06b76ddb6c Fixed bug in PsychoBlend.
On some systems Python would complain about the "progress"
variable being accessed without it existing yet.  Weird.  But
this fixes it.
2016-07-30 19:41:51 -07:00
7ef5846c89 Got rid of indexing into Float4 and 3d vector elements.
This assures correct semantics for SIMD usage.
2016-07-30 19:36:54 -07:00
378f69dd57 Render progress bar is now updated when rendering in Blender. 2016-07-21 23:45:42 -07:00
e4c94d0c58 Optional use of SIMD intrinsics, via feature in cargo.
This is disabled by default right now, because it only builds on
nightly.
2016-07-16 19:58:39 -07:00
4db96bc758 Use simple if-statement-based min/max functions in hot code.
Again, for whatever reason this is notably faster than the stdlib
min/max functions.
2016-07-16 17:55:18 -07:00
7401c6fb99 Use fast approximate exp functions for XYZ color curves.
This brings a significant performance improvement, and doesn't
appear to have any visual impact.
2016-07-16 17:53:50 -07:00
177bb95eff Got rid of UnsafeCell in Tracer.
To do this, I moved the accel rays into an outer struct, which
then calls the main tracing code as an inner struct.
2016-07-16 16:26:34 -07:00
1571c1634e Sped up min and max functions in Float4.
Turns out that the standard min/max functions were slow for
some reason, and simple if statements are much faster.  This
simple change improves render times by over 30%.  Crazy.
2016-07-16 15:56:14 -07:00
76f074f866 Added a TODO comment. 2016-07-16 15:10:07 -07:00
ec75f11206 Render buckets in hilbert curve order.
Provides a slight speed-up.
2016-07-16 14:53:03 -07:00
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
9d47dfdeb2 Forgot one place where bounds need to be merged for motion blur. 2016-07-16 12:28:08 -07:00
2e3851837d Implemented SAH splitting for the BVH. Also fixed crash bug.
The bug was in the previous commit, where I thought I was
preventing out-of-bounds access during traversal by limiting
the tree depth.  While the idea was correct, I forgot that the
traversal stack needs _2_ extra slots on top of the tree depth,
not just 1.  Fixed.
2016-07-16 03:21:57 -07:00
35ef58b09c Special case BVH building when we get too close to max depth.
This avoids exceeding max BVH depth even in pathological cases.
Still need improve non-worst case building, but this at least
prevents crashes in worst case.
2016-07-16 00:05:23 -07:00