Commit Graph

4058 Commits

Author SHA1 Message Date
Campbell Barton
dc5fe5d25f Fix bpy.so linking on Mac OS X
D345 from Aleksandr Derbenev
2014-04-02 09:03:01 +11:00
Sv. Lockal
c682fe49f4 Cycles: fix 3-5% performance regression in msvc builds caused by a typo in stackchecking flags. 2014-03-31 21:44:02 +04:00
c8862806ba Fix T39525: branched path + no lights + disabled use all lights option crash. 2014-03-31 13:54:15 +02:00
e05d35bfaf Fix T39510, Fix T39523: camera motion blur not working correct after recent changes. 2014-03-31 13:43:19 +02:00
Sergey Sharybin
a9b82244de Code cleanup: fixes for function prototypes 2014-03-31 17:35:56 +06:00
Thomas Dinges
e001b5b33e Cycles: Deformation Motionblur works on GPU, so remove the checks in the UI. 2014-03-31 02:18:49 +02:00
Campbell Barton
c16bd951cd Enable GCC pedantic warnings with strict flags,
also modify MIN/MAX macros to prevent shadowing.
2014-03-30 15:04:20 +11:00
Campbell Barton
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
Thomas Dinges
a17c38f8e4 Cycles UI: Do not grey out Object Motion Blur buttons, when we use CPU fallback (User Preferences set to None). 2014-03-29 21:58:58 +01:00
73299516fa Fix scons CUDA build and compile error with more strict compilers. 2014-03-29 15:57:27 +01:00
f449542d6a Cycles volume: change heterogeneous volume sampling in branched path first hit.
This now uses decoupled ray marching, and removes the probalistic scattering.
What this means is that each AA sample will be slower but contain less noise,
hopefully giving less render time to reach the same noise levels.

For those following along, there's still a bunch of volume sampling improvements
to do: all-light sampling, multiple importance sampling, transmittance threshold,
better indirect light handling, multiple scatter approximation.
2014-03-29 13:03:50 +01:00
3847d0c0df Cycles code internals: add initial implementation of decoupled ray marching.
This basically records all volumes steps, which can then later be used multiple
time to take scattering samples, without having to step through the volume
again. From the paper:

"Importance Sampling Techniques for Path Tracing in Participating Media"

This works only on the CPU, due to usage of malloc/free.
2014-03-29 13:03:50 +01:00
47e7acf231 Cycles code refactor: minor refactoring and comments for volume code. 2014-03-29 13:03:49 +01:00
7cb28f41f9 Cycles volume: change homogeneous volume sampling in branched path first hit.
Similar to surfaces, this will now always scatter rather than probabilistically
scattering or not depending on the transmittance.

This also makes calculation of branched path throughput non-probalistic, which
makes thing slower too. That's to be solved by decoupled ray marching later.
2014-03-29 13:03:49 +01:00
9a77872b2b Cycles code refactor: shuffle homogeneous volume code to factor out hit/miss decision.
This removes a few optimizations to avoid exp() calls and division, they will be
added back later, at the moment it's more important to make the code easier to
understand and refactor.
2014-03-29 13:03:49 +01:00
676e1cbe40 Cycles code refactor: move some more volume code into separate functions. 2014-03-29 13:03:49 +01:00
b1615f0e0e Cycles volumes: don't average coefficients over volume step.
Rather use random point in each step instead of giving the steps random sizes.
Gives a bit more accurate results with large step sizes, but also convenient
convention for later changes.
2014-03-29 13:03:49 +01:00
f5ab699fe8 Fix cycles error for heterogenous volumes, causing double step size to be used.
This gives longer render times due to smaller step size, double it to get
something more like the previous behavior.
2014-03-29 13:03:49 +01:00
28954ce9c4 Cycles code refactor: move some volume code to separate functions. 2014-03-29 13:03:48 +01:00
691c4c17ad Cycles: add "density", "flame" and "color" attributes for smoke domains.
These can currently be accessed by adding an Attribute node and specifying one
of those three names. A Smoke/Fire node should be added at some point to make
this more convenient.

These values might change still before the release, in particular for flame the
meaning seems unclear, it's just values in the 0..1 range. This is useful for
color ramps, but it might be good if this was also available as temperature in
kelvin so it can be plugged into the blackbody node. But I couldn't figure out
from the smoke code if or how this corresponds to a physical unit.

Here's a (quite poor) example file for a fire + smoke setup:
http://www.pasteall.org/blend/27990
2014-03-29 13:03:48 +01:00
27043b8e40 Cycles code internals: add support for mesh voxel grid attributes.
These are internally stored as a 3D image textures, but accessible like e.g.
UV coordinates though the attribute node and getattribute().

This is convenient for rendering e.g. smoke objects where data like density is
really a property of the mesh, and it avoids having to specify the smoke object
in a texture node, instead the material will work with any smoke domain.
2014-03-29 13:03:48 +01:00
393216a6df Cycles code refactor: move more code to geom folder, add some comments. 2014-03-29 13:03:48 +01:00
663a750c7f Fix: cycles volume emission incorrectly enabling surface importance sampling. 2014-03-29 13:03:48 +01:00
a2e4ebd36a Cycles code internals: add CPU kernel support for 3D image textures. 2014-03-29 13:03:48 +01:00
e8b1cfed0a Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
6997908afc Cycles: add per object options to disable motion blur and set deformation motion steps.
Notes:

* The motion steps only affect deformation motion blur.
* The actual number of steps is 2^(steps - 1). This avoids having to sample at
  many different times for object with more/fewer steps, now the times overlap.
