When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.
This revision extends the Freestyle Python API to make for style module writing
easier.
- freestyle.types.Stroke: A proper support for reversed() is implemented. It
works the same with other Python sequence objects (returns an iterator starting
from the end). This is in effect equivalent to Stroke.stroke_vertices_end().
- freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed
method are added. The first two methods return a new StrokeVertexIterator
object that has been incremented and decremented, respectively. The reversed
method returns a new StrokeVertexIterator object that will traverse stroke
vertices in the opposite direction.
- freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke
object to create an Interface0DIterator that traverses stroke vertices. This is
in effect equivalent to Stroke.vertices_begin(). The new API makes stroke
shaders involving function calls much simpler as illustrated below:
# in the old API
it = stroke.stroke_vertices_begin()
for vert in it:
result = somefunc(Interface0DIterator(it))
# in the new API
it = Interface0DIterator(stroke)
for vert in it:
result = somefunc(it)
Differential Revision: https://developer.blender.org/D545
Reviewers: kjym3
If the side of a beveled edge hit another vertex, the offset
amount reset to zero. This was the result of commit rB1582dd5e4d7c
which clamped the amount to zero to avoid creating spikes with
obtuse angles. Now we clamp the amount to the closest end of
the edge to where the amount wants to be.
Also fixes the first part of T40365.
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
Most weight tools also work in edit mode.
This change exposes all applicable tools
within a separate weight tool panel
in the tools tab of the tool shelf
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D592
* Anisotropic BSDF now supports GGX and Beckmann distributions, Ward has been
removed because other distributions are superior.
* GGX is now the default distribution for all glossy and anisotropic nodes,
since it looks good, has low noise and is fast to evaluate.
* Ashikhmin-Shirley is now available in the Glossy BSDF.
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions
Reviewers: brecht, dingto
Differential Revision: https://developer.blender.org/D549
Samples render slower than before, but hopefully this is made up for with
reduced noise in most cases. The main slowdown comes from samples that would
previously be wasted and turn out black, which are now continued.
GGX sampling is about the same speed as before, while for Beckmann it is slower
still. Perhaps optimizations are still possible there, but didn't find anything
easy.
Code from this paper, which comes with sample code:
Importance Sampling Microfacet-Based BSDFs using the Distribution of Visible Normals.
E. Heitz and E. d'Eon, EGSR 2014
Differential Revision: https://developer.blender.org/D572
This gives you "Multiple Importance", "Distance" and "Equiangular" choices.
What multiple importance sampling does is make things more robust to certain
types of noise at the cost of a bit more noise in cases where the individual
strategies are always better.
So if you've got a pretty dense volume that's lit from far away then distance
sampling is usually more efficient. If you've got a light inside or near the
volume then equiangular sampling is better. If you have a combination of both,
then the multiple importance sampling will be better.
* Volume multiple importace sampling support to combine equiangular and distance
sampling, for both homogeneous and heterogeneous volumes.
* Branched path "Sample All Direct Lights" and "Sample All Indirect Lights" now
apply to volumes as well as surfaces.
Implementation note:
For simplicity this is all done with decoupled ray marching, the only case we do
not use decoupled is for distance only sampling with one light sample. The
homogeneous case should still compile on the GPU because it only requires fixed
size storage, but the heterogeneous case will be trickier to get working.