blender.git
6 years agoAdd unit tests for aligned alloc
Sergey Sharybin [Thu, 19 Jun 2014 06:45:00 +0000 (12:45 +0600)]
Add unit tests for aligned alloc

This was really handy on initial work of aligned alloc
and would be handy as well when we'll need to support
arbitrary alignment on Apple platforms.

6 years agoCycles: attempt to solve compilation error on 32bit OSX
Sergey Sharybin [Thu, 19 Jun 2014 06:24:08 +0000 (12:24 +0600)]
Cycles: attempt to solve compilation error on 32bit OSX

6 years agoCorrect for recent commit to refactor popups
Campbell Barton [Thu, 19 Jun 2014 05:40:46 +0000 (15:40 +1000)]
Correct for recent commit to refactor popups

6 years agoCurve: zero memory on access rather then calloc
Campbell Barton [Thu, 19 Jun 2014 05:13:15 +0000 (15:13 +1000)]
Curve: zero memory on access rather then calloc

also remove redundant check

6 years agoFreestyle: removed WOEdge::getVec3r() which in effect was a duplicate of WOEdge:...
Tamito Kajiyama [Thu, 19 Jun 2014 05:19:09 +0000 (14:19 +0900)]
Freestyle: removed WOEdge::getVec3r() which in effect was a duplicate of WOEdge::GetVec().

6 years agoFix T40546: Duplicate spline breaks shape keys
Campbell Barton [Thu, 19 Jun 2014 03:53:26 +0000 (13:53 +1000)]
Fix T40546: Duplicate spline breaks shape keys

6 years agoBake-API: small cleanup to prevent unfreed memory when there are baking errors
Dalai Felinto [Wed, 18 Jun 2014 22:46:34 +0000 (19:46 -0300)]
Bake-API: small cleanup to prevent unfreed memory when there are baking errors

Fix to be included in 2.71

6 years agoBake-API: fix for non-NORMAL maps baking black when using cage
Dalai Felinto [Tue, 17 Jun 2014 15:39:14 +0000 (12:39 -0300)]
Bake-API: fix for non-NORMAL maps baking black when using cage

Reported by Andy Davies (metalliandy) outside the tracker
Fix to include in 2.71

6 years agoFix T4068787 Cycles Bake Selected To Active From Non-Mesh Object Fails With Error
Dalai Felinto [Wed, 18 Jun 2014 22:18:52 +0000 (19:18 -0300)]
Fix T4068787 Cycles Bake Selected To Active From Non-Mesh Object Fails With Error

Users can now bake from Mesh, Font, Curve, Surface and Metaballs.
Fix to include in 2.71

6 years agoFixup for fd0b7428 Bake-API: allow custom UV to be baked
Dalai Felinto [Wed, 18 Jun 2014 21:43:58 +0000 (18:43 -0300)]
Fixup for fd0b7428 Bake-API: allow custom UV to be baked

6 years agoComplete last commit.
Bastien Montagne [Wed, 18 Jun 2014 21:53:11 +0000 (23:53 +0200)]
Complete last commit.

Sorry, forgot to check other uses of BKE_nurb_makeCurve, NURBS surfaces were affected as well.

6 years agoFix T40694: Curve path messed up.
Bastien Montagne [Wed, 18 Jun 2014 21:45:16 +0000 (23:45 +0200)]
Fix T40694: Curve path messed up.

Error in rB4b4bb410e04e, BKE_nurb_makeCurve() requires its coord_array to be zero'ed,
hence we need calloc here.

6 years agoFix T40637, jittering can cause the mesh to disappear.
Antony Riakiotakis [Wed, 18 Jun 2014 18:40:58 +0000 (21:40 +0300)]
Fix T40637, jittering can cause the mesh to disappear.

Do not do a step when there is no collision of the brush with the mesh.

6 years agoCorrection to GTest commit (WITH_GTEST=OFF works now)
Campbell Barton [Wed, 18 Jun 2014 18:35:15 +0000 (04:35 +1000)]
Correction to GTest commit (WITH_GTEST=OFF works now)

6 years agomissed removing this in recent popup refactor
Campbell Barton [Wed, 18 Jun 2014 18:24:15 +0000 (04:24 +1000)]
missed removing this in recent popup refactor

