Commit Graph

54934 Commits

Author SHA1 Message Date
Sergey Sharybin
594ff72bfe Fix T41023: Specific material cause bad render result, different on CPU/GPU
Issue was caused by too much aggressive optimization, which skipped execution
of some nodes leading to an uninitialized memory read in SVM stack.
2014-07-11 18:21:52 +06:00
Lukas Tönne
4633e655dc Fix T41019: Calculate Mass does not calculate actual volume.
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex)
the operator was simply using the bounding box volume, which can grossly
overestimate the volume and mass.

Calculating the actual volume of a mesh is not so difficult after all,
see e.g.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf

This patch also allows calculating the center-of-mass in the same way.
This is currently unused, because the rigid body system assumes the CoM
to be the same as the geometric object center. This is fine most of the
time, adding such user settings for "center-of-mass offset" would also
add quite a bit of complexity in user space, but it could be necessary
at some point. A number of other physical properties could be calculated
using the same principle, e.g. the moment of inertia.
2014-07-11 12:16:32 +02:00
Campbell Barton
78d38a9033 BLI_array: avoid mixing terms count/length 2014-07-11 15:30:42 +10:00
Mitchell Stokes
315609ec0c Fix T40257: Frustum culling not working properly
This is mostly the same fix as before, but now code depending on culling
checks is executed after KX_Scene->CalculateVisibleMeshes(). As a
side-effect, LoD checks and animation culling now use the current
frame's culling information rather than the previous frame's.
2014-07-10 22:14:30 -07:00
Campbell Barton
d419e2e90c WM: add WM_operator_properties_create_ptr
Call operator types directly and avoid a lookup when their known.
2014-07-11 15:07:55 +10:00
Campbell Barton
dd9a33dc83 Add mesh tool to split faces by wire edges (face menu)
This can be used in a similar way to the knife tool, but the edges are manually setup first.
2014-07-11 10:32:33 +10:00
Campbell Barton
48abc65c39 BMesh: new face splitting function BM_face_split_edgenet
This takes a face and an edge-net, splitting the face into regions
defined by the edge-net.
2014-07-11 10:29:53 +10:00
Sergey Sharybin
49c73f2f22 Cycles: Add link to a paper used for Beckmann table calculation
This is for those who'll be reading code and trying to improve it.
2014-07-10 19:04:03 +06:00
Sergey Sharybin
5e216a6aa9 Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector

Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.
2014-07-10 19:04:03 +06:00
Lukas Tönne
19f89a083f Fix for invalid memory access in graph editor when deleting the last
vertex in a fcurve.
2014-07-10 13:03:05 +02:00
Sergey Sharybin
42615d88b6 Fix compilation error with scons when building from detached head 2014-07-10 16:23:48 +06:00
Mitchell Stokes
a1aa96940c Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 978dba4616. The change
still doesn't provide accurate culling information, and actually breaks
animation culling.
2014-07-09 22:36:55 -07:00
Sergey Sharybin
30b4d0c0ec Need to disable Libmv for cudakernels target
This way no access to automated tests variables will happen.

Ideally it should be something more like using blenderlite
with just Cycles enabled, but let's keep it for a bigger
clean up.
2014-07-10 10:56:38 +06:00
Sergey Sharybin
430efd4228 SCons: Hopefully final fix for 32bit linux buildbot
No need to run automated tests for cudakernels target. TThis could
be harmless because CUDA binaries are built in the another chroot.
2014-07-10 10:48:31 +06:00
Mitchell Stokes
3a9e588d1a Fix T40909: BGE softbodies broken.
Looks like softbody settings got lost in a recent cleanup.
2014-07-09 21:32:33 -07:00
Thomas Dinges
83f5d41071 Cleanup: Same thing in path trace setup, we can safely always assign the proper value. 2014-07-10 01:49:34 +02:00
Thomas Dinges
dda60dd261 Cleanup: Always assign num_samples, there is no need for this special define. 2014-07-10 01:43:53 +02:00
Sergey Sharybin
b2e9fffc3d Further tweaks to SCons's auto tests
We should do autotests only after setting path to sconsign,
otherwise using the same working directory and different
build directories will eventually break.
2014-07-10 03:53:37 +06:00
Sergey Sharybin
f0c06e71ba Another attempt to fix issues with 32bit OSX and scons 2014-07-10 02:33:44 +06:00
Sergey Sharybin
2788d5f385 Attempt to fix compilation error on 32bit OSX and SCons 2014-07-10 02:19:41 +06:00
Sergey Sharybin
6b5384f637 Buildbot: enable cubins fox OSX
With new buildbot env they should be all fine.
2014-07-10 01:43:30 +06:00
Antony Riakiotakis
a498d88918 Attempt to mitigate issue T40981
Clipping border causes a software fallback on ATIs. We have disabled it
in that case but from minor digging on the net seems like Intels support
this, so enable.
2014-07-09 21:24:37 +03:00
Antony Riakiotakis
f5caab2cf7 Fix T40997, artifacts when unhiding part of the mesh in dyntopo.
Tagging a face as hidden should not be done only when hiding.
2014-07-09 20:13:22 +03:00
Antony Riakiotakis
b617d6d5e6 Fix T40991, mirrored armatures not restored properly when cancelling.
Issue here is that we force mirroring even if original armature is not
mirrored.

