Commit Graph

68453 Commits

Author SHA1 Message Date
37d9e65ddf Code cleanup: abstract shadow catcher logic more into accumulation code. 2017-09-13 15:24:14 +02:00
f77cdd1d59 Code cleanup: deduplicate some branched and split kernel code.
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for
bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-13 15:24:14 +02:00
c4c450045d Code cleanup: tweak inlining for 2% better CUDA performance with hair. 2017-09-13 15:24:14 +02:00
Sergey Sharybin
76e7c039ec Fix T52140: Align objects centers using origin for text
The issue was caused by operator redo which frees all object's evaluated data,
including bounding box. This bounding box can not be reconstructed properly
without full curve evaluation (need to at least convert font to nurbs, which is
not cheap already).
2017-09-13 17:40:11 +05:00
Campbell Barton
43858c4197 Cleanup: avoid right-shifted args in RNA register 2017-09-13 21:52:57 +10:00
Campbell Barton
29a7ad8b1a Node UI: scale cross by pixelsize
Draws a little smaller to fit with 2.8x manipulator.
2017-09-13 21:48:51 +10:00
Sergey Sharybin
04800ed434 Fix T52113: Compositor doesnt mix unrendered render layers well
Compositor was always defaulting to all-zero s output for missing passes.

This was broken in 4cf7fc3.
2017-09-13 15:46:19 +05:00
Sergey Sharybin
f472aea922 Compositor: Cleanup, get rid of nested ternary operators
Having single switch statement is much more readable.
2017-09-13 15:46:19 +05:00
Sergey Sharybin
17a117c7a0 Compositor: Cleanup, de-duplicate some code 2017-09-13 15:46:19 +05:00
Sergey Sharybin
4fde0910d5 Compositor: Cleanup, reduce indentation level in render layer node
There is absolute no reason to have such an indentation level, it only causes
readability and maintainability issues. It is really simple to make code more
"streamlined".
2017-09-13 15:46:19 +05:00
Mathieu Menuet
659ba012b0 Cycles: change AO bounces approximation to do more glossy and transmission.
Rather than treating all ray types equally, we now always render 1 glossy
bounce and unlimited transmission bounces. This makes it possible to get
good looking results with low AO bounces settings, making it useful to
speed up interior renders for example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2818
2017-09-12 15:37:35 +02:00
Joshua Leung
d2202117fe T50354: Action length calculation added unnecessary padding if some F-Curves
only contained a single key (on the last real frame of the action).
2017-09-13 00:53:50 +12:00
Joshua Leung
a704a66914 Adding some verbose documentation
I thought this was already clear enough, but apparently not.
2017-09-13 00:53:46 +12:00
Sergey Sharybin
fadc079740 Fix T52573: Cycles baking artifacts
Synchronize condition for faces split between Cycles itself and baking API.
2017-09-12 16:33:42 +05:00
Sergey Sharybin
e7b5bbae6a Cycles tests: Add baking features tests 2017-09-12 16:22:02 +05:00
Sergey Sharybin
4aee701f00 Fix T52679: Hole in bake normal
In fact, any type of baking might have caused holes in mesh.

The issue was caused by zspan_scanconvert() attempting to get order of traversal
'a-priori', which might have failed if check happens at the "tip" of span where
`zspan->span1[sn1] == zspan->span2[sn1]`.

Didn't see anything bad on making it a check when iterating over scanlines and
pick minimal span based on current scanline. It's slower, but unlikely to cause
measurable difference. Quality should stay the same unless i'm missing something.

Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2837
2017-09-12 16:20:41 +05:00
de6ecc82ed Fix rare firefly in volume equiangular sampling when sampling short distance. 2017-09-12 12:50:44 +02:00
28532f1867 Cycles tests: add environment variable to update references renders.
This will copy new renders over references renders:
CYCLESTEST_UPDATE=1 ctest -R cycles
2017-09-12 12:50:44 +02:00
cd6c9e9e5f Cycles: improve sample stratification on area lights for path tracing.
Previously we used a 1D sequence to select a light, and another 2D sequence
to sample a point on the light. For multiple lights this meant each light
would get a random subset of a 2D stratified sequence, which is not
guaranteed to be stratified anymore.

