blender.git
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

2 years ago`BKE_boundbox_ensure_minimum_dimensions` is no longer necessary
Germano Cavalcante [Tue, 14 Feb 2017 13:25:00 +0000 (10:25 -0300)]
`BKE_boundbox_ensure_minimum_dimensions` is no longer necessary

The bug T46099 no longer applies since the addition of `dist_squared_to_projected_aabb_simple`
Has also been added comments that relates to an occlusion bug with the ruler. I'll investigate this.

2 years agotransform_snap_object: Remove `do_bb` parameter. It is always true
Germano Cavalcante [Tue, 14 Feb 2017 12:38:20 +0000 (09:38 -0300)]
transform_snap_object: Remove `do_bb` parameter. It is always true

2 years agoAlembic: fix naming of imported transforms.
Kévin Dietrich [Tue, 14 Feb 2017 06:59:27 +0000 (07:59 +0100)]
Alembic: fix naming of imported transforms.

When importing an Alembic file with grouped transforms, it would badly name the transforms, taking the name of the parent instead of its own.

Patch by @maxime.robinot

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

2 years agoCycles: Optimize sorting of transparent intersections on CUDA
Sergey Sharybin [Mon, 13 Feb 2017 17:24:45 +0000 (18:24 +0100)]
Cycles: Optimize sorting of transparent intersections on CUDA

2 years agoCycles: Fix wrong transparent shadows with CUDA
Sergey Sharybin [Mon, 13 Feb 2017 17:22:10 +0000 (18:22 +0100)]
Cycles: Fix wrong transparent shadows with CUDA

Was a bug in recent optimization commit.

2 years agoCycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled
Sergey Sharybin [Mon, 13 Feb 2017 15:30:16 +0000 (16:30 +0100)]
Cycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled

Quite simple fix for now which only deals with this case. Maybe we want to do
some "clipping" on image load time so regular textures wouldn't give NaN as
well.

2 years agoCycles: Use fast math without finite optimization
Sergey Sharybin [Mon, 13 Feb 2017 15:25:35 +0000 (16:25 +0100)]
Cycles: Use fast math without finite optimization

This allows us to use faster math and still have reliable
isnan/isfinite tests.

Only do it for host side, kernels stays unchanged.

Thanks Lukas Stockner for the tip!

2 years agoFix T50655: Pointiness is too slow to calculate
Sergey Sharybin [Mon, 13 Feb 2017 11:00:10 +0000 (12:00 +0100)]
Fix T50655: Pointiness is too slow to calculate

Optimize vertex de-duplication the same way as we do doe Remove Doubles.

2 years agoCycles: Use Cycles-side mesh instead of C++ RNA
Sergey Sharybin [Mon, 13 Feb 2017 09:40:05 +0000 (10:40 +0100)]
Cycles: Use Cycles-side mesh instead of C++ RNA

Those are now matching and it's faster to skip C++ RNA to
calculate pointiness.

2 years agoF-Curve normalization: Do proper curve min/max instead of handle min/max
Sergey Sharybin [Mon, 13 Feb 2017 09:00:46 +0000 (10:00 +0100)]
F-Curve normalization: Do proper curve min/max instead of handle min/max

Would be cool to find some way to cache the results.

2 years agoCycles: Don't use built-in API for image sequences in preview mode
Sergey Sharybin [Sat, 11 Feb 2017 21:24:59 +0000 (22:24 +0100)]
Cycles: Don't use built-in API for image sequences in preview mode

Our Python API is not ready for such things at all. Better be slower
but more correct for until we improve our API.

2 years agoImage: Fix non-deterministic behavior of image sequence loading
Sergey Sharybin [Sat, 11 Feb 2017 21:15:30 +0000 (22:15 +0100)]
Image: Fix non-deterministic behavior of image sequence loading

The issue was caused by usage of non-initialized image user, which
could have different settings, causing some random image being loaded
or not loaded at all.

This caused non-deterministic behavior of Cycles image loading because
it was querying image information from several places.

