blender.git
2 years agoCleanup: code-style, duplicate header
Campbell Barton [Wed, 1 Mar 2017 13:16:36 +0000 (00:16 +1100)]
Cleanup: code-style, duplicate header

2 years agoFix text and icon positioning issues
raa [Wed, 1 Mar 2017 13:11:21 +0000 (16:11 +0300)]
Fix text and icon positioning issues

2 years agoTask scheduler: Remove counter of done tasks
Sergey Sharybin [Wed, 1 Mar 2017 11:45:51 +0000 (12:45 +0100)]
Task scheduler: Remove counter of done tasks

This was only used for progress report, and it's wrong because:

- Pool might in theory be re-used by different tasks
- We should not make any decision based on scheduling stats

Proper way is to take care of progress by the task itself.

2 years agoCleanup: Use explicit unsigned int in atomics
Sergey Sharybin [Wed, 1 Mar 2017 11:01:19 +0000 (12:01 +0100)]
Cleanup: Use explicit unsigned int in atomics

2 years agoCleanup: update copyright and Blender description
Aaron Carlisle [Tue, 28 Feb 2017 16:59:18 +0000 (11:59 -0500)]
Cleanup: update copyright and Blender description

2 years agoCycles: Fix division by zero in volume code which was producing -nan
Sergey Sharybin [Tue, 28 Feb 2017 16:33:06 +0000 (17:33 +0100)]
Cycles: Fix division by zero in volume code which was producing -nan

2 years agoFix/workaround T48549: Crash baking high-to-low-poly normal map in cycles
Sergey Sharybin [Tue, 28 Feb 2017 13:08:33 +0000 (14:08 +0100)]
Fix/workaround T48549: Crash baking high-to-low-poly normal map in cycles

For now only prevent crash.

2 years agoFix T49936: Cycles point density get's it's bounding box from basis shape key
Sergey Sharybin [Tue, 28 Feb 2017 11:39:40 +0000 (12:39 +0100)]
Fix T49936: Cycles point density get's it's bounding box from basis shape key

2 years agoCleanup: Grey --> Gray
Aaron Carlisle [Tue, 28 Feb 2017 00:33:57 +0000 (19:33 -0500)]
Cleanup: Grey --> Gray

2 years agoSurface Deform Modifier (SDef)
Luca Rood [Mon, 27 Feb 2017 15:39:14 +0000 (12:39 -0300)]
Surface Deform Modifier (SDef)

Implementation of the SDef modifier, which allows meshes to be bound by
surface, thus allowing things such as cloth simulation proxies.

User documentation: https://wiki.blender.org/index.php/User:Lucarood/SurfaceDeform

Reviewers: mont29, sergey

Subscribers: Severin, dfelinto, plasmasolutions, kjym3

Differential Revision: https://developer.blender.org/D2462

2 years agoFix memory leak when making duplicates real and parent had constraints
Sergey Sharybin [Mon, 27 Feb 2017 16:46:21 +0000 (17:46 +0100)]
Fix memory leak when making duplicates real and parent had constraints

Thanks Bastien for help!

2 years agoFix/workaround T50677: Shrinkwrap constraint don't get updated when target mesh gets...
Sergey Sharybin [Mon, 27 Feb 2017 15:27:53 +0000 (16:27 +0100)]
Fix/workaround T50677: Shrinkwrap constraint don't get updated when target mesh gets modified

Do a "full" update on leaving sculpt mode, so we are sure scene will be brought
to a consistent state.

Ideally we'll only do that when there are objects which depends on geometry
without re-calculating self geometry, but that's a bit tricky currently.

2 years agoSimilar to previous commit, but for object constraints
Sergey Sharybin [Mon, 27 Feb 2017 15:19:52 +0000 (16:19 +0100)]
Similar to previous commit, but for object constraints

2 years agoDepsgraph: Shrinkwrap constraint actually depends on geometry
Sergey Sharybin [Mon, 27 Feb 2017 15:00:39 +0000 (16:00 +0100)]
Depsgraph: Shrinkwrap constraint actually depends on geometry

