Commit Graph

223 Commits

Author SHA1 Message Date
Guillaume Gomez
ae11be1397 Improve messages for imge creation 2017-06-14 10:46:28 +02:00
851989f6a6 Added a license and licensing notes.
Also replaced some code I'm not sure where it came from or what
the license was.
2017-06-11 21:29:51 -07:00
58539520cf Fix some readme typos and improve phrasing. 2017-06-11 16:15:00 -07:00
2f91600182 Prepping repo with a readme before making repo public. 2017-06-11 16:07:12 -07:00
b8321beaad Split colorspace transform functions out into their own crate.
They are now generated by a build.rs script from nothing but the
colorspace's primaries, which makes it super easy to add more
colorspaces.  So easy that I added three more: ACES AP0, ACES AP1
and Rec.2020.

This lays the foundation for supporting output to different
colorspaces.
2017-06-11 03:03:23 -07:00
2a66485595 Supress information output when doing serialized ouput for PsychoBlend. 2017-06-10 22:34:14 -07:00
13ee6066b8 PsychoBlend: further preformance improvements, and minor fixes.
All scene data collection is now done in a single sweep of frame
changing.  Previous commits were already working towards this, and
but now it's done.  Yay!

Over-all, switching to this approach gives huge speed boosts on
large scenes with animation, rigs, dependencies, etc.  For such
scenes, frame changing is very expensive.
2017-06-10 16:11:28 -07:00
914a13f899 PsychoBlend: fixed silly copy/paste bug. 2017-06-10 01:58:20 -07:00
7236d2e666 PsychoBlend: fixed some bugs and made exporting even faster. 2017-06-10 01:38:33 -07:00
9025715335 Significant PsychoBlend improvements.
- Improved export time by quite a bit.
- Added more fine-grained status updates during export so it
  doesn't feel like it's hanging.
2017-06-09 23:57:18 -07:00
9d92bd099d PsychoBlend: rendering a cropped image using border feature now works. 2017-06-06 23:44:53 -07:00
71c320d87c Added command-line argument to render an image cropped. 2017-06-06 21:11:35 -07:00
59555f67f9 PsychoBlend: use stdin/out to transfer scene data by default.
This eliminates writing temp files to disk for any part of the
Blender/Psychopath integration.

The option to export to a file still exists, however, by
specifying an export output path.
2017-06-04 23:24:45 -07:00
a82c674308 PsychoBlend: remove unused output path. 2017-06-04 19:58:09 -07:00
ef5b573723 Some small export speed improvements in PsychoBlend. 2017-06-04 19:49:55 -07:00
a3332d4f6a Fixed a PsychoBlend bug that resulted in render not being fully displayed.
Getting the interplay between the reading the process output and
polling to see if it's finished is a tad tricky.  I think I got
it right this time.
2017-06-03 01:12:21 -07:00
f84d093f66 PsychoBlend now updates render in realtime within Blender.
Also, cancelling renders is much more responsive now, especially
during long exports.
2017-06-03 00:00:19 -07:00
3beffab507 Update to latest openexr-rs, and switch to pure Rust PNG output crate. 2017-05-28 17:51:01 -07:00
f0604a69ae Updated to latest openexr crate, and switched to 16-bit float EXR's. 2017-05-20 23:48:01 -07:00
4e2d3e64c0 Switched to using the openexr crate on crates.io. 2017-05-17 00:36:35 -07:00
edb71864e8 LDS sampling falls back on random sampling at higher dimensions.
This is more a piece-of-mind thing than anything else.  But it
also lets us make the number of LDS dimensions lower without
worrying, which in turn makes the code smaller.
2017-05-14 16:06:54 -07:00
322627641a Broke render job out into its own method.
The left-drift of having it inline was getting cumbersome.
2017-05-14 14:51:55 -07:00
922e33ec3f Reformat code with latest rustfmt and custom config. 2017-05-14 13:43:51 -07:00
993ba719d7 Fixed bug that was causing spurious NaN pixels.
It was because sometimes the PDF's for a sample could be zero,
leading to a divide by zero.  PDF = 0.0 is now checked for.
2017-05-14 12:45:43 -07:00
567b658b6c Removed blue noise dithered sampling. 2017-05-14 12:37:01 -07:00
d71fd3b5c8 Implemented blue noise dithered sampling. Temporary.
After implementation, it does appear to make rendering slower
by a noticable bit compared to what I was doing before.  At very
low sampling rates it does provide a bit of visual improvement,
but by the time you get to even just 16 samples per pixel its
benefits seem to disappear.