This fixes crash reported in T50616, but it's not a complete fix
because preview rendering in material is wrong (same wrong as in
2.78a release).

2 years agoUI: Redesign the VSE multicam strip
Aaron Carlisle [Sat, 11 Feb 2017 16:35:02 +0000 (11:35 -0500)]
UI: Redesign the VSE multicam strip

Idea from https://rightclickselect.com/p/sequencer/zfbbbc/sequencer-panels-update by @pauloup

|{F434631}|{F434624}|
|Before |After|

Test file:
{F434643}

2 years agoUse dummy versionning numbers for missing libraries.
Bastien Montagne [Fri, 10 Feb 2017 21:49:22 +0000 (22:49 +0100)]
Use dummy versionning numbers for missing libraries.

We now assert that we now file version of libraries (needed for
do_version after linking step), so for missing libraries, set dummy
numbers (using version of main .blend file actually).

2 years agoDe-duplicate min/max calculation in F-Curve normalization
Sergey Sharybin [Fri, 10 Feb 2017 17:10:26 +0000 (18:10 +0100)]
De-duplicate min/max calculation in F-Curve normalization

2 years agoCTests: Initial work to cover Cycles nodes with OpenGL tests
Sergey Sharybin [Fri, 10 Feb 2017 13:52:54 +0000 (14:52 +0100)]
CTests: Initial work to cover Cycles nodes with OpenGL tests

Works similar to regular Cycles tests, just does OpenGL render to
get output image.

Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.

2 years agoCleanup: Trailing whitespace
Sergey Sharybin [Fri, 10 Feb 2017 13:08:12 +0000 (14:08 +0100)]
Cleanup: Trailing whitespace

2 years agoCycles: Cleanup, move EdgeMap to blender_util
Sergey Sharybin [Fri, 10 Feb 2017 12:33:02 +0000 (13:33 +0100)]
Cycles: Cleanup, move EdgeMap to blender_util

it's better place for such an utility structure. Still not fully ideal tho.

2 years agoCycles: Make an utility class for edge map
Sergey Sharybin [Fri, 10 Feb 2017 12:31:59 +0000 (13:31 +0100)]
Cycles: Make an utility class for edge map

Simplifies some logic.

2 years agoCycles: Fix pointiness attribute giving wrong results with autosplit
Sergey Sharybin [Fri, 10 Feb 2017 12:23:40 +0000 (13:23 +0100)]
Cycles: Fix pointiness attribute giving wrong results with autosplit

Basically made the algorithm to handle vertices with the same coordinate
as a single vertex.

2 years agoCycles: Cleanup: Use less indentation by inverting condition
Sergey Sharybin [Fri, 10 Feb 2017 09:10:06 +0000 (10:10 +0100)]
Cycles: Cleanup: Use less indentation by inverting condition

2 years agoCycles: Calculate all vertex attribute after faces generation
Sergey Sharybin [Fri, 10 Feb 2017 09:06:58 +0000 (10:06 +0100)]
Cycles: Calculate all vertex attribute after faces generation

This way the calculation is not spread over multiple places.

2 years agoCycles: Cleanup: use vector instead of bare malloc
Sergey Sharybin [Fri, 10 Feb 2017 09:05:41 +0000 (10:05 +0100)]
Cycles: Cleanup: use vector instead of bare malloc

This way memory is more "manageable" and easier to follow.

2 years agoAlembic: fixed mistake in bounding box computation
Sybren A. Stüvel [Fri, 10 Feb 2017 10:52:14 +0000 (11:52 +0100)]
Alembic: fixed mistake in bounding box computation

By performing the Z-up to Y-up conversion, the change in sign of the
Z-coordinate swaps "minimum" and "maximum".

2 years agoDo not overide text
Aaron Carlisle [Thu, 9 Feb 2017 21:25:04 +0000 (16:25 -0500)]
Do not overide text

2 years agoFix T50629 -- Add remove doubles to the cleanup menu
Aaron Carlisle [Thu, 9 Feb 2017 21:18:33 +0000 (16:18 -0500)]
Fix T50629 -- Add remove doubles to the cleanup menu

