Commit Graph

66030 Commits

Author SHA1 Message Date
Martijn Berger
c02cce7b75 cycles, cuDeviceComputeCapability is deprecated as of cuda 5.0 2016-11-04 14:49:54 +01:00
Bastien Montagne
f0ac661aa8 Fix T49905: Segfault when copying object data of linked object.
We have to clear `newid` of all datablocks, not only object ones.

Note that this whole stuff is still using some kind of older, primitive
'ID remapping', would like to see whether we can replace it with new,
more generic one, but that's for another day.
2016-11-04 09:55:46 +01:00
Bastien Montagne
17fb504bcf Fix (unreported) asserts in make_object_duplilist_real().
Code would try to add multiple time the same key in `parent_gh` (for this
ghash a lot of dupliobjects may generate same key).

Was making the tool unusable in debug builds.

Also optimise things a bit by avoiding creating parent_gh when only
`use_base_parent` is set.
2016-11-04 08:34:01 +01:00
Bastien Montagne
4e5d251ccb Fix T49918: Make duplicates real crash on clicking operator toggles.
handle_mutex may be NULL here...
2016-11-04 08:11:40 +01:00
Bastien Montagne
4a68ff150f Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier
New code dealing with getting rid of lib-only cycles of data-blocks
could add several time the same datablock to the list of candidates. Now
this is avoided, and pointers are further cleaned up as double-safety
measure.
2016-11-03 21:10:10 +01:00
Bastien Montagne
e27d9facdf install_deps cleanup: some Debian stuff was still present in the 'generic compile-only' part of the script. 2016-11-03 20:08:04 +01:00
Bastien Montagne
dd6fa94dcc Add 'Set From Faces' tool to custom split normals.
Feature request during bconf, makes sense to have it even as an hack for
now, since this is probably one of the most common use cases. This should
be redone in bmesh once we have proper custom noramls handling in edit mode...
2016-11-03 13:26:18 +01:00
Sergey Sharybin
b6980ade90 Depsgraph: Add code for timing despgraph builder 2016-11-03 13:25:07 +01:00
Lukas Stockner
27c559f059 Cycles: Fix missing underscore in geom_object.h 2016-11-03 12:38:00 +01:00
Sergey Sharybin
647255db93 Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
The issue was caused by image ID nodes not being in the depsgraph.

Now, tricky part: we only add nodes but do not add relations yet. Reasoning:

- It's currently important to only call editor's ID update callback to solve
  the issue, without need to flush changes somewhere deeper.

- Adding relations might cause some unwanted updates, so will leave that for
  a later investigation.
2016-11-03 11:31:49 +01:00
Sergey Sharybin
fc1b35e44c Depsgraph: Fix wrong comparison of ID type vs. node type 2016-11-03 11:19:42 +01:00
Sergey Sharybin
534f11f71e Fix T49857: Blender crashes after adding texture node to compositing tree 2016-11-03 10:25:31 +01:00
Lukas Stockner
f800794b97 Cycles: Fix OpenCL build error caused by light termination commit 2016-11-03 03:15:39 +01:00
Lukas Stockner
9847ad977a Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit
Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.

Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.

So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.
2016-11-03 03:08:14 +01:00
Sergey Sharybin
643c5a24d5 Depsgraph: Fix race condition writing drivers to array property
Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).

Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.
2016-11-02 18:08:33 +01:00
Sergey Sharybin
c5510df268 tests: Update hash for OBJ
Was a recent update of UV precision.
2016-11-02 15:35:18 +01:00
Sergey Sharybin
c9ffb6fc91 Libmv: Update tests to make tests pass after recent Ceres update
Just a precision issue, difference is around 1e-7. Should be fine to
simply update expected value.
2016-11-02 15:32:11 +01:00
Sergey Sharybin
15f2a51232 Solve threading conflict when calculating smooth normals
It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.

Bug found by Dalai, thanks!
2016-11-02 15:10:40 +01:00
Gaia Clary
dac5438562 COLLADA: Removed obsolete Export select option 'Both' which created invalid data (duplicate transformation information for nodes) 2016-11-02 14:11:46 +01:00
Sergey Sharybin
630c0559f9 Depsgraph: Fix some errors printed to the console
They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.

Now it should be easier to see real bugs printed.

Hopefully should be no regressions here.
2016-11-02 12:23:00 +01:00
Martijn Berger
4fdf68271c Cycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp 2016-11-02 10:56:16 +01:00
Sergey Sharybin
83ebf501cd CMake: Make ld.gold linker optional
Some platforms are having hard time using this linker so added an option
to not use it. The options is an advanced one and enabled by default so
should not cause any changes for current users.
2016-11-02 10:42:15 +01:00
Sergey Sharybin
97a8cd6883 CMake: Fix use of some option which was never defined
This way it seems more logical to me.
2016-11-02 10:32:46 +01:00
lazydodo
f94a460397 [msvc/make.bat] Detect spaces in the build path and error out. 2016-11-01 15:30:12 -06:00
Dalai Felinto
13ee9b8ebe Change frame for animations should not bein the UNDO stack
Request from Hjalti Hjalmarsson for the animation work.

Basically a common part of the workflow of animation is to change the pose, scrub back and forth a few times and roll back the changes when unsatisfied.
However if you go back and forth too many times the UNDO stack would be full, and it would not be possible to bring back the previous pose.

I'm leaving clip_editor change frames as it is for now. But we can
probably change the behaviour there as well.
2016-11-01 22:11:16 +01:00
Bastien Montagne
4e95a9069e Add 'copy array' for rna buttons
ctrl-alt-c/v allows to copy/paste whole RNA array, e.g. location, rotation, etc., from UI buttons.