6 years agoCorrect error in last commit
Campbell Barton [Wed, 18 Jun 2014 18:17:38 +0000 (04:17 +1000)]
Correct error in last commit

6 years agoEditmesh: add ability to show weights on wire T39054, D585
Gaia Clary [Wed, 18 Jun 2014 18:01:19 +0000 (04:01 +1000)]
Editmesh: add ability to show weights on wire T39054, D585

6 years agoFix blenderplayer compile...
Bastien Montagne [Wed, 18 Jun 2014 17:56:56 +0000 (19:56 +0200)]
Fix blenderplayer compile...

6 years agoFix T40585, group textures cannot be selected for painting.
Antony Riakiotakis [Wed, 18 Jun 2014 17:40:27 +0000 (20:40 +0300)]
Fix T40585, group textures cannot be selected for painting.

Issue here is that if there's a texture in the tree, chances are it has
already been set as active texture so groups are never traversed.

Now changed logic so that if a group node is active, its own active
texture takes priority over the parent group active texture.

6 years agoSome WITH_TESTS weer not renamed to WITH_GTEST
Sergey Sharybin [Wed, 18 Jun 2014 16:28:27 +0000 (22:28 +0600)]
Some WITH_TESTS weer not renamed to WITH_GTEST

6 years agoGTest unit testing framework
Sergey Sharybin [Wed, 18 Jun 2014 12:49:17 +0000 (22:49 +1000)]
GTest unit testing framework

Currently covers only small set of functionality.

6 years agoFix T40679.
Antony Riakiotakis [Wed, 18 Jun 2014 15:40:11 +0000 (18:40 +0300)]
Fix T40679.

Cleanest way here is not do bounding box collision for editmeshes at
all. Decision is taken because:

* Usually we want to do the snapping to the edited mesh anyway (when we
don't the mesh is skipped completely, so we don't need to worry for
extra checks)

* Bounding box is calculated from derived mesh. This means that for
subsurfed meshes for instance, the bounding box may be significantly
smaller than the size of the edit mesh.

6 years agoRevert "Fix flickering when transform snapping in edit mode and cursor is"
Antony Riakiotakis [Wed, 18 Jun 2014 15:20:55 +0000 (18:20 +0300)]
Revert "Fix flickering when transform snapping in edit mode and cursor is"

Looks like the cleanest way to handle this is to no do bounding box collision
for edit mode at all. But this is easy to enforce

This reverts commit 7b5fe4f316234022a0ab761b694cd459ce98db2d.

Conflicts:
source/blender/editors/transform/transform_snap.c

6 years agoMove tests into tests/ top-level dir
Campbell Barton [Wed, 18 Jun 2014 11:44:40 +0000 (21:44 +1000)]
Move tests into tests/ top-level dir

6 years agoCode cleanup: use bool instead of int
Sergey Sharybin [Wed, 18 Jun 2014 10:05:42 +0000 (16:05 +0600)]
Code cleanup: use bool instead of int

6 years agoHopefully fix compilation with old MSVC2008/WIN32...
Bastien Montagne [Wed, 18 Jun 2014 08:31:16 +0000 (10:31 +0200)]
Hopefully fix compilation with old MSVC2008/WIN32...

6 years agoCode cleanup: replace direct operator calls with ED_object_toggle_modes
Campbell Barton [Wed, 18 Jun 2014 06:29:03 +0000 (16:29 +1000)]
Code cleanup: replace direct operator calls with ED_object_toggle_modes

6 years agoCode cleanup: de-duplicate flag check in ED_object_toggle_modes
Campbell Barton [Wed, 18 Jun 2014 06:23:50 +0000 (16:23 +1000)]
Code cleanup: de-duplicate flag check in ED_object_toggle_modes

6 years agoTransform: PET quick checks to speedup wire-only edge case
Campbell Barton [Wed, 18 Jun 2014 06:09:02 +0000 (16:09 +1000)]
Transform: PET quick checks to speedup wire-only edge case

6 years agoCode cleanup: replace 0 with OB_MODE_OBJECT
Campbell Barton [Wed, 18 Jun 2014 06:01:51 +0000 (16:01 +1000)]
Code cleanup: replace 0 with OB_MODE_OBJECT