2 years agoCycles: Fix compilation error on vanilla Ubuntu 16.10
Sergey Sharybin [Mon, 27 Feb 2017 14:22:51 +0000 (15:22 +0100)]
Cycles: Fix compilation error on vanilla Ubuntu 16.10

Patch by @swerner, thanks!

2 years agoFix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Sergey Sharybin [Mon, 27 Feb 2017 14:11:51 +0000 (15:11 +0100)]
Fix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash

Attributes were not resized after pushing new triangles to the mesh.

2 years agoFix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Sergey Sharybin [Mon, 27 Feb 2017 12:39:23 +0000 (13:39 +0100)]
Fix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash

Wrong formula was used to calculate needed verts and tris to be reserved.

2 years agoCycles: Make it more clear values never changes by using const qualifier
Sergey Sharybin [Mon, 27 Feb 2017 12:30:11 +0000 (13:30 +0100)]
Cycles: Make it more clear values never changes by using const qualifier

2 years agoCleanup: typo in struct name
Campbell Barton [Mon, 27 Feb 2017 09:44:59 +0000 (20:44 +1100)]
Cleanup: typo in struct name

2 years agoCycles: Forgot this in previous commit
Sergey Sharybin [Mon, 27 Feb 2017 11:54:35 +0000 (12:54 +0100)]
Cycles: Forgot this in previous commit

2 years agoCycles: Add more logs about what's going on in shader optimization
Sergey Sharybin [Mon, 27 Feb 2017 11:38:24 +0000 (12:38 +0100)]
Cycles: Add more logs about what's going on in shader optimization

2 years agoCycles: Experiment with replacing Sharp Glossy with GGX when Filter Glossy is used
Sergey Sharybin [Wed, 14 Dec 2016 11:22:57 +0000 (12:22 +0100)]
Cycles: Experiment with replacing Sharp Glossy with GGX when Filter Glossy is used

The idea is to make it simpler to remove noise from scenes when some prop uses
Sharp glossy closure and causes noise in certain cases. Previously Sharp Glossy
was not affected by Filter Glossy at all, which was quite confusing.

Here is a file which demonstrates the issue: {F417797}

After applying the patch all the noise from the scene is gone.

This change also solves fireflies reported in T50700.

Reviewers: brecht, lukasstockner97

Differential Revision: https://developer.blender.org/D2416

2 years agoFix missing break setting curve auto-handles
Campbell Barton [Mon, 27 Feb 2017 02:32:45 +0000 (13:32 +1100)]
Fix missing break setting curve auto-handles