* Deformation motion blur is enabled by default in existing files that have
  motion blur enabled. If the object is not deforming, this will be detected at
  export time, so raytracing performance will not be affected.

Part of the code is from the summer of code project by Gavin Howard.
2014-03-29 13:03:47 +01:00
e2184c653e Cycles: add support for curve deformation motion blur. 2014-03-29 13:03:47 +01:00
6020d00990 Cycles: add support for mesh deformation motion blur. 2014-03-29 13:03:47 +01:00
8f33538fab Cycles code refactor: add motion sampled normals attribute. 2014-03-29 13:03:46 +01:00
99f5993088 Cycles code refactor: improve vertex motion attribute storage and export.
This now supports multiple steps and subframe sampling of motion.

There is one difference for object and camera transform motion blur. It still
only supports two steps there, but the transforms are now sampled at subframe
times instead of the previous and next frame and then interpolated/extrapolated.
This will give different render results in some cases but it's more accurate.

Part of the code is from the summer of code project by Gavin Howard, but it has
been significantly rewritten and extended.
2014-03-29 13:03:46 +01:00
934767cf7f Cycles code refactor: change curve key to float4 for easier storage as attribute. 2014-03-29 13:03:46 +01:00
0509553b5e Cycles code refactor: changes to make adding new primitive types easier. 2014-03-29 13:03:46 +01:00
24ad7e0bea Cycles code refactor: add support for motion vertex attributes. 2014-03-29 13:03:46 +01:00
41d1675053 Cycles code refactor: move more geometry code into per primitive files. 2014-03-29 13:03:45 +01:00
84470a1190 Cycles code refactor: move geometry related kernel files into own directory. 2014-03-29 13:03:45 +01:00
Sergey Sharybin
bcf6eedc48 Make blender compilable with FFmpeg-0.8.1
Needed for some own tests.
2014-03-27 19:12:21 +06:00
Thomas Dinges
859039f732 Cycles: Raise a proper error message when using Branched Path on sm_30, this is currently still disabled. 2014-03-27 10:29:22 +01:00
Campbell Barton
66671f1aae Cycles: fix for building with cmake when gcc refuses sse args 2014-03-27 10:40:14 +11:00
Campbell Barton
10e7544586 CMake: disable SSE flags if gcc/clang don't support 2014-03-27 08:33:33 +11:00
Lukas Tönne
8da4936590 Fix for build error in Cycles standalone caused by new DeviceDrawParams
added in rB74518b28267e9b18199212fbaa3c689fa018d20c.

No special bind/unbind needed for standalone viewer, so can just use a
static stub in the display callback.
2014-03-26 18:11:16 +01:00
Sergey Sharybin
74518b2826 Fix T39420: Cycles viewport/preview flickers, when moving mouse across editors
Issue was caused by the wrong usage of OCIO GLSL binding API. To make it
work properly on pre-GLSL-1.3 drivers shader is to be enabled after the
texture is binded to the opengl context. Otherwise it wouldn't know the
proper texture size.

This is actually a regression in 2.70 and to be ported to 'a'.
2014-03-26 15:58:53 +06:00
Campbell Barton
a99a8a6070 Code cleanup: style and warnings 2014-03-26 07:53:56 +11:00
Lukas Tönne
ff21f6aeef Fix for own mistake in rB83f2012300acadafd359307e7a00bd71e67e3fd7: used
bool instead of int.

Thanks to Campbell Barton for noticing.
2014-03-24 20:54:50 +01:00
Lukas Tönne
83f2012300 Fix T39341: Cycles Rendered view laggy while using particles.
There are a couple of bugs that come together here:
* Particle hacks: extra modifier stack evaluation just for particles in
rna_Object_create_duplilist. This is where the primary issue stems from,
the "for_render" setting replaced the G.is_rendering flag in threaded
depsgraph. This causes particles to recalculate the entire modifier
stack with _render_ settings instead of viewport settings now. Fixed by
taking the 'preview' parameter in Cycles into account.
* Buggy skin modifier: The skin modifier generates a different amount of
vertices and faces **on every execution**. This must be looked at
separately, but it could be another reason why cycles constantly
restarted the sync process.
* Particles get re-distributed randomly every time (changing seed). This
could be caused just by the broken skin modifier, but might still be an
issue when simply rendering with cycles, since the psys will be
evaluated for render settings, if just temporarily.
2014-03-24 13:10:58 +01:00
Thomas Dinges
8e0ee51b85 Cycles Standalone: XML Updates for Branched Path Multi Light. 2014-03-23 12:29:30 +01:00
Thomas Dinges
31cc49b5df Code cleanup: Move AA Samples variable, this is not exclusive to Branched Path. 2014-03-23 12:15:33 +01:00
Sv. Lockal
c45c472e1b Cycles: SSE optimization for line segments/ribbons hair
Gives ~11% speedup for hair.blend, ~10% for koro_final.blend

Also extract few common subexpressions in hair calculation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D318
2014-03-23 00:45:59 +04:00
Antony Riakiotakis
1206faeb99 Warning cleanup:
* Comparison in utf detection code always failed
* Cast to integer to silence grumpy 64bit gcc
2014-03-22 14:41:38 +02:00
Jens Verwiebe
877706b8eb Cleanup: Restrict the debug -gline-tables-only to cxx_debug in cycles and spelling 2014-03-22 11:33:32 +01:00
Thomas Dinges
ce5395868f Cycles Standalone: Support for relative paths and string OSL parameters.
Patch by John Haddon.
Differential Revision: https://developer.blender.org/D418
2014-03-21 17:22:41 +01:00