6 years agoResolve memory leask with reports on initialization
Campbell Barton [Wed, 18 Jun 2014 05:48:38 +0000 (15:48 +1000)]
Resolve memory leask with reports on initialization

6 years agoQuiet warning
Campbell Barton [Wed, 18 Jun 2014 05:48:22 +0000 (15:48 +1000)]
Quiet warning

6 years agoTransform: PET only treat faces as connected diagonally across quads
Campbell Barton [Wed, 18 Jun 2014 05:16:01 +0000 (15:16 +1000)]
Transform: PET only treat faces as connected diagonally across quads

Was an intentional change, but worse for concave ngons, resolves T40675

6 years agoFix for weak floating-point number comparison.
Tamito Kajiyama [Wed, 18 Jun 2014 04:13:22 +0000 (13:13 +0900)]
Fix for weak floating-point number comparison.

Was causing assertion failures in MinGW-w64.

6 years agoCorrect casts for IS_EQ and other macro tweaks
Campbell Barton [Wed, 18 Jun 2014 04:00:58 +0000 (14:00 +1000)]
Correct casts for IS_EQ and other macro tweaks
- ensure GET_INT_FROM_POINTER us only used to get values
- rename STACK_POP_ELSE -> STACK_POP_DEFAULT

6 years agoFix memory leaks in subsurf
Campbell Barton [Wed, 18 Jun 2014 02:07:20 +0000 (12:07 +1000)]
Fix memory leaks in subsurf

6 years agoDisable cubins for OSX buildbot
Sergey Sharybin [Tue, 17 Jun 2014 20:29:49 +0000 (02:29 +0600)]
Disable cubins for OSX buildbot

This is a temporary solution in order to get at least
rest of the blender begin up-to-date on the buildbot.

To be able to compile cubins again we need to switch
OSX builder machine to OSX 10.8 and CUDA toolkit 6,
which might take some time, unfortunately.

6 years agoBake-API: allow custom UV to be baked
Dalai Felinto [Tue, 17 Jun 2014 15:16:02 +0000 (12:16 -0300)]
Bake-API: allow custom UV to be baked

Note: the custom UV option is only available when calling the operator
via a script. It's currently not exposed in the UI since it's intended
to be used by scripters

To test it:
bpy.ops.object.bake(type='UV', use_clear=True, uv_layer='MyNewUV')

Reviewers: campbellbarton

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

6 years agoFix some loss of precision in BKE's unit code.
Bastien Montagne [Tue, 17 Jun 2014 14:06:12 +0000 (16:06 +0200)]
Fix some loss of precision in BKE's unit code.

When converting text to value, units' "value" had only 6 digits of precision,
leading to annoying loss of precision esp. when mixing big and small units
(like e.g. miles and inches).

6 years agoAdd a first basic set of tests for the new bpy.utils.units module/API
Bastien Montagne [Tue, 17 Jun 2014 14:04:48 +0000 (16:04 +0200)]
Add a first basic set of tests for the new bpy.utils.units module/API

Only contains 'LENGTH' type tests currently.

6 years agoNew python API for units handling.
Bastien Montagne [Tue, 17 Jun 2014 14:03:40 +0000 (16:03 +0200)]
New python API for units handling.

Exposes all supported unit systems & types, and to_value()/to_string() functions.

Reviewed and enhanced by CampbellBarton, many thanks!

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

6 years agoBLI: Add two helpers to search a given string in an array of strings.
Bastien Montagne [Tue, 17 Jun 2014 13:58:07 +0000 (15:58 +0200)]
BLI: Add two helpers to search a given string in an array of strings.

6 years agoFix T40620: BGE Python - Ray sensor has wrong axis constants
Campbell Barton [Tue, 17 Jun 2014 12:13:44 +0000 (22:13 +1000)]
Fix T40620: BGE Python - Ray sensor has wrong axis constants

6 years agoFix for bad NULL check
Campbell Barton [Tue, 17 Jun 2014 12:04:20 +0000 (22:04 +1000)]
Fix for bad NULL check

