Commit Graph

2085 Commits

Author SHA1 Message Date
Sergey Sharybin
345ed4dd10 Cycles: Don't do node visibility check in subsurface and volume traversal
Visibility flags are set to all visibility anyway, So there was no reason
to perform that test.

TODO: We need to investigate if having primitive intersection functions
which doesn't do visibility check gives any speedup here as well.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
f4df3ec05a Cycles: Move triangle intersection functions into own file
This way extending intersection routines with some pre-calculation step wouldn't
explode the single file size, hopefully keeping them all in a nice maintainable
state.
2014-12-25 02:50:48 +05:00
Thomas Dinges
43421e9c53 Cycles: Optimize vector math node without links to single values. 2014-12-24 22:45:08 +01:00
Sergey Sharybin
20006e4a67 Cycles: Do some logging when motion is detected in the scene 2014-12-18 14:40:14 +05:00
Thomas Dinges
3820d44979 Cycles: Add missing entries in the Integrator constructor and some updates
to the XML API.

(Changes from the standalone repo)
2014-12-17 22:28:33 +01:00
Sergey Sharybin
1549fea999 Fix T42888: Separate and Combine HSV distorts the hue value
These nodes were assuming sRGB input/output which is for sure wrong for the
shader pipeline which works in the linear space.

So now conversion to/from linear space happens in these nodes which makes them
making sence in the shader context but which might change look and feel of
existing scenes.
2014-12-16 20:06:25 +05:00
Sergey Sharybin
754bdbe4b4 Cycles: Fix more wrong usages of RNA_id_pointer_create
Title says it all, just be more careful in the future.
2014-12-11 17:11:23 +05:00
Sergey Sharybin
cb7cf523e5 Fix T42829: Cycles crash rendering when file is saved to specific location
The issue was caused by the way how RNA pointer was created for the bMain:
namely Cycles was using RNA_id_pointer_create to create the pointer, which
would then try to refine the poniter based on the ID type.

This is just wrong and worked so far just because of co-incident, with the
file path from the bug report first letters in the ID name happened to be
NT which corresponds to NodeTree, and for sure refining such pointer will
fail.

Simple solution -- use proper way to create RNA pointer for non-ID block.
2014-12-11 16:55:10 +05:00
Sergey Sharybin
d68521df7b Cycles: Fix difference between SVM and OSL implementation of Normal node
SVM was normalizing the input normal, OSL did not. This lead to render
result differences across this shading systems.
2014-12-10 19:07:50 +05:00
Sergey Sharybin
7366283c01 Fix T42818: Cycles SSS passes are incorrect for SSS size of 0
This was caused by some internal optimization which evaluated SSS with
size of zero as BSDF but used different ID so the evaluation result
didn't appear in regular diffuse pass.

This lead to situation when SSS data was nowhere stored if the
size was zero.

Now SSS with zero size and close-to-zero sizes will be handled in the
same way from the passes point of view.
2014-12-10 17:28:44 +05:00
Sergey Sharybin
e77b25fabb Cycles: Code cleanup, typo 2014-12-10 00:08:33 +05:00
Sergey Sharybin
7b6c9d23cf Cycles: Fix compilation error with MinGW and logging enabled 2014-12-08 19:37:41 +05:00
Campbell Barton
c07f6c02b3 Docs: reference the new manual 2014-12-08 11:18:58 +01:00
Campbell Barton
690345a826 Cleanup: spelling 2014-12-08 09:46:21 +01:00
Sergey Sharybin
0493879401 Cycles: Report error via the new engine API
This way CUDA errors are visible in the image info line,
which makes things to behave the same across viewport and
final rendering.

That's right, we've got error reported via reports and info
line now. This is based on the feedback from our gooseberry
team.
2014-12-05 22:15:09 +05:00
Sergey Sharybin
2b4eeb79cd Cycles: Report error to the blender using report API
This way when something goes wrong in Cycles (for example out of VRAM, timelimit
launching the kernel etc) we'll have a nice report in the Info space header.

Sure it'll be nice to have mention of error in the image editor's information
line, but that's for the future.

