Commit Graph

63236 Commits

Author SHA1 Message Date
Campbell Barton
462b6dd919 Sequencer: GL preview, use transparent background
Fixes T47425, match 2.76 and non-preview behavior
2016-02-16 21:12:10 +11:00
Campbell Barton
2ecd67efa4 Fix T47422: Factory startup loads too many fonts 2016-02-16 07:52:16 +11:00
Sergey Sharybin
1c4f21f85e Cycles: Initial support of 3D textures for CUDA rendering
Supports both smoke/fire and point density textures now.

Reduces number of textures available for sm_20 and sm_21, but you have
to compromise somewhere on such a limited hardware.

Currently limited to linear interpolation only, and decoupled ray
marching is not supported yet. Think those could be considered just a
further improvement.

Some quick example:

  https://developer.blender.org/F282934

Code is minimal and we can fully consider it a fix for missing
support of 3D textures with CUDA.

Reviewers: lukasstockner97, brecht, juicyfruit, dingto

Reviewed By: brecht, juicyfruit, dingto

Subscribers: mib2berlin

Differential Revision: https://developer.blender.org/D1806
2016-02-15 21:26:29 +01:00
Martijn Berger
b5171e250c Make cycles standalone link again 2016-02-15 21:00:25 +01:00
Bastien Montagne
f2d564d4f3 Usual i18n tweaks... 2016-02-15 20:09:10 +01:00
Bastien Montagne
9a0fb589f7 Cleanup: reorganize BKE ID tagging functions.
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those
into flags (for presistent one) and tags (for runtime ones).

Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts
to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_'
functions affect flags.
2016-02-15 19:38:51 +01:00
Bastien Montagne
a1495366af Cleanup: rna_main_api: use macro to define tag() and is_updated rna functions. 2016-02-15 19:38:51 +01:00
Sergey Sharybin
6c298a16e4 Buildbot: Support CUDA kernels cross-compile and enable it for 32bit platforms 2016-02-15 19:13:52 +01:00
Sergey Sharybin
c93069083e Cycles: Tweaks for 32bit CUDA binaries
Tweak some inline policies. Not totally crazy yet, and in fact we now
have one less ifdef statement now.
2016-02-15 19:11:02 +01:00
Sergey Sharybin
1336e97b12 Cycles: Use CUDA_64_BIT_DEVICE_CODE to detect which CUDA architecture to use
It is initialized based on size of pointer, which matches our previous
behavior, but using it in Cycles side allows to cross-compile CUDA
binaries.
2016-02-15 19:08:36 +01:00
Sergey Sharybin
06743f4018 Cycles: Make guarded allocator compatible with MSVC2015 2016-02-15 18:33:36 +05:00
Campbell Barton
3e6b7d0fd8 Fix white balance, was doing unnecessary linear conversions
This made byte & float images behave differently, where other modifiers remain the same.
Also remove scene from the modifier (should have been passed as arg but no longer needed).
2016-02-16 00:07:03 +11:00
Sergey Sharybin
473eff2df8 Compositor: Re-consider the way how track speed works
Based on an user feedback, previous implementation with providing
decoupled X and Y speeds didn't work in production at all: there
is no way to combine this speeds to an usable vector.

So now we're providing speed vector output instead, which provides
speed in an exactly the way Vector Blur node expects it to be:
first two components is a speed from the past, second two components
defines speed to the future.

Old behavior can be achieved by RGBA separating the speed output
and using first tow components.

Now this speed gives quite the same results as a speed pass, with
the only difference that track position speed uses "shutter" of
1 while pass uses shutter of 0.5 (and there's no way to affect on
that?).
2016-02-15 12:43:14 +01:00
Sergey Sharybin
6371fccdbe Cycles: Fix guarded allocator issues on Windows
The issue was caused by static vectors allocating some internal
data using rebound element allocator for them, which was causing
access to a non-initialized statistics objects and was failing a
lot when switching Blender to a fully guarded allocation.

Additionally, we were not able to free that internal memory before
Blender exits, which was causing false-positive memory leak prints.

Now we're not using GuardedAllocator for those proxy containers.

Ideally this should be done as a GuardedAllocator::rebind, but
it didn't work for vector<bool> because it seems some internal
parts are converting bool to char32_t, which either makes it so
we can't use GuardedAllocator for those vectors or the compiler
get's confused when we're trying explicitly allow GuardedAllocator
for rebind<char32_t>.