Now we use only a 2D sequence, split into segments along the X axis, one for
each light. The samples that fall within a segment then each are a stratified
sequence, at least in the limit. So for example for two lights, we split up
the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[.

This doesn't make much difference in most scenes, mainly helps if you have a
few large area lights or some types of HDR backgrounds.
2017-09-12 12:45:29 +02:00
d454a44e96 Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
2017-09-12 12:43:26 +02:00
Sergey Sharybin
467d92b8f1 Cycles: Tweaks to avoid compilation error of megakernel
Also moved code out of deep-inside ifdef block, otherwise it was quite confusing.
2017-09-12 13:33:46 +05:00
Campbell Barton
b07ee4e3a5 Update tgz script, remove deprecated GZIP use 2017-09-12 16:25:19 +10:00
Bastien Montagne
35ee9ff7a0 Fix T52682: When hair number=faces number, particles/face = 1 , actually some hair is overlap.
Just using same code for distribution for face/volume as the one
changed/used for vertices since some months.

Note that this change is breacking compatibility, in that distribution
of particles over faces/volume may not be exactly the same as
previously.
2017-09-11 12:38:17 +02:00
Campbell Barton
f56fea3d6b Fix T52701: Mesh shortest path fails at boundaries 2017-09-11 16:45:19 +10:00
Joshua Leung
7e56879772 Fix T52696: Sculpt - Brush spacing pressure artifacts
Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
2017-09-11 18:24:39 +12:00
Campbell Barton
6d2cd1719b Bake Action: operate on selected objects
Previously only the active object was used.

Use coroutines to support baking frames for multiple objects at once,
without having to playback the animation multiple times.
2017-09-10 17:16:47 +10:00
Campbell Barton
a4a59d578c PyAPI: Add object argument to bake_action
Avoids having to set the scene's active object first.
2017-09-10 14:30:03 +10:00
Campbell Barton
11a9434c2d Resolve T52687: Add node label shows as 'Unknown'
Add type access method, need to extend to other types
for now just get node UI working properly again.
2017-09-09 22:56:58 +10:00
Campbell Barton
3c3d0898b0 PyAPI: Fix mathutils freeze allowing owned data 2017-09-09 11:08:38 +10:00
Campbell Barton
30d8829780 Docs: mathutils docstrings 2017-09-09 11:02:26 +10:00
Campbell Barton
90eb93791f Cleanup: mathutils vector comments
Use doxy markup & correct outdated info.
2017-09-09 10:50:40 +10:00
Campbell Barton
3930e46e37 Correct last commit 2017-09-09 10:15:16 +10:00
Campbell Barton
002cc6aef3 Cleanup: Simplify SWIZZLE macro
- Use indices instead of character args.
- Use numbered macros instead of variadic args.

Parsing using rtags used over 11gb of memory. While this should be
resolved upstream (report as #1053), the extra complexity didn't give
any real advantage.
2017-09-09 10:10:05 +10:00
Ray Molenkamp
4265d85f8b [msvc/make.bat] mention the msvc-2017 option in the make.bat help text. 2017-09-08 14:24:02 -06:00
Sergey Sharybin
ae41a08288 Cycles: Attempt to work around compilation of sm_20 and sm_21
Disabled forceinline for those architectures, which seems to be compiling
successfully more often.

There might be ~3% slowdown based on quick tests, but better be rendering
something rather than failing to compile kernels again and again.

Those architectures will be doomed for abandon once we'll switch to toolkit 9.
2017-09-08 18:37:54 +02:00
Campbell Barton
5d1a5001f4 Fix T52628: own error in string duplication
Error in 636baa598a56
2017-09-09 02:08:58 +10:00
ce1f2e271d Cycles: disable fast math flags, only use a subset.
Empty BVH nodes are set to NaN which must be preserved all the way to the
tnear <= tfar test which can then give false for empty nodes. This needs
strict semantices and careful argument ordering for min() and max(), so
the second argument is used if either of the arguments is NaN.

Fixes T52635: crash in BVH traversal with SSE4.1.

Differential Revision: https://developer.blender.org/D2828
2017-09-08 15:12:37 +02:00
Joshua Leung
b02ab2e7d9 Fix: Grease Pencil pie menu keymaps were broken after the menus got renamed 2017-09-09 01:03:15 +12:00
Antonio Vazquez
c9afc41cfd Fix T52650:Grease pencil selection its not automatically updating in Clip Editor 2017-09-08 11:21:49 +02:00
Campbell Barton
2a3a747ca2 Fix T52678: Crash editing gpencil w/ frame-lock 2017-09-08 18:51:47 +10:00
Campbell Barton
60020f57d7 Correct function name in argument parsing 2017-09-08 00:59:27 +10:00
Campbell Barton
daf7aed849 PyAPI: use bl_rna_get_subclass for node API
Returns a default value instead of an error when the type isn't defined.
2017-09-08 00:03:01 +10:00
Campbell Barton
e44bf43f6c PyAPI: add function to get an RNA subclass
This is inconvenient in regular Python, add a class-method
to perform the operation, eg:

bpy.types.Node.bl_rna_find_subclass("CustomNodeType")
2017-09-08 00:02:09 +10:00
Campbell Barton
accc94dd73 Cleanup: remove goto's 2017-09-07 22:53:46 +10:00
Campbell Barton
f4d46916fa UI: fix memory leak when copy-to-selected failed 2017-09-07 22:15:12 +10:00
Campbell Barton
3f8aaec6bd Weight Smooth: remove source option
Use current selection mode instead of an operator option.
2017-09-07 14:14:42 +10:00
Campbell Barton
5f7de54243 Fix T52639: Weight paint smooth tool crash 2017-09-07 13:20:39 +10:00
Campbell Barton
c3322603eb Cleanup: custom nodes template
- Use conventional (pep8) prop names
- Simplify class registration
2017-09-07 05:20:29 +10:00
Campbell Barton
5d65aee07a Workaround node types not being exposed
We might want to have a utility function for this,
for now just keep it working.
2017-09-07 05:17:02 +10:00
Campbell Barton
8172e8e528 Node UI: Add square and diamond socked draw styles
Currently not used by Blender's node trees

D2814 by @charlie
2017-09-07 04:45:38 +10:00