This fixes T42747: "CUDA error" appears only momentarily, then disappears
2014-12-05 22:15:04 +05:00
Sergey Sharybin
bd0b9ed0c0 Cycles: Add dedicated Progress::set_error() call
Currently it acts the same as set_cancel(), but this way we're able to
distinguish situations when rendering was aborted by user demand (for
example pressing Esc in standalone renderer) or if something went horribly
wrong (for example out of VRAM error).
2014-12-05 22:15:04 +05:00
Sergey Sharybin
716890e864 Cycles: Early output from Scene::device_update when device error occurs
This way for example we wouldn't wait a fortune while BVH is building after
GPU run out of memory when loading images just to see the render failure
message.
2014-12-05 22:15:04 +05:00
Sergey Sharybin
0b67102bd6 Cycles: Code cleanup, whitespace 2014-12-05 22:15:04 +05:00
Sergey Sharybin
4fe2b45d3d Cycles: Fix compilation error after recent logging changes
Forbid OSL from polluting current conext with obscure stuff from
windows.h, it's not useful and unhealthy anyway.

Maybe we sohuld also forbid using abbreviated Glog constants as
well tho.
2014-12-04 16:59:31 +05:00
Sergey Sharybin
0762451e86 Cycles: Synchronize SCons with CMake in regard of logging 2014-12-03 23:04:57 +05:00
Sergey Sharybin
627f27502f Cycles: Support logging when building with SCons
Basically, title says ti all, the option is called WITH_BF_CYCLES_LOGGING
2014-12-03 22:46:56 +05:00
Sergey Sharybin
58005e135b Cycles: Remove workaround in ShaderClosure
Since the aligned allocation of shader closures in OSL memory pool
this workaround is no longer needed.

Also put a comment which describes the desired layout of the structure
so array of shader closures is all nicely aligned.
2014-12-03 20:50:25 +05:00
Sergey Sharybin
4cb0e25678 Cycles: Use 16 bytes aligned closures in OSL
This solves bugs like T42210 which are caused by compiler being
smart and using some SSE instructions to operate with closure
classes, which was failing because those classes are not allocated
by the regular allocator but allocated in memory pool in OSL.

With newer versions of OSL it is now possible to force closure
classes being aligned to a given boundary and this commit uses
this new functionality.

Unfortunately, it means we're no longer compatible with older
versions of OSL, only latest git version from upstream and our
branch at github are supported:

  https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes

For OSX and Windows it's not an issue because libraries are
already updated there, Linux users would need to run install_deps
script.
2014-12-03 20:34:03 +05:00
Thomas Dinges
e3a6f1c152 Cycles: Remove workaround for missing sm_52 kernel, now we require it for Maxwell cards. 2014-12-02 13:45:39 +01:00
Sergey Sharybin
c751055513 Cycles: Tweak to the include paths after recent atomics change
Who could knew that include directories are not inherited in scons..
2014-12-02 16:53:22 +05:00
Sergey Sharybin
ed935ae5ad Cycles: Use lock in the memory statistics
CPU rendering is allowed to allocate memory from multiple threads,
which means statistics need to be avare of this.
2014-12-02 15:50:46 +05:00
Sergey Sharybin
f386f574b1 Cycles: Only report exporting curves if there are particle systems on the object 2014-11-28 16:16:50 +05:00
Sergey Sharybin
af18fb8036 Cycles: Code cleanup, remove dead code 2014-11-28 15:51:09 +05:00
Sergey Sharybin
9311a5be04 Cycles: Speedup BVH build for certain compilers
The issue was noticed with gcc-4.7 (used by the release build environment)
which didn't generate optimal enough code for BVH references swap. Seems it
looked up for the assign operator for each of the reference structure members
even though nothing special was required for assignment.

Forcing compiler to use simple memory copy gives speedup of like 2-3 times.

The issue doesn't happen with OSX's clang and new gcc-4.9, but since we're
gonna to stick to gcc-4.7 for official releases for quite some time still it's
nice to have performance issues resolved for all the compilers.

Didn't put the code into #ifdef so if in the future some issues appears with
alignment or assignment which need to happen as an operator we notice this
earlier.
2014-11-24 18:50:46 +05:00
Sergey Sharybin
c1149198b5 Cycles: Log time spent on the BVH build 2014-11-24 18:50:46 +05:00
Thomas Dinges
b9d9df9810 Cycles UI: Several fixes for recent additions...
* Alpha Property was removed (Fix T42690)
* Some tweaks to make the panel look better again.
* Use abreviated form "Multiple Importance" everywhere, for consistency.
2014-11-22 20:21:18 +01:00
Antony Riakiotakis
9124ecb16b Cycles: support for specular color in solid shading mode, available in
the material panel.

