a6d8de43d7
Make BVH4 calculate and store its node count.
...
Useful for debugging.
2017-04-14 22:14:52 -07:00
0296fd2d34
Fixed a bunch of problems that came up when running debug build.
...
The worst offender was an obvious and nasty bug in the bitstack
implementation. Hooray for debug asserts!
2017-04-14 21:37:29 -07:00
44e3ee8b4b
Fixed nasty bug in BVH4 building.
...
In practice it worked fine, but only by accident. NaN's were
being passed to the lerp_slice function, which led to the
correct result in this case but is icky and dependant
on how lerp_slice is implemented.
2017-04-14 20:25:12 -07:00
f8d47dc24a
Fixed some things for building with SIMD support.
2017-04-13 23:28:26 -07:00
7f761a9489
Added custom aligned allocations to MemArena.
...
Used in BVH4.
2017-04-13 23:06:56 -07:00
8b1e3a3cdb
Added some dev printing info.
2017-04-13 22:50:47 -07:00
573c5da5ab
Got BVH4 working. Woo hoo!
2017-04-13 22:44:34 -07:00
53a14996c9
Completed first attempt at implementing BVH4.
...
Completely untested, so almost certainly non-functional. But it
compiles!
2017-04-12 23:33:34 -07:00
e0c6dfbd76
Beginnings of BVH4 implementation.
...
- Created a traversal-order table.
- Created a function to help index into that table.
2017-04-11 23:10:54 -07:00
a2d7f9e149
Added BBox4 and BVH4 types.
...
BVH4 is just a skeleton (duplicated BVH) right now. But BBox4
is complete (pending testing).
2017-04-11 14:22:11 -07:00
c05bae2636
Created a BitStack128 type and added it to Ray.
...
This will be used for BVH4 traversal.
2017-04-11 11:13:23 -07:00
f5ba119562
Switched to clap for command line argument parsing.
2017-04-11 10:15:32 -07:00
d9564bc005
Refactor and rework of BVH.
...
The BVH building code is now largely split out into a separate
type, BVHBase. The intent is that this will also be used by
the BVH4 when I get around to it.
The BVH itself now uses references instead of indexes, allocating
and pointing directly into the MemArena. This allows the nodes
to all be right next to their bounding boxes in memory.
2017-04-10 23:41:38 -07:00
db3e4ad129
MemArena now slowly increases the size of each subsequent block.
...
This seems to work more nicely than a fixed block size, because
it adapts to how much memory is being requested over-all. For
example, a small scene won't allocate large amounts of RAM,
but a large scene with large data won't be penalized with a
lot of tiny allocations.
2017-04-10 20:49:55 -07:00
70f715ec2d
MemArena now collects statistics about its usage.
...
You can print out statistics about the main arena used in
Psychopath by passing the new --stats flag.
2017-04-10 18:34:08 -07:00
9df864664e
Fixed bug in Psychoblend.
2017-04-10 16:35:57 -07:00
6623443e2e
Improved .psy file parsing error messages.
...
Biggest improvement: it gives you line numbers. But also progress
on better descriptions.
2017-04-10 14:03:01 -07:00
f46e72b0ca
Forgot to remove extraneous println's from MemArena.
...
Also updated MemArena documentation.
2017-04-10 00:50:51 -07:00
0672db3a46
Fixed some typos and formatting in mem_arena.
2017-04-10 00:32:34 -07:00
66eb01947f
Improve MemArena to only do a large alloc if it doesn't fit in the current block.
2017-04-10 00:25:10 -07:00
d3b3a50a4d
LightTree and Assemblies use MemArena now.
2017-04-10 00:03:49 -07:00
c82c821b31
BVH and objects now use MemArena.
2017-04-09 23:33:36 -07:00
e9e202933f
Assembly type now partially uses MemArena.
2017-04-09 18:27:01 -07:00
fc15fa9192
World type uses memory arena now.
2017-04-09 17:56:06 -07:00
57aa9be496
First steps towards using the memory arena allocator.
...
Changed Camera to us the memory arena allocator, and worked out a
bunch of stuff through doing that.
2017-04-09 17:31:17 -07:00
a8bea5c09d
Made MemArena so it will actually work for multiple allocations.
...
Silly mistake.
2017-04-09 17:29:42 -07:00
662f02a78d
Derive Debug for MemArena.
2017-04-09 16:30:16 -07:00
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