Commit Graph

6786 Commits

Author SHA1 Message Date
Sergey Sharybin
461214508c Cycles: Add utility function to fetch motion triangle when on CPU side 2017-01-20 12:46:15 +01:00
Sergey Sharybin
811e6c2d32 Cycles: Cleanup, delete trailing whitespace 2017-01-20 12:46:15 +01:00
Sergey Sharybin
254fbcdd7b Cycles: Fix compilation error on with older GCC
Hopefully it works on all platforms now.
2017-01-20 11:55:48 +01:00
Thomas Dinges
ff1b850081 Fix T50460. Greying out issue with Cycles culling options. 2017-01-20 10:58:03 +01:00
Thomas Dinges
05ff32bd25 Fix compile error (-Werror=float-conversion). 2017-01-20 10:50:55 +01:00
Sergey Sharybin
d6cf28c5e1 Cycles: Expose diffuse and glossy depth to Light Path node
Was a bit confusing to have transparent and translucent depth
exposed but no diffuse or glossy.

Reviewers: brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D2399
2017-01-19 15:09:58 +01:00
Sergey Sharybin
afdd756e56 Cycles: Don't use fast math for the host code
This is important for the reliable behavior or isnan/isfinite/min/max
functions to work with nan and non-finite values. Some of the issues
with fast math are possible to work around, but didn't find a way to
have reliable min/max implementation yet.
2017-01-19 14:51:11 +01:00
Sergey Sharybin
78b94902f8 Cycles: Add fast-math safe isnan and isfinite
Currently unused, but might become really handy in the future.
2017-01-19 14:51:11 +01:00
Sergey Sharybin
6d36e033ba Cycles: Remove using namespace hell
Please NEVER EVER use such a statement, it's only causing HUGE
issues. What is even worse: it's not always possible to immediately
see that the hell is coming from such a statement.

There is still some statements in the existing code, will leave
those for a later cleanup.
2017-01-19 14:51:11 +01:00
Lukas Stockner
4a19112277 Cycles: Fix amount of rendered samples not being shown while rendering the last tile on CPU 2017-01-19 00:48:09 +01:00
Bastien Montagne
43872f59b9 Merge branch 'master' into blender2.8 2017-01-16 21:03:12 +01:00
Sergey Sharybin
92fbcbb4bf Cycles: Cleanup, spelling 2017-01-16 17:55:41 +01:00
Sergey Sharybin
d3e4eecaa5 Cycles: Cleanup, avoid shadowing 2017-01-16 17:54:39 +01:00
Sergey Sharybin
e5a665fe24 Cycles: Fix wrong transparent shadows for motion blur hair
This was a missing bit from b53ce9a.
2017-01-13 16:14:57 +01:00
Sergey Sharybin
14f6e27f6a Cycles: Cleanup, style 2017-01-13 15:24:56 +01:00
Sergey Sharybin
807b1a262f Cycles: Simplify some code in Curve BVH reference fill
makes code slightly shorter and uses idea of const qualifiers.
2017-01-13 10:59:34 +01:00
Sergey Sharybin
3160472a66 Cycles: Avoid shadowing in BVH code
Run into some nasty bugs while trying various things here.

Wouldn't mind enabling -Wshadow for Cycles actually..
2017-01-13 10:53:01 +01:00
Sergey Sharybin
720e564882 Cycles: Allow up to 4 motion curve primitives per BVH node
This avoids intersection AABB of different curve primitives
which makes it less ray-to-primitive intersections.

This gives about 30% speedup of hair rendering in the barber
shop scenes here. There is still some work to be done on those
files to solve major speed issues on certain frames.
2017-01-12 18:23:23 +01:00
Sergey Sharybin
b53ce9a1d0 Cycles: Prepare BVH traversal code to work with multiple curve primitives per node 2017-01-12 18:20:19 +01:00
Sergey Sharybin
f12f906dd9 Cycles: Correct assert() for cases when there are multiple curves per BVH node 2017-01-12 17:38:27 +01:00
Sergey Sharybin
76a4cf1941 Cycles: Use separate limit for motion primitives for BVH node limits
This way we can have different limits for regular and motion curves
which we'll do in one of the upcoming commits in order to gain some
percents of speedup.

The reasoning here is that motion curves are usually intersecting
lots of others bounding boxes, which makes it inefficient to have
single primitive in the leaf node.
2017-01-12 16:54:08 +01:00
Sergey Sharybin
0421ae056d Cycles: Change confusing logic of max leaf size check
Maximal number of elements is supposed to be inclusive. That is what
it was always meant in this file and what @brecht considered still
the case in 6974b69c61.

In fact, the commit message to that change mentions that we allowed
up to 2 curve primitives per leaf while in fact it was doing up to 1
curve primitive.

