Commit Graph

53213 Commits

Author SHA1 Message Date
Campbell Barton
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
Campbell Barton
23ef10c705 Code cleanup: kdopbvh, move minmax init into function 2014-03-30 10:33:01 +11:00
Campbell Barton
1963e03bd7 Support #ifndef WITH_SMOKE again 2014-03-30 09:32:57 +11:00
Antony Riakiotakis
7571f2707a Fix MinGW64 compilation until we update the libraries. 2014-03-29 22:12:52 +02: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
Antony Riakiotakis
e659cfdaf7 Change dyntopo detail size calculation slightly so the result is close
to the radius of the widget when setting the detail.
2014-03-29 18:16:36 +02: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
07d1fba367 RNA/Smoke: add access to high resolution density grid, and flame and color grids. 2014-03-29 13:03:47 +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
Campbell Barton
2100fb4094 Code cleanup: avoid setting du/dv twice with ray intersection 2014-03-29 22:38:01 +11:00
Campbell Barton
fb0959f88d Code cleanup: replace dot with len_squared and is_zero checks 2014-03-29 22:24:12 +11:00
Antony Riakiotakis
6bba006bf2 Cleanup: Minor spelling fixes: 2014-03-29 11:56:32 +02:00
Antony Riakiotakis
6a1b7facf9 GPU_pbvh_buffers: Use triangles to render multires.
A question here might be: why?

The answer is that GPUs will convert this to triangles so we are wasting
memory during conversion of the element buffer to a triangle buffer
anyway.

The second reason is that some modern GPUs are slower rendering GL_QUADS

The third reason is that due to element caching, this should not in
theory be slower (cached elements do not get recalculated on the GPU).
2014-03-29 11:40:53 +02:00
Campbell Barton
eaaacfc7b8 UI: Color-Ramp handles
- display handles with solid color.
- active handle is highlighted.
- 1/4 of the colorband draws solid.
- use old-style handles when zoomed out.

D289 by Charlie Jolly with own modifications.
2014-03-29 15:36:50 +11:00
Campbell Barton
b64bdb2c1b Checker percentage calc was wrong, also cleanup 2014-03-29 11:25:44 +11:00
Campbell Barton
3eb2724c14 Update clang array checker for new clang py api 2014-03-29 11:08:24 +11:00
Antony Riakiotakis
aec4367226 Fix building without openmp continued 2014-03-29 00:11:35 +02:00
Campbell Barton
d3309ac5c9 Code cleanup: correct arg size 2014-03-29 08:42:59 +11:00
Jens Verwiebe
025421950b Forgot to clean a line in last commit 2014-03-28 22:42:21 +01:00
Jens Verwiebe
00a9e77259 Fix compiling sculpt without OpenMP available 2014-03-28 22:37:05 +01:00
Antony Riakiotakis
6d973b87a6 Fix T39468
Issue is that sampling functions did not pass a thread index to the
texture sampler so all threads were contesting for the same pool.

Paint cursors and sculpting that used openmp for threading suffered from
this. Now use omp_get_thread_num to pass the thread number.
2014-03-28 22:02:26 +02:00
Campbell Barton
8b43b9f255 Fix for mask vert add-slide dragging flipped direction 2014-03-29 06:44:40 +11:00
Bastien Montagne
e9d733a8bd Fix T39484: Time line: highlighted area for frame range one frame too short.
Just using same principle as the one already used for the 'cache bar': add -0.5/+0.5 offsets to start/end (also edited 'view all' op to match this).
2014-03-28 15:15:30 +01:00
Sergey Sharybin
1af69b6df3 Implement asymmetric and free handles type for masks
Summary:
The title actually says it all, it's just possible to
have independent free handles for mask splines. Also
it's now possible to have aligned handles displayed
as independent handles.

Required changes in quite a few places, but they're
rather straightforward.

From user perspective there's one really visible change
which is removed Handle Type menu from the panel. With
asymmetric handles it's not clear which handle type to
display there. So now the only way to change handle type
is via V-key menu.

Rewrote normal evaluation function to make it deal
with new type of handles we support. Now it works in
the following way:

- Offset the original spline by maximal weight
- Calculate vector between corresponding U positions
  on offset and original spline
- Normalize this vector.

Seems to be giving more adequate results and doesn't
tend to self-intersect as much as old behavior used to,

There're still some changes which needed to be done, but
which are planned for further patch:

- Support colors and handle size via themes.
- Make handles color-coded, just the same as done for
  regular bezier splines in 3D viewport.

Additional changes to make roto workflow even better:
- Use circles to draw handles
- Support AA for handles
- Change click-create-drag to change curvature of the
  spline instead of adjusting point position.

Reviewers: campbellbarton

CC: sebastian_k, hype, cronk

Differential Revision: http://developer.blender.org/D121
2014-03-28 17:54:38 +06:00
Sergey Sharybin
6e5e3b73f3 Fix T37599: Crash making linked objects local and undo
Root of the issues comes to the fact that it's possible to produce
a situation when library object data uses local object. This is
actually forbidden and not supported by .blend IO.

Made it so Make Local wouldn't produce such an unsupported states.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D372
2014-03-28 17:14:11 +06:00
Lukas Treyer
97cb76a45d Bevel Factor Mapping
Bevel Factor Mapping allows to control the relation between bevel factors
(number between 0 and 1) and the rendered start and end point of a beveled
spline.

There are three options: "Resolution", "Segments", "Spline". "Resolution"
option maps bevel factors as it was done < 2.71, "Spline" and "Segments"
are new.

* "Resolution“: Map the bevel factor to the number of subdivisions of a
  spline (U resolution).
* "Segments“: Map the bevel factor to the length of a segment and to the
  number of subdivisions of a segment.
* "Spline": Map the bevel factor to the length of a spline.

Reviewers: yakca, sergey, campbellbarton

CC: sanne

Differential Revision: https://developer.blender.org/D294
2014-03-28 16:44:33 +06:00