6 years agoSupport for building without Python
Campbell Barton [Tue, 17 Jun 2014 11:52:04 +0000 (21:52 +1000)]
Support for building without Python

6 years agoRemove redundant check
Campbell Barton [Tue, 17 Jun 2014 08:52:39 +0000 (18:52 +1000)]
Remove redundant check

6 years agoFix T40638: Crash in Particle System, Connect Hair
Sergey Sharybin [Tue, 17 Jun 2014 08:58:23 +0000 (14:58 +0600)]
Fix T40638: Crash in Particle System, Connect Hair

6 years agoCorrect argument name
Campbell Barton [Tue, 17 Jun 2014 07:33:57 +0000 (17:33 +1000)]
Correct argument name

6 years agoCycles: only use -fno-rtti with OSL (conflicts with -fsanitize=vptr)
Campbell Barton [Tue, 17 Jun 2014 06:00:16 +0000 (16:00 +1000)]
Cycles: only use -fno-rtti with OSL (conflicts with -fsanitize=vptr)

6 years agoCorrect menu name
Campbell Barton [Tue, 17 Jun 2014 05:27:59 +0000 (15:27 +1000)]
Correct menu name

6 years agoFix T40639: operators ignore win.cursor_warp()
Campbell Barton [Tue, 17 Jun 2014 04:10:18 +0000 (14:10 +1000)]
Fix T40639: operators ignore win.cursor_warp()

6 years agoBGE: New Property sensor evaluation types
Jorge Bernal [Tue, 3 Jun 2014 20:20:59 +0000 (13:20 -0700)]
BGE: New Property sensor evaluation types

This patch adds "Less Than" and "Greater Than" evaluation types to the property sensor.
The Wiki Docs modifications http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Sensors/Property
Also, I have attached a screenshot and a blend to check.

Reviewers: dfelinto, moguri

Reviewed By: moguri

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

6 years agoCycles: Slight modification to the previous commit
Sergey Sharybin [Mon, 16 Jun 2014 19:00:43 +0000 (01:00 +0600)]
Cycles: Slight modification to the previous commit

This way util_simd.cpp would not require modifications
if/when SSE2 is suddenly supported on 32bit platforms.

This also allowed to unleash some issues with util_simd.h
related on the fact that there size_t and int are actually
the same types.

6 years agoCycles: Fix compilation error on 32bit platforms
Sergey Sharybin [Mon, 16 Jun 2014 18:22:10 +0000 (00:22 +0600)]
Cycles: Fix compilation error on 32bit platforms

6 years agoFix T40646: Knife project fails with clipping
Campbell Barton [Mon, 16 Jun 2014 17:53:02 +0000 (03:53 +1000)]
Fix T40646: Knife project fails with clipping

6 years agoFix for knife when in ortho camera view
Campbell Barton [Mon, 16 Jun 2014 17:48:01 +0000 (03:48 +1000)]
Fix for knife when in ortho camera view

6 years agoCycles: Fix compilation error on platforms without SSE2
Sergey Sharybin [Mon, 16 Jun 2014 17:34:50 +0000 (23:34 +0600)]
Cycles: Fix compilation error on platforms without SSE2

6 years agoUse ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))
Campbell Barton [Mon, 16 Jun 2014 16:47:57 +0000 (02:47 +1000)]
Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))

6 years agoQuiet warning
Campbell Barton [Mon, 16 Jun 2014 16:08:10 +0000 (02:08 +1000)]
Quiet warning

6 years agoBugfix: Units for time translate transforms (action/nla editors) was messed up
Joshua Leung [Mon, 16 Jun 2014 09:44:08 +0000 (21:44 +1200)]
Bugfix: Units for time translate transforms (action/nla editors) was messed up

When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.

6 years agoFeature Request T40643: Animation channels can be renamed by double-clicking on them too
Joshua Leung [Mon, 16 Jun 2014 09:04:42 +0000 (21:04 +1200)]
Feature Request T40643: Animation channels can be renamed by double-clicking on them too

6 years agoNeed to consider blender-v* a release branch, not just blender-
Sergey Sharybin [Mon, 16 Jun 2014 09:16:18 +0000 (15:16 +0600)]
Need to consider blender-v* a release branch, not just blender-