Making it real 2 primitives at a max gives about 5% slowdown for the
koro.blend scene. This is a reason why BVHParams.max_curve_leaf_size
was changed to 1 by this change.
2017-01-12 16:33:08 +01:00
Sergey Sharybin
d9cd9ff322 Cycles: Cleanup, space prior to semicolon
We don't have that in Blender style, no reason to violate it here.
2017-01-12 15:31:25 +01:00
Sergey Sharybin
985c121c0b Cycles: Cleanup, make curve functions private
Not only they don't really follow naming convention (we don't use
camel case) but also was not necessary to keep them in the global
symbol table.
2017-01-12 15:28:19 +01:00
Sergey Sharybin
83d18a2a91 Cycles: Make it more clear message why curve motion attribute was removed 2017-01-12 15:22:41 +01:00
Sergey Sharybin
53fa389802 Cycles: Use dedicated debug passes for traversed nodes and intersection tests
This way it's more clear whether some issue is caused by lots of geometry in
the node or by lots of "transparent" BVH nodes.
2017-01-12 13:44:35 +01:00
Sergey Sharybin
8daf02f134 Cycles: Remove more duplicated code in debug passes logic 2017-01-12 13:33:53 +01:00
Sergey Sharybin
789fdab825 Cycles: Fix wrong scaling of traversed instances debug pass 2017-01-12 13:32:13 +01:00
Sergey Sharybin
618b3480c8 Cycles: Cleanup, remove duplicated code 2017-01-12 13:31:35 +01:00
Bastien Montagne
7eb4c850d3 Merge branch 'master' into blender2.8 2017-01-12 12:59:45 +01:00
Sergey Sharybin
d1131227c5 Cycles: Cleanup, indentation within preprocessor 2017-01-12 12:54:24 +01:00
Sergey Sharybin
511dbe56db Cycles: Cleanup, use switch() instead of if-else chain
About to add extra debug passes, which will be more clear to use switch().
2017-01-12 12:45:37 +01:00
Sergey Sharybin
554024e08e Cycles: move hair particle settings to scene context
Since the beginning of times hair settings in cycles were global for
the whole scene but were located in the particle context. This causes
quite some trickery to get shots set up for the movies here in the
studio by forcing artists to create dummy particle system to change
settings of hair on the shot.

While ideally this settings should be properly become per-particle
system for the time being it will save sweat and blood to move the
settings to scene context.

Reviewers: brecht

Subscribers: jtheninja, eyecandy, venomgfx, Blendify

Differential Revision: https://developer.blender.org/D2287
2017-01-12 10:48:17 +01:00
Sergey Sharybin
394fa07d41 Cycles: Fix wrong motion blur when combining deformation motion blur with autosplit
The issue was that we used to compare number of vertices for mesh after the auto
smooth was applied (at the center of the shutter time) with number of vertices
prior to the auto smooth applied. This caused false-positive consideration of a
mesh as changing topology.

Now we do autosplit as early as possible and do it from blender side, so Cycles
does not need to re-implement splitting on it's side.
2017-01-11 16:32:57 +01:00
Sergey Sharybin
38b0141554 Cycles: Pass explicit subdivision type to object_to_mesh
This allows us to do some extra logic checks there based on particular
subdivision type.

Additionally avoids implicit cast of enum to bool.
2017-01-11 16:23:54 +01:00
Sergey Sharybin
7bbb2292dc Cycles: Cleanup, whitespace around operator 2017-01-11 15:16:22 +01:00
Sergey Sharybin
e068d09a4b Cycles: Improve logging of cases when motion blur is disabled
Next logical step is to expose this somehow to the interface.
2017-01-11 14:34:56 +01:00
Dalai Felinto
77dcf0fbc5 Merge remote-tracking branch 'origin/master' into blender2.8 2017-01-11 09:44:25 +01:00
Sergey Sharybin
d5cf90f59f Cleanup: Strict CLang warning in Smoke module 2017-01-09 13:12:43 +01:00
Sergey Sharybin
bb88c7af81 Cleanup: Indentation 2017-01-09 13:11:42 +01:00
Lukas Tönne
6ecab6dd8e Revert particle system and point cache removal in blender2.8 branch.
This reverts commit 5aa19be912 and b4a721af69.

Due to postponement of particle system rewrite it was decided to put particle code
back into the 2.8 branch for the time being.
2016-12-28 17:30:58 +01:00
Dalai Felinto
605263177b Merge remote-tracking branch 'origin/master' into blender2.8 2016-12-23 15:36:16 +01:00
Sergey Sharybin
544f6113f8 OpensSubdiv: Cleanup, unused argument 2016-12-20 12:29:41 +01:00
Sergey Sharybin
1c34a7f4eb Libmv: Fix missing virtual destructor in frame access sub-class
This is undefined behavior in C++ and Clang was complaining a lot
about this.
2016-12-20 12:29:41 +01:00
Bastien Montagne
3af98b4c04 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/CMakeLists.txt
	source/blender/editors/gpencil/drawgpencil.c
	source/blender/editors/physics/physics_ops.c
2016-12-17 13:07:00 +01:00
Karsten Weiss
820709c14d Fix STR_String Capitalize on non Win32
Harmless since its not used, but good to fix.
2016-12-15 12:58:19 +11:00
Sergey Sharybin
525673b37b Cycles: Fix uninitialized variable issue after recent changes 2016-12-14 17:31:11 +01:00
Sergey Sharybin
91bbffd379 Cycles: Move object culling helper to own files
This is a stand-alone logic, which becomes quite comprehensive now.
2016-12-14 13:01:33 +01:00
Sergey Sharybin
6967216485 Cycles: Fix indendation 2016-12-14 12:47:28 +01:00
Sergey Sharybin
c4d6fd3ec0 Cycles: Consider GGX/Beckmann/Ashikhmin of 0 roughness a singular ray
This matches behavior of Multiscatter GGX and could become handy later on
when/if we decide it would be beneficial to replace on closure with another.

Reviewers: lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2413
2016-12-14 11:04:02 +01:00