We could be smart and store only unselected mirrored bones here (since
those will get restored from transdata), however not all properties were
getting stored and restored; rolling bones still suffered from the bug
for instance.

To fix this we need to restore all properties that armature mirroring
overrides. Transdata obviously does not offer a lot of space here, so I
used TransInfo->customdata to store an array of initial parameters of
the mirrored bones.
2014-07-09 19:58:56 +03:00
Lukas Tönne
5b0e4cd8c9 Fix T41003: Object Info's Random socket produces erratic results when
material is applied to multiple Dupli instances of an object.

One of the random_id initialization lines for cycles objects slipped
into the basic update part in this commit:
rBb98ff5cb5b2c14c33b16e3b129e1e08810e90a6c

This would constantly re-shuffle the random_id ...
2014-07-09 17:26:54 +02:00
Sergey Sharybin
f14e740dee Implement Start Resolution for preview render in BI
So now viewport render resolution division works exactly the same as in Cycles.
2014-07-09 19:55:40 +06:00
Bastien Montagne
2af99b7437 Cleanup: silent C++11 warning (implicit double to float conversion) in Collada code. 2014-07-09 15:12:48 +02:00
Bastien Montagne
e81b1c54d2 Cleanup: get rid of magic numbers. 2014-07-09 15:12:48 +02:00
Sergey Sharybin
e34e0c2c26 Fix T40939: Border render and SSS doesn't work correct in rendered viewport
There were some missing updates in the viewport render job which lead to
wrong SSS mapping on the final resolution.

There was also wrong scaling applying when border render is used.

And last but not least(?) strands render was using first level of the
resolution leading to really thick strands in the final viewport.
2014-07-09 18:26:47 +06:00
Lukas Tönne
c9ac51ec1f Fix T40164: Linking a Group of linked Groups don't take Dupli Visibility
correctly.

Problem was that object layers are defined by duplis as the top-level
duplicator layers. This happens //during// the duplilist construction,
which breaks group layer checks for subsequent instances and hides them.
Now the duplilist generators leave Object DNA untouched, the
modification of layers for drawing, rendering, etc. happens afterward
in the duplilist_apply/restore functions, as a kind of second pass.
2014-07-09 12:25:54 +02:00
Sergey Sharybin
6c70559f58 Fix T40980: Exporting animation in MPEG Matroska using ffv1 and FLAC codecs fails 2014-07-09 15:44:16 +06:00
Bastien Montagne
08eac0c367 Add bone_groups.new() and bone_groups.remove() methods to RNA.
To do so, matching BKE 'API' was also refactored a bit:
* Get Pose data instead of Object, as parameter;
* Removed some sanity checks not needed at such a low level (callers are supposed to do that);
* You can now remove an arbitrary bone group, not only the active one.

Based on patch by pkrime (Paolo Acampora), with own edits.

Reviewers: #python, pkrime, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D522
2014-07-09 10:28:40 +02:00
Tamito Kajiyama
02eb03f868 Freestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator. 2014-07-09 14:52:08 +09:00
Campbell Barton
9c48ea3979 Math Lib: add function to get signed angle about an axis 2014-07-09 11:15:08 +10:00
Campbell Barton
f4484daed3 Correct IS_EMPTY macro
also prevent reading from BM_ELEM_API_FLAG_ get/setters
2014-07-09 07:53:43 +10:00
Jens Verwiebe
a83c6293f4 OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
2014-07-08 23:35:04 +02:00
Jens Verwiebe
9605e0bfb6 OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated
2014-07-08 17:03:44 +02:00
Lukas Tönne
330633f063 Fix T40785: "Select Grouped" Pass Index mode is redundant.
Revert "Object Select Similar tool now has a Pass Index option."