This is because of blender-tiles branch we've got..

6 years agoForgot this in previous commit
Sergey Sharybin [Mon, 16 Jun 2014 09:13:01 +0000 (15:13 +0600)]
Forgot this in previous commit

6 years agoMake blender-* branches not being displayed on the splash
Sergey Sharybin [Mon, 16 Jun 2014 08:58:56 +0000 (14:58 +0600)]
Make blender-* branches not being displayed on the splash

6 years agoI'd tend to declare dead code is forbidden
Sergey Sharybin [Mon, 16 Jun 2014 08:08:22 +0000 (14:08 +0600)]
I'd tend to declare dead code is forbidden

All this code blocks commented out with UNUSED comment are
really useless.

6 years agoFix T40606: Blender 2.71RC1 for Windows uses too old blender.mo file in Japanese
Sergey Sharybin [Mon, 16 Jun 2014 07:59:46 +0000 (13:59 +0600)]
Fix T40606: Blender 2.71RC1 for Windows uses too old blender.mo file in Japanese

Update submodules to v2.71-rc1, it got lost on re-tag leading to wrong addons
and translations used in RC1.

6 years agoAdd missing dependency to CMake's msgfmt
Sergey Sharybin [Mon, 16 Jun 2014 07:21:33 +0000 (13:21 +0600)]
Add missing dependency to CMake's msgfmt

This could have lead to situation when CMake wouldn't re-generate
.mo file from changed .po file.

6 years agoCode cleanup: move editfont drawing into its own function.
Campbell Barton [Mon, 16 Jun 2014 07:22:41 +0000 (17:22 +1000)]
Code cleanup: move editfont drawing into its own function.

6 years agoObject Drawing: minor refactor, don't check glsl in wire-mode
Campbell Barton [Mon, 16 Jun 2014 07:12:08 +0000 (17:12 +1000)]
Object Drawing: minor refactor, don't check glsl in wire-mode

also don't call glBlendFunc for hidden objects.

6 years agoFix T40648: Bevel Tool - Amount value slider maximum does not adapt to Amount Type...
Bastien Montagne [Mon, 16 Jun 2014 07:03:26 +0000 (09:03 +0200)]
Fix T40648: Bevel Tool - Amount value slider maximum does not adapt to Amount Type settings automaticly.

6 years agoFix T40617: Ortho view selects objects behind camera
Campbell Barton [Mon, 16 Jun 2014 06:55:57 +0000 (16:55 +1000)]
Fix T40617: Ortho view selects objects behind camera

6 years agoFix Python fails to execute text-blocks including non-mbcs chars (T35176, D595)
Tamito Kajiyama [Mon, 16 Jun 2014 05:24:19 +0000 (15:24 +1000)]
Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595)

6 years agoFreestyle: Python API docstring updates.
Tamito Kajiyama [Mon, 16 Jun 2014 01:11:37 +0000 (10:11 +0900)]
Freestyle: Python API docstring updates.

6 years agoD545: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.
Tamito Kajiyama [Mon, 16 Jun 2014 00:56:58 +0000 (09:56 +0900)]
D545: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.

This revision extends the Freestyle Python API to make for style module writing
easier.

- freestyle.types.Stroke: A proper support for reversed() is implemented.  It
works the same with other Python sequence objects (returns an iterator starting
from the end).  This is in effect equivalent to Stroke.stroke_vertices_end().

- freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed
method are added.  The first two methods return a new StrokeVertexIterator
object that has been incremented and decremented, respectively. The reversed
method returns a new StrokeVertexIterator object that will traverse stroke
vertices in the opposite direction.

- freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke
object to create an Interface0DIterator that traverses stroke vertices.  This is
in effect equivalent to Stroke.vertices_begin().  The new API makes stroke
shaders involving function calls much simpler as illustrated below:

  # in the old API
  it = stroke.stroke_vertices_begin()
  for vert in it:
      result = somefunc(Interface0DIterator(it))

  # in the new API
  it = Interface0DIterator(stroke)
  for vert in it:
      result = somefunc(it)

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

Reviewers: kjym3