This with current approach we should be fine for the release.
2016-02-15 11:46:13 +01:00
Campbell Barton
318d3b9ab4 Cleanup: rst style 2016-02-15 19:43:08 +11:00
Campbell Barton
41fb953fa0 Docs: update tip on using the systems Python 2016-02-15 19:35:54 +11:00
Campbell Barton
aa8fc57f1e Fix for Python executable not being found on Linux
Python name could include ABI-flags after the version,
since checking for all combinations of ABI flags can expand into many possibilities,
take the executable name from the build system.
2016-02-15 19:05:25 +11:00
Campbell Barton
3d24e57ce8 CMake: install python as an executable 2016-02-15 18:45:32 +11:00
Julian Eisel
19201f9ae3 Uber-picky: Too small margin in tooltip
Minor design detail, but kept bugging me :) Was removed in rBd57847ca5b9.
2016-02-14 23:06:43 +01:00
Sergey Sharybin
7d85da882b Cycles: Fix infinite recursion of md5 calculation on Windows
Was caused by some safety things of making sure we've for NULL
terminator for the buffer when doing mbs<->wcs conversion, but
it turns out this simply confuses str::string and it can no
longer have proper .size(). Let's assume behavior of string
allocation is same all over the std, and we can avoid having
that extra null-terminator allocated.
2016-02-14 21:08:11 +05:00
b4e10aa70b Fix T47405: subsurf triangulation was producing incorrect normals after last fix. 2016-02-14 20:25:33 +01:00
Bastien Montagne
a9813f2380 Tweak doc section about overriding context - point out context.copy() usage! 2016-02-14 18:27:35 +01:00
Campbell Barton
1538f526e9 Docs: update doxy config 2016-02-14 22:11:35 +11:00
Campbell Barton
af49690b32 Docs: disable sharing docs within a group
This made using groups apply docstrings to undocumented functions in the group
(and give errors that the args didnt match).
2016-02-14 22:10:42 +11:00
Sergey Sharybin
a71523fab4 Cleanup: braces 2016-02-14 10:14:28 +01:00
Sergey Sharybin
1c870f46e7 Compositor: Cleanup, don't shortcut float values
Use 0.0f instead of 0.f and so on.
2016-02-14 10:12:45 +01:00
de9ec80e64 Fix T47405: subsurf inconsistent triangulation in OpenGL compared to applied modifier and render. 2016-02-14 03:51:41 +01:00
3143ec29d0 Fix T45606: cycles multires tangent space normal map bake issues. 2016-02-14 03:51:41 +01:00
Julian Eisel
f6f851d28a Fix T47404: Bones get draw fat line in pose mode
Removed this glLineWidth call in rBe8d7a0206e99, thought it wasn't needed. Really hope this was the last line width issue for now :/
2016-02-13 23:16:04 +01:00
4c04149bca Fix crash when cancelling cycles bake in some cases. 2016-02-13 22:54:29 +01:00
701a4a4e09 Fix cmd+z for undo not working when editing text objects on OS X. 2016-02-13 22:54:02 +01:00
88770bed7c Fix T47393: mouse wheel scroll no longer zooms with mighty mouse on OS X.
Hopefully this is the last fix, using the method explained here:
https://forums.developer.apple.com/thread/31536
2016-02-13 16:07:55 +01:00
Thomas Dinges
6a593aba44 Cleanup: Move Cycles sky model data to util. 2016-02-13 13:41:40 +01:00
Sergey Sharybin
d1dd893487 Cycles: Remove meaningless expression 2016-02-13 13:29:50 +01:00
Sergey Sharybin
89b1f042cf Cycles: Fix compilation error on Windows 2016-02-13 13:29:13 +01:00
Sergey Sharybin
69dc0c3192 Cycles: Fixes for Burley BSSRDF
There are several fixes in here, which hopefully will make the shader
working correct without too much magic in there.

First of all, this commit brings BURLEY_TRUNCATE down from 30 to 16
which reduces noise a lot. It's still higher than original truncate
from Brecht, but this reduces PDF value at a cutoff distance by an
order of magnitude (now it's 0.008387, previously it was 0.063521
for the albedo of 0.8 and radius 1.0). This should converge to a
proper result faster and don't have artifacts.

This kind of reverts fix for T47356, but after additional thinking
came to conclusion Burley is not being totally smooth, it is about
giving less waxy results which it's kind of doing in the file.