Due to the slow down and the minimal gains, I'll be removing
this in the next commit.  But I want to commit it so I don't
lose the code, since it was an interesting experiment with
some promising results.
2017-05-14 12:25:01 -07:00
d8a33c7bfa Added a blue noise mask generator as a sub-crate. 2017-05-13 03:23:55 -07:00
172e2f19ef Removed BVH4 and the related bitstack from AccelRay.
I couldn't make the BVH4 faster than the BVH, and the bitstack
was bloating the AccelRay struct.  Removing the bitstack gives
a small but noticable speedup in rendering.
2017-05-12 21:07:40 -07:00
88578b9eae Moved Float4 and Matrix and Vector math into their own sub-crates. 2017-05-12 21:01:54 -07:00
5ab1a51f4c Avoid bounds checking in the Sobol code. 2017-05-12 00:34:03 -07:00
04e8a6ca73 Added a Rust port of Leonhard Grünschloß's Sobol sampler.
The Halton sampler appears to be better, but it was fun to add
this anyway!
2017-05-11 23:56:12 -07:00
b698a52f6c Split some more things out into sub-crates.
Also translated the Halton generator to rust and made it a crate
where the code is generated by a build.rs file.
2017-05-11 22:57:59 -07:00
96db00b10a Refactored some parts of Renderer to take up less memory and be faster.
Specifically, LightPath is now significantly smaller, and
resultingly faster to process.

Also finally fixed the bug where without light sources the light
from the sky wouldn't affect surfaces.
2017-05-11 20:23:19 -07:00
a3a19e53ef Some misc small optimizations. 2017-05-11 01:22:37 -07:00
dcf25b92af Fiddled with BVHNode to make it 32 bytes instead of 40 bytes.
This helps reduce the total size of BVHs since both BBoxes and
and BVHNodes are now 32 bytes and can be properly packed together.
2017-05-08 19:47:10 -07:00
d8e31750a8 Small optimization in BVH traversal. 2017-04-26 01:03:16 -07:00
8b0c422630 Small optimization in BBox intersection and bugfix in BBox4 intersection. 2017-04-26 00:28:43 -07:00
c92a8c4da0 During BVH construction, merge BBox time samples based on a threshold.
If the average surface area of all the time samples is close enough
to the surface area of their union, just take the union and use that.
This both makes the BVH smaller in memory (time samples don't
propigate up the tree beyond their usefulness) and makes it
faster since traversal can avoid interpolating BBoxes when there's
only one BBox for a node.
2017-04-23 23:15:31 -07:00
55c64a3392 Added missing *_with_alignment allocation variants. 2017-04-23 10:10:10 -07:00
b135e8beb8 Fixed bug in new BVH4 traversal code. 2017-04-22 22:32:36 -07:00
a940630a27 Reduced max bvh tree depth.
Reduced from 64 to 42.  This still allows each BVH to hold 4.4
trillion elements, but it guarantees that the accel ray's
traversal bitstack can accommodate at least two nested max-depth
trees.
2017-04-22 12:51:35 -07:00
0cbf851451 Fixed a commandline argument that was broken.
Also removed a redundant statistics printout.
2017-04-22 12:50:28 -07:00
fdf2b4babf Print stats for BVH and BVH4 traversal, and working on speeding up BVH4 traversal. 2017-04-22 11:18:29 -07:00
597bcf0518 Sped up splitting rays by direction.
Turns out the is_sign_positive() method is slower than a simple
comparison.
2017-04-22 11:15:17 -07:00
8b14e46bc1 Added more detailed render stats. 2017-04-22 10:31:27 -07:00
7884cff604 Added unit tests for BitStack128. 2017-04-16 23:13:34 -07:00
725bbca6a1 Eliminated some unnecessary left drift in BVH4 code.
IMO this is much easier to read.
2017-04-16 17:27:29 -07:00
92fd83a766 Actually using the None match arm in BVH4 traversal now.
It seems to maybe be just a hair faster.  But, also, it sets the
code up to try some more optimizations.
2017-04-16 17:22:51 -07:00
f93dde1810 Changed the BBox4 data layout to give a small speed boost. 2017-04-16 15:54:02 -07:00
2c4f103db5 Factored some calculations into the outer loop of BVH4 traversal.
Provides a small but noticable speed boost.
2017-04-16 00:51:13 -07:00