Patch by Phillipp Oeser (D62) with some minor modifications, thanks!
2014-11-21 14:07:38 +01:00
Sergey Sharybin
d4315398fc Cycles: Remove dynamic library helper files
They were only needed for CUDA wrangler. Since we've switched to CUEW
this utility functions are no longer needed.
2014-11-20 18:56:20 +05:00
Sergey Sharybin
d6579fe7f3 Cycles: Fix typo on graphiz graph dumper 2014-11-20 18:56:20 +05:00
Thomas Dinges
0756fe2684 Cleanup: Remove SD_BSDF_GLOSSY flag, unused. 2014-11-20 07:53:22 +01:00
Sergey Sharybin
d06b1a5d8b Cycles: Missed some changes in the previous hair motion blur fix
So now cases when object has both hair motion blur and deformation motion blur
vector pass is all correct.

We could get rid of the flag in the future, still need to look deeper into all
the areas trying to find a more clear solution.
2014-11-19 02:42:22 +05:00
Sergey Sharybin
729dc98be1 Fix T42475: Vector motion blur on hair
Issue was caused by mismatch in pre/post transform matrix spaces for mesh and
curve vectors. This happened because of current way how static transform apply
works: it only stores post/pre in the world space if there's triangle motion
exists. This lead to situation when there's no triangle motion happening but
was hair motion happening.

After long time of trying to solve it in a nice way, ended up solving it in
a bit slow way -- pre/post transform is still storing in the same spaces as
they used to be stored and just convert hair pre/post position to a world
space in the kernel.

This is because currently it's not so clear how to deal with cases when curve
and mesh motion needs different space of pre/post transform (which happens in
cases when only one of the motions exists).

Would think of some magic, and meanwhile artists could be happy with proper
render results.
2014-11-18 15:05:15 +01:00
Sergey Sharybin
c07241dd18 Cycles: Add logging to blender curve segment exporting 2014-11-18 15:05:15 +01:00
Thomas Dinges
694d74bc6d Fix for last commit, accidentaly removed transparent shadows property. 2014-11-17 11:31:59 +01:00
Thomas Dinges
90f3102f9c Cycles Standalone: Updates for Volume sampling. 2014-11-16 20:18:14 +01:00
Thomas Dinges
bfdb9f9e0f Cycles: Remove Integrator volume sampling flag, that was moved to Shader. 2014-11-16 19:50:14 +01:00
Sergey Sharybin
61e1e9adb8 Cycles: Revert changes to inline flags enabled for release only
It appears it's not really needed for convenient debugging when
using proper flags passed to the compiler. Basically, it is -g3
and set breakpoint to a function as if it's not in the namespace.

Not as if a code was any wrong, just it's possible to have more
clear solution for the issue i've tried to solve in the past.
2014-11-15 04:50:34 +05:00
Campbell Barton
22754cf687 skip scene_armature_depsgraph_workaround when theres no armatures 2014-11-14 14:55:45 +01:00
Thomas Dinges
2e2c24bec1 Cycles: Update some comments in volume code. 2014-11-13 11:30:18 +01:00
Sergey Sharybin
395ee33c8a Cycles: Prevent NaN and inf in area lamp sampling caused by precision issues
This doesn't have noticeable affect on the render times, but avoids possible
numerical issues.
2014-11-12 21:23:33 +05:00
Thomas Dinges
8f8b9b58f6 Fix T41066: MSVC + AVX2 kernel causes artifacts in hair render.
The issue lies in the FMA functions, so disable them on Windows for now.
2014-11-12 11:51:49 +01:00
Thomas Dinges
5cba64e30c Cleanup, please follow existing style when adding new flags. ;) 2014-11-12 09:43:23 +01:00
Thomas Dinges
727e9dd1bb Cleanup, typo fixes. 2014-11-12 09:14:07 +01:00
Dalai Felinto
8c227adb8c Fix T41783: Cycles baking ignores displacement
Create unique flag for output shaders with displacement data and use it
to calculate transformed normal. Implementation suggested by Brecht Van
Lommel.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D890
2014-11-11 18:21:56 -02:00