2 years agoFix unreported bug: Ensure you have the correct array directory even after the `dm...
Germano Cavalcante [Sun, 26 Feb 2017 17:16:54 +0000 (14:16 -0300)]
Fix unreported bug: Ensure you have the correct array directory even after the `dm->release(dm)`

2 years agoImprove add-on UI error message
Campbell Barton [Sun, 26 Feb 2017 16:54:12 +0000 (03:54 +1100)]
Improve add-on UI error message

Show the paths of the duplicate addons

D791 by @gregzaal

2 years agoCleanup: minor changes to array_store
Campbell Barton [Sun, 26 Feb 2017 04:25:19 +0000 (15:25 +1100)]
Cleanup: minor changes to array_store

- remove unused struct member.
- misleading variable name.

2 years agoFix compiling after a0b8a9f
Jens Verwiebe [Sat, 25 Feb 2017 13:58:08 +0000 (14:58 +0100)]
Fix compiling after a0b8a9f

2 years agoFix (unreported) missing update when adding constraint from RNA.
Bastien Montagne [Sat, 25 Feb 2017 10:27:11 +0000 (11:27 +0100)]
Fix (unreported) missing update when adding constraint from RNA.

2 years agoFix rows with fixed last item (D2524)
raa [Sat, 25 Feb 2017 10:18:41 +0000 (13:18 +0300)]
Fix rows with fixed last item (D2524)

2 years agoAlembic: avoid crashing when reading non-indexed UV params.
Kévin Dietrich [Sat, 25 Feb 2017 06:08:14 +0000 (07:08 +0100)]
Alembic: avoid crashing when reading non-indexed UV params.

2 years agoAlembic: addition of a scope timer to perform basic profiling.
Kévin Dietrich [Sat, 25 Feb 2017 05:18:32 +0000 (06:18 +0100)]
Alembic: addition of a scope timer to perform basic profiling.

2 years agoFix T50698: Cycles baking artifacts with transparent surfaces.
Brecht Van Lommel [Sat, 25 Feb 2017 02:09:02 +0000 (03:09 +0100)]
Fix T50698: Cycles baking artifacts with transparent surfaces.

2 years agoFix build error with macOS / clang / c++11.
Brecht Van Lommel [Sat, 25 Feb 2017 01:35:53 +0000 (02:35 +0100)]
Fix build error with macOS / clang / c++11.

2 years agoFix T50757: Alembic, assign imported materials to the object data
Kévin Dietrich [Fri, 24 Feb 2017 20:19:52 +0000 (21:19 +0100)]
Fix T50757: Alembic, assign imported materials to the object data
instead of to the object itself.

2 years agoFix T50676: Crash on closing while frameserver rendering.
Bastien Montagne [Fri, 24 Feb 2017 13:56:50 +0000 (14:56 +0100)]
Fix T50676: Crash on closing while frameserver rendering.

Can't see any reason to call AUD exit early in WM_exit, that's a
low-level module that has no dependency on anything else in Blender, but
is dependency of some other parts of Blender, so it should rather be
exited late in the process!

2 years agoCycles: Fix compilation warning with CUDA on OSX
Sergey Sharybin [Fri, 24 Feb 2017 13:33:10 +0000 (14:33 +0100)]
Cycles: Fix compilation warning with CUDA on OSX

2 years agoCycles: Fix non-zero exit status when rendering animation from CLI and running out...
Sergey Sharybin [Fri, 24 Feb 2017 13:25:11 +0000 (14:25 +0100)]
Cycles: Fix non-zero exit status when rendering animation from CLI and running out of memory

2 years agoAdd "Gravitation" option to "Force" type force fields
Luca Rood [Thu, 23 Feb 2017 22:00:03 +0000 (19:00 -0300)]
Add "Gravitation" option to "Force" type force fields

This adds an option to force fields of type "Force", which enables the
simulation of gravitational behavior (dist^-2 falloff).

Patch by @AndreasE

Reviewers: #physics, LucaRood, mont29

Reviewed By: #physics, LucaRood, mont29

Tags: #physics

Differential Revision: https://developer.blender.org/D2389

2 years agoFix some more minor issue with updated py doc generation.
Bastien Montagne [Thu, 23 Feb 2017 21:31:21 +0000 (22:31 +0100)]
Fix some more minor issue with updated py doc generation.

2 years agoFix stupid mistake in previous commit for release builds of API doc.
Bastien Montagne [Thu, 23 Feb 2017 21:08:01 +0000 (22:08 +0100)]
Fix stupid mistake in previous commit for release builds of API doc.

2 years agoUpdate py API doc generation tools to comply to new name scheme on server.
Bastien Montagne [Thu, 23 Feb 2017 20:24:47 +0000 (21:24 +0100)]
Update py API doc generation tools to comply to new name scheme on server.

 - for rc/release: /api/2.79c/, zip file named blender_python_reference_2.79c_release.zip
 - for dev: /api/master/, zip file named blender_python_reference_2_79_4.zip

2 years agoUsual UI messages fixes...
Bastien Montagne [Thu, 23 Feb 2017 20:10:43 +0000 (21:10 +0100)]
Usual UI messages fixes...

2 years agoCycles: Fix compilation error on 32bit Linux
Sergey Sharybin [Thu, 23 Feb 2017 16:30:26 +0000 (17:30 +0100)]
Cycles: Fix compilation error on 32bit Linux

2 years agoCycles: Fix wrong render results with texture limit and half-float textures
Sergey Sharybin [Thu, 23 Feb 2017 13:46:22 +0000 (14:46 +0100)]
Cycles: Fix wrong render results with texture limit and half-float textures

2 years agoCycles: Add utility function to convert float to half
Sergey Sharybin [Thu, 23 Feb 2017 13:42:06 +0000 (14:42 +0100)]
Cycles: Add utility function to convert float to half

handles overflow and underflow, but not NaN/inf.

2 years agoFix T50656: Compositing node editor is empty, no nodes can be added
Sergey Sharybin [Thu, 23 Feb 2017 10:23:49 +0000 (11:23 +0100)]
Fix T50656: Compositing node editor is empty, no nodes can be added

2 years agoFix T50748: Render Time incorrect when refreshing rendered preview in GPU mode
Sergey Sharybin [Thu, 23 Feb 2017 09:50:46 +0000 (10:50 +0100)]
Fix T50748: Render Time incorrect when refreshing rendered preview in GPU mode

2 years agoFix T50736: Zero streaks in Glare node.
Bastien Montagne [Thu, 23 Feb 2017 09:39:51 +0000 (10:39 +0100)]
Fix T50736: Zero streaks in Glare node.

Please never, ever use same DNA var for two different things. Even worse
if they do not have same type and ranges!

This is only ensuring issues (as described in report, but also if
animating both RNA props using same DNA var... yuck).

And we were not even saving any byte in DNA, could reuse some padding
there to store the two new needed vars (yes, two, since we cannot re-use
existing one if we want to keep backward *and* forward compatibility).

2 years agoFix possible crash in various 3D View operators
Julian Eisel [Thu, 23 Feb 2017 00:59:40 +0000 (01:59 +0100)]
Fix possible crash in various 3D View operators

Was actually harmeless and not crashing, but I'd say more or less only
by luck: the NULL-check for region data would only evaluate to true for
the correct 3D View region. However, if we were to add region data to a
different region type in future, this would lead to undefined behavior
if executed in the wrong region.

2 years agoColumns should be expandable by default
raa [Wed, 22 Feb 2017 21:03:31 +0000 (00:03 +0300)]
Columns should be expandable by default

2 years agoFix T50745: Shape key editing on bezier objects broken with Rendered Viewport Shading
Bastien Montagne [Wed, 22 Feb 2017 20:20:50 +0000 (21:20 +0100)]
Fix T50745: Shape key editing on bezier objects broken with Rendered Viewport Shading

So... Curve+shapekey was even more broken than it looked, this report was
actually a nice crasher (immediate crash in an ASAN build when trying to
edit a curve shapekey with some viewport rendering enabled).

There were actually two different issues here.

I) The less critical: rB6f1493f68fe was not fully fixing issues from
T50614. More specifically, if you updated obdata from editnurb
*without* freeing editnurb afterwards, you had a 'restored' (to
original curve) editnurb, without the edited shapekey modifications
anymore. This was fixed by tweaking again `calc_shapeKeys()` behavior in
`ED_curve_editnurb_load()`.

II) The crasher: in `ED_curve_editnurb_make()`, the call to
`init_editNurb_keyIndex()` was directly storing pointers of obdata
nurbs. Since those get freed every time `ED_curve_editnurb_load()` is
executed, it easily ended up being pointers to freed memory. This was
fixed by copying those data, which implied more complex handling code
for editnurbs->keyindex, and some reshuffling of a few functions to
avoid duplicating things between editor's editcurve.c and BKE's curve.c

Note that the separation of functions between editors and BKE area for
curve could use a serious update, it's currently messy to say the least.
Then again, that area is due to rework since a long time now... :/

Finally, aligned 'for_render' curve evaluation to mesh one - now
editing a shapekey will show in rendered viewports, if it does have some
weight (exactly as with shapekeys of meshes).

2 years agoCleanup: remove unused orig_nu from keyIndex ghash of editcurves.
Bastien Montagne [Wed, 22 Feb 2017 17:06:09 +0000 (18:06 +0100)]
Cleanup: remove unused orig_nu from keyIndex ghash of editcurves.

2 years agoUse new api doc links
Aaron Carlisle [Wed, 22 Feb 2017 16:17:09 +0000 (11:17 -0500)]
Use new api doc links

Differential Revision: https://developer.blender.org/D2522

2 years agoFix Cycles still saving render output when error happened
Sergey Sharybin [Wed, 22 Feb 2017 12:06:24 +0000 (13:06 +0100)]
Fix Cycles still saving render output when error happened

This was fixed ages ago for the interface case but not for the
command line. The thing here is that currently external engines
are relying on reports system to indicate that error happened
so suppressing reports storage in the background mode prevented
render pipeline from detecting errors happened.

This is all weak and i don't like it, but this is better than
delivering black frames from the farm.

2 years agoCycles: Fix shading with autosmooth and custom normals
Sergey Sharybin [Wed, 22 Feb 2017 09:53:28 +0000 (10:53 +0100)]
Cycles: Fix shading with autosmooth and custom normals

New logic of split_faces was leaving mesh in a proper state
from Blender's point of view, but Cycles wanted loop normals
to be "flushed" to vertex normals.

Now we do such a flush from Cycles side again, so we don't
leave bad meshes behind.

Thanks Bastien for assistance here!

2 years agoCycles: Additionally report all OpenCL cflags
Sergey Sharybin [Wed, 22 Feb 2017 09:04:13 +0000 (10:04 +0100)]
Cycles: Additionally report all OpenCL cflags

This way we can control exact spaces and such added to the cflags
which is crucial to troubleshoot certain drivers.

2 years agoRefactor Mesh split_faces() code to use loop normal spaces.
Bastien Montagne [Wed, 22 Feb 2017 08:40:46 +0000 (09:40 +0100)]
Refactor Mesh split_faces() code to use loop normal spaces.

Finding which loop should share its vertex with which others is not easy
with regular Mesh data (mostly due to lack of advanced topology info, as
opposed with BMesh case).

Custom loop normals computing already does that - and can return 'loop
normal spaces', which among other things contain definitions of 'smooth
fans' of loops around vertices.

Using those makes it easy to find vertices (and then edges) that needs
splitting.

This commit also adds support of non-autosmooth meshes, where we want to
split out flat faces from smooth ones.

2 years agoFix Drawing nested box layouts (D2508)
raa [Tue, 21 Feb 2017 18:02:56 +0000 (21:02 +0300)]
Fix Drawing nested box layouts (D2508)

2 years agoCycles: Speedup by avoiding extra calculations in noise texture when unneeded
Mai Lavelle [Tue, 21 Feb 2017 12:24:33 +0000 (07:24 -0500)]
Cycles: Speedup by avoiding extra calculations in noise texture when unneeded

Noise texture is now faster when the color socket is unused. Potential for
speedup spotted by @nutel.

Some performance results:

                     Render Time Before    After    Difference
Gooseberry benchmark         47:51.34    45:55.57       -4%
Koro                         12:24.92    12:18.46     -0.8%
Simple cube (Color socket)      48.53       48.72     +0.3%
Simple cube (Fac socket)        48.74       32.78    -32.7%
Goethe displacement           1:21.18     1:08.47    -15.6%
Cycles brick displacement     3:02.38     2:16.76    -25.0%
Large displacement scene     23:54.12    20:09.62    -15.6%

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2513

2 years agoCleanup: use proper link to the api
Aaron Carlisle [Tue, 21 Feb 2017 01:19:07 +0000 (20:19 -0500)]
Cleanup: use proper link to the api

2 years agoFix T50718: Regression: Split Normals Render Problem with Cycles
Sergey Sharybin [Mon, 20 Feb 2017 10:56:02 +0000 (11:56 +0100)]
Fix T50718: Regression: Split Normals Render Problem with Cycles

The issue seems to be caused by vertex normal being re-calculated
to something else than loop normal, which also caused wrong loop
normals after re-calculation.

For now issue is solved by preserving CD_NORMAL for loops after
split_faces() is finished, so render engine can access original
proper value.

2 years agoMesh faces split: Add missing vertex normal copy
Sergey Sharybin [Mon, 20 Feb 2017 10:47:43 +0000 (11:47 +0100)]
Mesh faces split: Add missing vertex normal copy

2 years agoFix T50719: Memory usage won't reset to zero while re-rendering on two video cards
Sergey Sharybin [Mon, 20 Feb 2017 10:02:19 +0000 (11:02 +0100)]
Fix T50719: Memory usage won't reset to zero while re-rendering on two video cards

Was only visible with Persistent Images option ON.

2 years agoFix a few compiler warnings with macOS / clang.
Brecht Van Lommel [Sat, 18 Feb 2017 22:52:31 +0000 (23:52 +0100)]
Fix a few compiler warnings with macOS / clang.

2 years agoFix T50564: 3D view panning with scroll wheel inconsistent with dragging.
Brecht Van Lommel [Sat, 18 Feb 2017 16:25:12 +0000 (17:25 +0100)]
Fix T50564: 3D view panning with scroll wheel inconsistent with dragging.

2 years agoFix T50614: Curve doesn't restore initial form after deleting all its shapekeys
Bastien Montagne [Fri, 17 Feb 2017 17:55:52 +0000 (18:55 +0100)]
Fix T50614: Curve doesn't restore initial form after deleting all its shapekeys

Logic of handling shapekeys when entering and leaving edit mode for
curves was... utterly broken.

Was leaving actual curve data with edited shapekey applied to it.

2 years agoRemove unused functions related to distance between BoundBox and ray
Germano Cavalcante [Fri, 17 Feb 2017 12:49:20 +0000 (09:49 -0300)]
Remove unused functions related to distance between BoundBox and ray

2 years agoForgotten in last commit: Check the allocation
Germano Cavalcante [Fri, 17 Feb 2017 02:41:38 +0000 (23:41 -0300)]
Forgotten in last commit: Check the allocation

2 years agoDo not release the arrays used in the parameters of the expanded functions of bvhutils
Germano Cavalcante [Fri, 17 Feb 2017 01:55:01 +0000 (22:55 -0300)]
Do not release the arrays used in the parameters of the expanded functions of bvhutils

The release of these arrays should be the programmer's discretion since these arrays can continue to be used.

Only the expanded functions `bvhtree_from_mesh_edges_ex` and `bvhtree_from_mesh_looptri_ex` are currently being used in blender (in mesh_remap.c), and from what I could to analyze, these changes can prevent a crash.

2 years agoMake File: Print 'blender.exe' at the end of the path to run from
Aaron Carlisle [Thu, 16 Feb 2017 22:08:33 +0000 (17:08 -0500)]
Make File: Print 'blender.exe' at the end of the path to run from

2 years agoCleanup: Spelling, Spaces --> Tabs, Whitespace
Aaron Carlisle [Thu, 16 Feb 2017 22:06:03 +0000 (17:06 -0500)]
Cleanup: Spelling, Spaces --> Tabs, Whitespace

2 years agoUI: Move 'relations extras' right below 'relations'
Aaron Carlisle [Thu, 16 Feb 2017 17:01:07 +0000 (12:01 -0500)]
UI: Move 'relations extras' right below 'relations'

Differential Revision: https://developer.blender.org/D2218

2 years agoFix T50687: Cycles baking time estimate and progress bar doesn't work / progress...
Sergey Sharybin [Thu, 16 Feb 2017 16:15:08 +0000 (17:15 +0100)]
Fix T50687: Cycles baking time estimate and progress bar doesn't work / progress when baking with high samples

2 years agoRegister test for mesh.split_faces()
Sergey Sharybin [Thu, 16 Feb 2017 14:36:00 +0000 (15:36 +0100)]
Register test for mesh.split_faces()

2 years agoFaces split: Don't leave CD_NORMAL after split
Sergey Sharybin [Thu, 16 Feb 2017 10:00:17 +0000 (11:00 +0100)]
Faces split: Don't leave CD_NORMAL after split

This is supposed to be a temporary layer.

If someone needs loop normals after split it should explicitly
ask for that.

2 years agoCyctes tests: Commit blender.git side changes
Sergey Sharybin [Thu, 16 Feb 2017 09:36:22 +0000 (10:36 +0100)]
Cyctes tests: Commit blender.git side changes

2 years agoCDDM Copy: Only tag data layers dirty if we ignored tessellation data
Sergey Sharybin [Thu, 16 Feb 2017 08:55:44 +0000 (09:55 +0100)]
CDDM Copy: Only tag data layers dirty if we ignored tessellation data

This solves assert failure in CustomData_from_bmeshpoly() happening with
broom.blend file from barber shop SVN.

2 years agoCleanup: Indentation
Sergey Sharybin [Thu, 16 Feb 2017 08:16:20 +0000 (09:16 +0100)]
Cleanup: Indentation

2 years agoFreestyle: Feature edge selection by nested object groups.
Tamito Kajiyama [Thu, 16 Feb 2017 01:51:40 +0000 (10:51 +0900)]
Freestyle: Feature edge selection by nested object groups.

A group of object groups can be formed by means of the dupli_group option in
the Object properties window.  The present revision extends the Selection by
Group option in the Freestyle Line Set so as to support not only flat object
groups but also nested groups.

2 years agoFix more corner cases failing in mesh faces split
Sergey Sharybin [Wed, 15 Feb 2017 22:09:31 +0000 (23:09 +0100)]
Fix more corner cases failing in mesh faces split

Now we handle properly case with edge-fan meshes, which should
fix bad topology calculated for cash register which was causing
crashes in the studio.

2 years agoFix wrong edges created by split faces
Sergey Sharybin [Wed, 15 Feb 2017 19:59:55 +0000 (20:59 +0100)]
Fix wrong edges created by split faces

We need to first split all vertices before we can reliably
check whether edge can be reused or not.

There is still known issue happening with a edge-fan mesh
with some faces being on the same plane.

2 years ago[Alembic] Fix msvc warning - C4138 '*/' found outside of comment
lazydodo [Wed, 15 Feb 2017 19:40:41 +0000 (12:40 -0700)]
[Alembic] Fix msvc warning - C4138  '*/' found outside of comment

2 years agoCycles: Cleanup, style
Sergey Sharybin [Wed, 15 Feb 2017 19:33:49 +0000 (20:33 +0100)]
Cycles: Cleanup, style

2 years agoFix T50542: Wrong metadata frame when using OpenGL render
Sergey Sharybin [Wed, 15 Feb 2017 16:09:49 +0000 (17:09 +0100)]
Fix T50542: Wrong metadata frame when using OpenGL render

2 years agoMotion blur investigation feature
Sergey Sharybin [Wed, 15 Feb 2017 15:19:05 +0000 (16:19 +0100)]
Motion blur investigation feature

This commit adds a way to debug Cycles motion blur issues which
are usually happening due to something crazy happening in between
of frames. Biggest trouble was that artists had no clue about
what's happening in subframes before they render. This is at
least inefficient workflow when dealing with motion blur shots
with complex animation.

Now there is an option in Time Line Editor which could be found
in View -> Show Subframe. This option will expose current frame
with it's subframe to the time line editor header and it'll allow
scrubbing with a subframe precision in time line editor.

Please note that none of the tools in Blender are aware of
subframe, so they'll likely be using current integer frame still.

This is something we don't consider a bug for now, the whole
purpose for now is to give a tool for investigation. Eventually
we'll likely tweak all tools to be aware of subframe.

Hopefully now we can finish the movie here in the studio..

2 years agoFix T50662: Auto-split affects on smooth mesh when it sohuldn't
Sergey Sharybin [Wed, 15 Feb 2017 14:21:15 +0000 (15:21 +0100)]
Fix T50662: Auto-split affects on smooth mesh when it sohuldn't

Seems to be a precision error comparing proper floating point
normal with the one coming from short.

2 years agoCycles: Fix CUDA compilation error after recent changes
Sergey Sharybin [Wed, 15 Feb 2017 14:01:08 +0000 (15:01 +0100)]
Cycles: Fix CUDA compilation error after recent changes

2 years agoFix wrong loop normals left after face splitting
Sergey Sharybin [Wed, 15 Feb 2017 13:58:49 +0000 (14:58 +0100)]
Fix wrong loop normals left after face splitting

Let's keep all data in a consistent state, so we don't have any
issues later on.

This solves rendering artifacts mentioned in the previous commit.

2 years agoMesh: Re-implement face split solving issue mentioned earlier
Sergey Sharybin [Wed, 15 Feb 2017 12:56:50 +0000 (13:56 +0100)]
Mesh: Re-implement face split solving issue mentioned earlier

Now new edges will be properly created between original and
new split vertices.

Now topology is correct, but shading is still not quite in
some special cases.

2 years agoCycles: Don't calculate primitive time if BVH motion steps are not used
Sergey Sharybin [Wed, 15 Feb 2017 11:59:31 +0000 (12:59 +0100)]
Cycles: Don't calculate primitive time if BVH motion steps are not used

Solves memory regression by the default configuration.

2 years agoCycles: Pass special flag whether BVH motion steps are used
Sergey Sharybin [Wed, 15 Feb 2017 09:48:02 +0000 (10:48 +0100)]
Cycles: Pass special flag whether BVH motion steps are used

Doesn't currently change anything, but would need for some future
work here.

It uses existing padding in kernel BVH structure, so there is
nothing changed memory-wise.

2 years agoCycles: Fix wrong hair render results when using BVH motion steps
Sergey Sharybin [Wed, 15 Feb 2017 09:56:54 +0000 (10:56 +0100)]
Cycles: Fix wrong hair render results when using BVH motion steps

The issue here was mainly coming from minimal pixel width feature
which is quite commonly enabled in production shots.

This feature will use some probabilistic heuristic in the curve
intersection function to check whether we need to return intersection
or not. This probability is calculated for every intersection check.
Now, when we use multiple BVH nodes for curve primitives we increase
probability of that primitive to be considered a good intersection
for us. This is similar to increasing minimal width of curve.

What is worst here is that change in the intersection probability
fully depends on exact layout of BVH, meaning probability might
change differently depending on a view angle, the way how builder
binned the primitives and such. This makes it impossible to do
simple check like dividing probability by number of BVH steps.

Other solution might have been to split BVH into fully independent
trees, but that will increase memory usage of all the static
objects in the scenes, which is also not something desirable.

For now used most simple but robust approach: store BVH primitives
time and test it in curve intersection functions. This solves the
regression, but has two downsides:

- Uses more memory.

  which isn't surprising, and ANY solution to this problem will
  use more memory.

  What we still have to do is to avoid this memory increase for
  cases when we don't use BVH motion steps.

- Reduces number of maximum available textures on pre-kepler cards.

  There is not much we can do here, hardware gets old but we need
  to move forward on more modern hardware..

2 years agoCycles: Fix missing initialization of triangle BVH steps
Sergey Sharybin [Wed, 15 Feb 2017 09:44:34 +0000 (10:44 +0100)]
Cycles: Fix missing initialization of triangle BVH steps

Likely was harmless for Blender, but better be safe here.

2 years agoCycles: Fix wrong pointiness caused by precision issues
Sergey Sharybin [Wed, 15 Feb 2017 11:39:06 +0000 (12:39 +0100)]
Cycles: Fix wrong pointiness caused by precision issues

2 years agoRevert "Mesh: Solve incorrect result of mesh.split_faces()"
Sergey Sharybin [Wed, 15 Feb 2017 11:33:04 +0000 (12:33 +0100)]
Revert "Mesh: Solve incorrect result of mesh.split_faces()"

The change was delivering broken topology for certain cases.
The assumption that new edge only connects new vertices was
wrong.

Reverting to a commit which was giving correct render results
but was using more memory.

This reverts commit af1e48e8ab7a25269ba5a44158bd16c564ed3535.

2 years agoUI: Wireframe modifier- make crease grayed out when disabled
Aaron Carlisle [Wed, 15 Feb 2017 04:44:21 +0000 (23:44 -0500)]
UI: Wireframe modifier- make crease grayed out when disabled

2 years agoComments: notes on polyfill2d, minor corrections
Campbell Barton [Wed, 15 Feb 2017 03:10:42 +0000 (14:10 +1100)]
Comments: notes on polyfill2d, minor corrections

2 years agoMesh: Solve incorrect result of mesh.split_faces()
Sergey Sharybin [Tue, 14 Feb 2017 16:02:22 +0000 (17:02 +0100)]
Mesh: Solve incorrect result of mesh.split_faces()

This function was keeping original edges and was creating some
extra vertices which is not something we are really looking
forward to,

2 years agoMesh: Cleanup, use shorter version of loop
Sergey Sharybin [Tue, 14 Feb 2017 14:30:49 +0000 (15:30 +0100)]
Mesh: Cleanup, use shorter version of loop

2 years agoMesh: Use faster calculation of previous loop
Sergey Sharybin [Tue, 14 Feb 2017 14:29:31 +0000 (15:29 +0100)]
Mesh: Use faster calculation of previous loop