Also move it up in the verticies menu

2 years agoCleanup: Remove commented code
Aaron Carlisle [Thu, 9 Feb 2017 14:26:12 +0000 (09:26 -0500)]
Cleanup: Remove commented code

Code has been commented from before 2010 and relates to old Background image code.

2 years agoUse a smaller cross icon for clearing search box contents
Joshua Leung [Thu, 9 Feb 2017 06:08:58 +0000 (19:08 +1300)]
Use a smaller cross icon for clearing search box contents

2 years agoMore tweaks to Normalisation options in Graph Editor
Joshua Leung [Thu, 9 Feb 2017 05:59:51 +0000 (18:59 +1300)]
More tweaks to Normalisation options in Graph Editor

* Added a new dedicated icon for normalize
* Only use an icon for "Auto"

2 years agoGraph Editor: Replace Normalise/Auto checkboxes with toggle buttons
Joshua Leung [Thu, 9 Feb 2017 04:04:21 +0000 (17:04 +1300)]
Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons

These take less space, fit in better with rest of the UI, and make their relationship clearer

2 years agoFix: GPencil delete operators did not respect color locking
Joshua Leung [Sat, 28 Jan 2017 11:05:41 +0000 (00:05 +1300)]
Fix: GPencil delete operators did not respect color locking

2 years agoCycles: Fix regression with transparent shadows in volume
Sergey Sharybin [Mon, 30 Jan 2017 13:40:37 +0000 (14:40 +0100)]
Cycles: Fix regression with transparent shadows in volume

2 years agoCycles: Solve speed regression by casting opaque ray first
Sergey Sharybin [Mon, 30 Jan 2017 13:11:58 +0000 (14:11 +0100)]
Cycles: Solve speed regression by casting opaque ray first

2 years agoCycles: Fix compilation error on OpenCL
Sergey Sharybin [Mon, 30 Jan 2017 11:33:58 +0000 (12:33 +0100)]
Cycles: Fix compilation error on OpenCL

2 years agoCycles: Split shadow functions to avoid some duplicated calculations
Sergey Sharybin [Mon, 30 Jan 2017 11:08:20 +0000 (12:08 +0100)]
Cycles: Split shadow functions to avoid some duplicated calculations

2 years agoCycles: Store shadow intersections in the kernel globals
Sergey Sharybin [Wed, 21 Sep 2016 15:46:25 +0000 (17:46 +0200)]
Cycles: Store shadow intersections in the kernel globals

Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.

Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.

2 years agoCycles: Speedup transparent shadows on CUDA
Sergey Sharybin [Wed, 8 Feb 2017 12:05:05 +0000 (13:05 +0100)]
Cycles: Speedup transparent shadows on CUDA

This commit enables record-all behavior of transparent shadows
rays.

Render times difference goes as following:

               GTX 1080 render time
BMW                  -0.5%
Fishy Cat            -0.0%
Pabellon Barcelona   -11.6%
Classroom            +1.2%
Koro                 -58.6%

Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.

2 years agoCycles: Implement record-all transparent shadow function for GPU
Sergey Sharybin [Wed, 21 Sep 2016 15:34:15 +0000 (17:34 +0200)]
Cycles: Implement record-all transparent shadow function for GPU

The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing  on
CPU already).

This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.

This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.

2 years agoCycles: Use an utility function to sort intersections array
Sergey Sharybin [Wed, 21 Sep 2016 10:53:38 +0000 (12:53 +0200)]
Cycles: Use an utility function to sort intersections array

2 years agoCycles: Make GPU version of shadow_blocked() closer to CPU
Sergey Sharybin [Wed, 21 Sep 2016 10:39:14 +0000 (12:39 +0200)]
Cycles: Make GPU version of shadow_blocked() closer to CPU

Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.

2 years agoCycles: De-duplicate transparent shadows attenuation
Sergey Sharybin [Wed, 21 Sep 2016 10:30:52 +0000 (12:30 +0200)]
Cycles: De-duplicate transparent shadows attenuation

Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.