Commit Graph

4077 Commits

Author SHA1 Message Date
Bastien Montagne
e29698d3cd Split Normals I (5/5): Add support of split normals to Cycles.
Idea and code by Brecht, many thanks!

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D369
2014-04-13 12:51:13 +02:00
Campbell Barton
5d63f162d5 Fix numpad emulation in non-US keyboards
Patch D455 from Benoît Legat with own minor edits.
2014-04-10 20:31:00 +10:00
Thomas Dinges
297a2223b5 Cycles / CUDA: Increase sm_2x registers to 40.
This fixes the ptaxs "ACCESS_VIOLATION" error and should allow our Linux and Windows build bots to compile again.
Unfortunately this comes with a performance penalty on sm_2x cards, so this is only a workaround for now. Branched Path is still globally disabled on GPU.
2014-04-08 23:25:54 +02:00
Martijn Berger
163a3212b4 OpenCL Change opencl_assert to be more like cuda assert where possible.
added some extra warnings and feedback if things go wrong
2014-04-07 16:17:20 +02:00
Martijn Berger
b224fbf2e7 OpenCL + AMD adapt kernel to newer driver 2014-04-07 14:01:31 +02:00
Campbell Barton
43fb105ff1 Move LIKELY/UNLIKELY into header 2014-04-06 17:25:50 +10:00
Campbell Barton
43a201662a Guarded Alloc: use UNLIKELY for debug memset 2014-04-06 12:58:10 +10:00
Pablo Vazquez
1bd3922b3a Fix error when enabling Mist pass but there was no world. Can't find mist settings, so check for World first. 2014-04-05 17:52:06 -03:00
cb0520f79a Fix for auto detect homogeneous volume with OSL, forgot to include this file in last commit. 2014-04-05 14:49:50 +02:00
Thomas Dinges
53f6057aed Cycles UI: Refactor cpu checks into a use_cpu() function. 2014-04-05 12:49:29 +02:00
Thomas Dinges
d923720312 Cycles: Disable Branched Path on all GPUs for now, until we separate the cubins.
SM_20 fails now as well, reported by Zanqdo in IRC.
2014-04-03 22:18:40 +02:00
bd03e4cfe8 Cycles volume: detect homogeneous volume automatically in common cases.
In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.
2014-04-03 22:13:05 +02:00
Sv. Lockal
ab32a1807d Cycles: SSE optimization for Voronoi cells texture
Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
2014-04-03 23:35:10 +04:00
Sv. Lockal
e7c2578576 Cycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.
This makes bmw scene in msvc 12 builds 6% faster.
It also gives a minor speedup for SSE hair in all compilers.
2014-04-03 22:08:53 +04:00
5e5ec4c138 Fix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer. 2014-04-03 15:59:39 +02:00
Campbell Barton
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
a58814acf5 Fix T39525: cycles volume render difference between branched/non-branched path. 2014-04-02 20:51:29 +02:00
7ed9d1b402 Fix T39523: cycles cache BVH not working correct with deformation motion blur. 2014-04-02 20:51:29 +02:00
Kevin Dietrich
cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
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