6 years agoCurve: remove unused displist members
Campbell Barton [Sun, 15 Jun 2014 04:56:59 +0000 (14:56 +1000)]
Curve: remove unused displist members

6 years agoCurve: replace calloc with malloc for values immediately written into
Campbell Barton [Sun, 15 Jun 2014 04:36:33 +0000 (14:36 +1000)]
Curve: replace calloc with malloc for values immediately written into

6 years agoCurve: use zero length array for BevList for less confusing syntax
Campbell Barton [Sun, 15 Jun 2014 04:23:23 +0000 (14:23 +1000)]
Curve: use zero length array for BevList for less confusing syntax

6 years agoCode cleanup: comments
Campbell Barton [Sun, 15 Jun 2014 02:15:28 +0000 (12:15 +1000)]
Code cleanup: comments

6 years agoText Editor: dropping id's now paste in Python data path (like pyconsole)
Campbell Barton [Sun, 15 Jun 2014 02:09:18 +0000 (12:09 +1000)]
Text Editor: dropping id's now paste in Python data path (like pyconsole)

6 years ago* Fix OpenCL after uchar4 commit.
Thomas Dinges [Sat, 14 Jun 2014 23:09:35 +0000 (01:09 +0200)]
* Fix OpenCL after uchar4 commit.

6 years agoFix T40007 Bevel tool resets after getting to 1.
Howard Trickey [Sat, 14 Jun 2014 21:42:06 +0000 (17:42 -0400)]
Fix T40007 Bevel tool resets after getting to 1.

If the side of a beveled edge hit another vertex, the offset
amount reset to zero. This was the result of commit rB1582dd5e4d7c
which clamped the amount to zero to avoid creating spikes with
obtuse angles. Now we clamp the amount to the closest end of
the edge to where the amount wants to be.
Also fixes the first part of T40365.

6 years agoUI: refactor text cache to use zero length arrays
Campbell Barton [Sat, 14 Jun 2014 18:06:44 +0000 (04:06 +1000)]
UI: refactor text cache to use zero length arrays

also correct some bad casts

6 years agoBLI_gsqueue: refactor to use zero length array
Campbell Barton [Sat, 14 Jun 2014 18:30:32 +0000 (04:30 +1000)]
BLI_gsqueue: refactor to use zero length array

6 years agoBLI_gsqueue: use size_t for elem_size (was casting all over)
Campbell Barton [Sat, 14 Jun 2014 17:48:22 +0000 (03:48 +1000)]
BLI_gsqueue: use size_t for elem_size (was casting all over)

6 years agoUI: Add support for popups to refresh their layput (D578)
Campbell Barton [Sat, 14 Jun 2014 15:40:15 +0000 (01:40 +1000)]
UI: Add support for popups to refresh their layput (D578)

This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.

6 years agoFix for last commit, forgot changes in Cycles itself.
Thomas Dinges [Sat, 14 Jun 2014 14:14:36 +0000 (16:14 +0200)]
Fix for last commit, forgot changes in Cycles itself.