Request from Andy at the studio.
2016-11-01 14:59:12 +01:00
Bastien Montagne
1ee43c5aef Fix T49856: Blender 2.78 crashes after loading data from a blendfile
Issue here was that py API code was keeping references (pointers) to the
liniked data-blocks, which can actually be duplicated and then deleted
during the 'make local' process...

Would have like to find a better way than passing optional GHash to get
the oldid->newid mapping, but could not think of a better idea.
2016-11-01 13:39:31 +01:00
Sergey Sharybin
bf1e9bc613 Ceres: Update to the latest actual version
Brings all the fixes and improvements done in upstream within the last 13 months.
2016-11-01 11:29:33 +01:00
Sybren A. Stüvel
cf8f6d1dbc Added 'delete unlocked vertex groups' option. 2016-10-31 15:31:47 +01:00
Campbell Barton
aad46dd175 BMesh: radial loop (internal API symmetry)
Radial append/remove had swapped args and *slightly* different behavior.
- bmesh_radial_append(edge, loop)
- bmesh_radial_loop_remove(loop, edge)

Match logic for append/remove,
Logic for the one case where the edge needs to be left untouched
has been moved to: `bmesh_radial_loop_unlink`.
2016-10-31 23:05:20 +11:00
Campbell Barton
6488ce7f33 BMesh: simplify vert & edge removal 2016-10-31 22:07:23 +11:00
Campbell Barton
60682c37dd BMesh: remove redundant walker member & assignment 2016-10-31 17:24:15 +11:00
Lukas Stockner
04aa454075 Cycles: Deduplicate AO calculation
No functional changes.
2016-10-31 00:40:59 +01:00
Julian Eisel
2257e6899a UI: Don't show empty panel right-click menu 2016-10-31 00:08:13 +01:00
Lukas Stockner
2e9dd1200f Cycles: Fix OpenCL compilation with the new brick texture 2016-10-30 16:25:35 +01:00
Lukas Stockner
5050572e89 Cycles: Style Fix: Light sampling threshold description 2016-10-30 13:51:49 +01:00
Kévin Dietrich
b6d35e1fa7 Viewport smoke: add support to render the volume using a color ramp.
This is yet another debug option that allows to render an arbitrary
simulation field by using a color ramp to inspect its voxel values.
Note that when using this, fire rendering is turned off.

Reviewers: plasmasolutions, gottfried

Differential Revision: https://developer.blender.org/D1733
2016-10-30 12:29:05 +01:00
Lukas Stockner
4e68f48227 Cycles: Initialize the RNG state from the kernel instead of the host
This allows to save a memory copy, which will be particularly useful for network rendering.

Reviewers: sergey, brecht, dingto, juicyfruit, maiself

Differential Revision: https://developer.blender.org/D2323
2016-10-30 11:51:20 +01:00
Lukas Stockner
26bf230920 Cycles: Add optional probabilistic termination of light samples based on their expected contribution
In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.

Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.

Reviewers: #cycles

Subscribers: sergey, brecht

Differential Revision: https://developer.blender.org/D2217
2016-10-30 11:31:28 +01:00
Kévin Dietrich
ce785868a5 Fix compile errors for when WITH_ALEMBIC is OFF. 2016-10-30 03:42:46 +01:00
Lukas Stockner
b2974d7ab7 Cycles: Add smoothing option to the Brick Texture
This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.

The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility.

Reviewers: sergey, dingto, juicyfruit, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision: https://developer.blender.org/D2230
2016-10-30 02:16:22 +02:00
Lukas Stockner
5aa6a2ec06 Fix T49846: OpenCL rendering compilation failure 2016-10-29 20:06:52 +02:00
Lukas Stockner
1272ee455e Cycles: Implement texture coordinates for Point, Spot and Area Lamps
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp.
On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp.

Credit for the Area lamp part goes to Stefan Werner (from D1995).
2016-10-29 19:24:08 +02:00
Kévin Dietrich
d3b0977a35 Fix T49878: Alembic crash with long object name
Crash comes from writing to char array (ID::name) out its bound and thus
overriding memory in the ID struct.
2016-10-29 16:22:33 +02:00
Kévin Dietrich
753edafcb7 Alembic: store a pointer to the object reader in the cache modifiers and
constraints.

This avoids traversing the archive everytime object data is needed and
gives an overall consistent ~2x speedup here with files containing
between 136 and 500 Alembic objects. Also this somewhat nicely de-
duplicates code between data creation (upon import) and data streaming
(modifiers and constraints).

The only worying part is what happens when a CacheFile is deleted and/or
has its path changed. For now, we traverse the whole scene and for each
object using the CacheFile we free the pointer and NULL-ify it (see
BKE_cachefile_clean), but at some point this should be re-considered and
make use of the dependency graph.
2016-10-29 12:23:09 +02:00
Kévin Dietrich
0c13792437 Alembic export: fix frame range values being reset at every update, draw
call.
2016-10-29 11:04:51 +02:00
Kévin Dietrich
8a1b38f071 Cleanup: avoid using G.main. 2016-10-28 18:26:34 +02:00
Kévin Dietrich
216dec7eb1 Alembic Export: set start and end frame to that of the scene for
convenience.

Users will most likely export an entire animation rather than a single
frame, so it can save a few clicks.
2016-10-28 18:21:43 +02:00
Kévin Dietrich
65c481e145 CacheFile: fix missing depsgraph update. 2016-10-28 18:08:31 +02:00
Kévin Dietrich
194a33ff00 CacheFile: only enable scale property slider if we are editing the cache
through a constraint.

It doesn't make sense and is a bit confusing to have this property
enabled in the modifier context.
2016-10-28 18:08:30 +02:00