This reverts commit 7a6919a74e.
2014-07-08 16:18:04 +02:00
Lukas Tönne
06d943cfd6 Fix T40983 Particle Texture use of generated coordinates is wrong.
Particle texture eval was not taking the actual texture space for orco/
generated textures into account at all.
2014-07-08 13:44:58 +02:00
Lukas Tönne
a5902fb276 Fix T40986: crash on using the viewer node inside of group nodes.
Viewers were activated both inside the active group as well as the top
level tree (the latter being a quick fix for getting a fallback viewer).
This caused a race condition on the shared viewer image.

Now the active viewer is defined at node conversion time in the converter
so that only one can be active at a time without each node having to
follow complicated rules for exclusion.
2014-07-08 12:51:35 +02:00
Bastien Montagne
bd7fbd4327 Install_deps: minor cleanup.
Patch D633 by simonrepp (Simon Repp), thx.
2014-07-08 12:37:00 +02:00
Jens Verwiebe
ac6b5f2d1d OSX/cmake: more work on T40887 and a tentative fix
- test fail due libiomp5 is not available @ testing time
- must solve this by adding requred flags/includes to tests
- atm release builds are possible with this hack
2014-07-08 00:29:53 +02:00
Campbell Barton
ea1f1fe0c2 BLI_string, dont pass unicode to ascii BLI_str_partition functions 2014-07-08 06:06:34 +10:00
Jens Verwiebe
aac283966f OSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing, breaking all other tests following
- tested gcc 4.8.1 works again
- tested clang-omp in libs works again
- i assume atm., if we only use vanilla clang it is the one in darwin libs
2014-07-07 19:20:33 +02:00
Jorge Bernal
1f43b083a9 BGE: Fix for applyImpulse function
This is related to task T29419. Credit also goes to Goran Milovanovic
(goran) for proposing an initial fix for this issue.

The issue is the current behavior of applyImpulse doesn't match the behavior
described in the documentation as instead of a impulse point in world coordinates,
it seems to require a coordinate in a local space.

Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc)
as it doesn't allow  to choose in which space (local or global) the impulse is applied.

Now, we have the following function:

applyImpulse(point, impulse, local=False)
being "point" the point to apply the impulse to (in world or local coordinates). When local is False will
have both point and impulse in World space and when local is True will have point and impulse in local space.

Reviewers: moguri, dfelinto, brita_

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D567
2014-07-07 08:06:39 -07:00
Thomas Dinges
ef22e972b1 Code cleanup: Simplify decoupled scattering code a bit. 2014-07-07 13:28:10 +02:00
Sergey Sharybin
a472a544d3 Fix compilation error with Freestyle after recent DAG changes 2014-07-07 16:29:04 +06:00
Sergey Sharybin
180a7acd41 Fix T40775: Clearing material texture slot through Python does not update 3D View render 2014-07-07 15:38:40 +06:00
Sergey Sharybin
aa620b5fed Fix T40791: Changing path to movie file does not mark the project as changed 2014-07-07 15:27:24 +06:00
Lukas Tönne
2fe0cf54a5 Fix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport preview.
Fix T39286: Display percentage ignored in Cycles viewport.

The threaded depsgraph update changes included a cleanup of the global
is_rendering flag, which was replaced by a general EvalContext being
passed to dupli functions.

Problem is that the global flag was true for viewport duplis before
(ugly hack), which was used as a check for generating dupli orco/UV from
mesh data layers. The new flag is stricter and only true for actual
renders, which disables these attributes and breaks the Cycles
Texture Coordinates and UVMap nodes.

The solution is to extend the simple for_render boolean to an enum:
* VIEWPORT: OpenGL viewport drawing (dupli tex coords omitted)
* PREVIEW: Viewport preview render (simplified modifiers)
* RENDER: Full render with all details and attributes

There are still some areas that need to be examined, in particular
modifiers seem to totally ignore the EvaluationContext!
Instead they generally execute without render params from the depsgraph
(BKE_object_handle_update_ex) and are built with render settings
explicitly.

Differential Revision: https://developer.blender.org/D613
2014-07-07 10:54:14 +02:00