6 years agoFix T40609: Wrong WS between word and '?' (no space in english typography in those...
Bastien Montagne [Sat, 14 Jun 2014 13:58:12 +0000 (15:58 +0200)]
Fix T40609: Wrong WS between word and '?' (no space in english typography in those cases).

6 years agoCycles: Don't show "Sharp" distribution in the Anisotropic node.
Thomas Dinges [Sat, 14 Jun 2014 13:44:58 +0000 (15:44 +0200)]
Cycles: Don't show "Sharp" distribution in the Anisotropic node.

6 years agoExpose Weigth tools for edit mode
gaiaclary [Sat, 14 Jun 2014 13:18:46 +0000 (15:18 +0200)]
Expose Weigth tools for edit mode

Most weight tools also work in edit mode.
This change exposes all applicable tools
within a separate weight tool panel
in the tools tab of the tool shelf

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

6 years agoCycles: glossy and anisotropic BSDF changes
Brecht Van Lommel [Sun, 8 Jun 2014 10:46:12 +0000 (12:46 +0200)]
Cycles: glossy and anisotropic BSDF changes

* Anisotropic BSDF now supports GGX and Beckmann distributions, Ward has been
  removed because other distributions are superior.
* GGX is now the default distribution for all glossy and anisotropic nodes,
  since it looks good, has low noise and is fast to evaluate.
* Ashikhmin-Shirley is now available in the Glossy BSDF.

6 years agoCycles: internal code support for anisotropic Beckmann and GGX reflection
Brecht Van Lommel [Tue, 3 Jun 2014 22:39:42 +0000 (00:39 +0200)]
Cycles: internal code support for anisotropic Beckmann and GGX reflection

Based on:

Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs
E. Heitz, Research Report 2014

6 years agoCycles: Ashikhmin-Shirley anisotropic BSDF
Karsten Schwenk [Sun, 8 Jun 2014 10:16:28 +0000 (12:16 +0200)]
Cycles: Ashikhmin-Shirley anisotropic BSDF

* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions

Reviewers: brecht, dingto

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

6 years agoCycles: improved importance sampling for Beckmann and GGX glossy
Brecht Van Lommel [Thu, 29 May 2014 11:32:16 +0000 (13:32 +0200)]
Cycles: improved importance sampling for Beckmann and GGX glossy

Samples render slower than before, but hopefully this is made up for with
reduced noise in most cases. The main slowdown comes from samples that would
previously be wasted and turn out black, which are now continued.

GGX sampling is about the same speed as before, while for Beckmann it is slower
still. Perhaps optimizations are still possible there, but didn't find anything
easy.

Code from this paper, which comes with sample code:

Importance Sampling Microfacet-Based BSDFs using the Distribution of Visible Normals.
E. Heitz and E. d'Eon, EGSR 2014

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

6 years agoCycles: volume sampling method can now be set per material/world.
Brecht Van Lommel [Sat, 7 Jun 2014 16:47:14 +0000 (18:47 +0200)]
Cycles: volume sampling method can now be set per material/world.

This gives you "Multiple Importance", "Distance" and "Equiangular" choices.

What multiple importance sampling does is make things more robust to certain
types of noise at the cost of a bit more noise in cases where the individual
strategies are always better.

So if you've got a pretty dense volume that's lit from far away then distance
sampling is usually more efficient. If you've got a light inside or near the
volume then equiangular sampling is better. If you have a combination of both,
then the multiple importance sampling will be better.

6 years agoCycles: volume light sampling
Brecht Van Lommel [Fri, 4 Apr 2014 14:45:49 +0000 (16:45 +0200)]
Cycles: volume light sampling

* Volume multiple importace sampling support to combine equiangular and distance
  sampling, for both homogeneous and heterogeneous volumes.

* Branched path "Sample All Direct Lights" and "Sample All Indirect Lights" now
  apply to volumes as well as surfaces.

Implementation note:

For simplicity this is all done with decoupled ray marching, the only case we do
not use decoupled is for distance only sampling with one light sample. The
homogeneous case should still compile on the GPU because it only requires fixed
size storage, but the heterogeneous case will be trickier to get working.

6 years agoCycles code refactor: move some surface and volume path code to separate files.
Brecht Van Lommel [Fri, 4 Apr 2014 12:35:30 +0000 (14:35 +0200)]
Cycles code refactor: move some surface and volume path code to separate files.

6 years agoCycles code refactor: deduplicate and symmetrize some path tracing code.
Brecht Van Lommel [Fri, 4 Apr 2014 12:21:35 +0000 (14:21 +0200)]
Cycles code refactor: deduplicate and symmetrize some path tracing code.

6 years agoCycles code refactor: minor changes to light emission code.
Brecht Van Lommel [Thu, 3 Apr 2014 20:43:56 +0000 (22:43 +0200)]
Cycles code refactor: minor changes to light emission code.

6 years agoFix T40610. This is a critical bug caused by own bugfix that does not
Antony Riakiotakis [Sat, 14 Jun 2014 11:30:22 +0000 (14:30 +0300)]
Fix T40610. This is a critical bug caused by own bugfix that does not
allow editing any object type without bounding boxes.

This should be included in the final release!

6 years agoFix compilation in cycles
Antony Riakiotakis [Sat, 14 Jun 2014 10:54:11 +0000 (13:54 +0300)]
Fix compilation in cycles