Second of all, this commit fixes burley_eval() to use normalized
diffusion reflectance. This matches the way we calculate CDF and
solves numeric instability close to 0, making PDF profile looking
closer to other SSS profiles:

  https://developer.blender.org/F282355
  https://developer.blender.org/F282356
  https://developer.blender.org/F282357

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1792
2016-02-13 13:29:13 +01:00
Thomas Dinges
83dc288689 Cleanup: Remove some OIIO code for versions prior to 1.5. 2016-02-13 13:21:47 +01:00
Sergey Sharybin
ae635771b2 Cycles: Fix crash caused by the guarded allocation commit
C++ requires specific alignment of the allocations which was not an
issue when using GCC but uncovered issue when using Clang on OSX.
Perhaps some versions of Clang might show errors on other platforms
as well.
2016-02-13 12:35:33 +01:00
Campbell Barton
33fb344171 Docs: remove bmesh py api warning 2016-02-13 20:44:47 +11:00
Campbell Barton
3ec1695273 Sculpt: avoid double-hash for pbvh building
Gives minor speedup entering sculpt mode and with undo.
2016-02-13 18:59:56 +11:00
Campbell Barton
2c2d52c2de Optimize sculpt undo, avoid redundant updates
On undo, sculpting regular meshes would update _all_ GPU VBO's.
Avoiding the update gives noticeably faster undo.

This is also a fix/workaround for strange behavior with NVidia's driver (T47232),
Where locking and unlocking all buffers for updating
slows down redraw speed permanently after the first undo.

However the problem isn't avoided entirely since a single brush stroke might modify most of the mesh.
2016-02-13 18:59:56 +11:00
Campbell Barton
12b996e61b BLI_bitmap: add flip macro 2016-02-13 18:59:56 +11:00
Campbell Barton
c9ef3d1f69 Set alpha clip to lower value
Workaround for T46962 still works
2016-02-13 18:55:23 +11:00
Sergey Sharybin
1477028ea3 Cycles: Fix compilation error with MinGW
Was using some C++0 which we don't officially enabled yet.
2016-02-12 20:21:13 +01:00
Sergey Sharybin
29c0cff680 Fix/workaround compilation error in dds
CLAMP was conflicting between Common.h and BLI_utildefines.h

Ideally we would use macro from BLI, but it's a bit involved change
to make it working with C++, will keep it for later.
2016-02-12 20:14:39 +01:00
Germano Cavalcante
4b42a49086 Fix error in bvhtree_walk_dfs_recursive 2016-02-13 01:53:44 +11:00
Sergey Sharybin
c8d2bc7890 Cycles: Always use guarded allocator of vectors
We don't have vectors re-allocation happening multiple times from inside
a loop anymore, so we can safely switch to a memory guarded allocator for
vectors and keep track on the memory usage at various stages of rendering.

Additionally, when building from inside Blender repository, Cycles will
use Blender's guarded allocator, so actual memory usage will be displayed
in the Space Info header.

There are couple of tricky aspects of the patch:

- TaskScheduler::exit() now explicitly frees memory used by `threads`.
  This is needed because `threads` is a static member which destructor
  isn't getting called on Blender's exit which caused memory leak print
  to happen.

  This shouldn't give any measurable speed issues, reallocation of that
  vector is only one of fewzillion other allocations happening during
  synchronization.

- Use regular guarded malloc (not aligned one). No idea why it was
  made to be aligned in the first place. Perhaps some corner case tests
  or so. Vector was never expected to be aligned anyway. Let's see if
  we'll have actual bugs with this.

Reviewers: dingto, lukasstockner97, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1774
2016-02-12 15:43:26 +01:00
Sergey Sharybin
28604c46a1 Cycles: Make Blender importer more forward compatible
Basically the idea is to make code robust against extending
enum options in the future by falling back to a known safe
default setting when RNA is set to something unknown.

While this approach solves the issues similar to T47377,
but it wouldn't really help when/if any of the RNA values
gets ever deprecated and removed. There'll be no simple
solution to that apart from defining explicit mapping from
RNA value to Cycles one.

Another part which isn't so great actually is that we now
have to have some enum guards and give some explicit values
to the enum items, but we can live with that perhaps.

Reviewers: dingto, juicyfruit, lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1785
2016-02-12 15:27:33 +01:00
Dalai Felinto
ec9977855f Fix: OSX - Cmd + A doesn't work for Font objects editing
Since Cmd + A works elsewhere, it should work during font objects editing as well.

There is still a mysterious issue with Cmd + Z not working for UNDO the edited
text in OSX (probably GHOST related).
2016-02-12 11:58:43 -02:00
Dalai Felinto
a143aeaeae Integrate font objects copy/paste with system clipboard
When pasting text, the style (bold, material, ...) is maintained, if it was originally copied from Blender.

This fixes the issue of missing copy/paste options for font objects
(they were present back in Blender 2.49)

Reviewers: Severin, campbellbarton, brecht
2016-02-12 11:05:05 -02:00