Commit Graph

57936 Commits

Author SHA1 Message Date
Clément Foucault
fcbb8e71c5 Eevee: SSS: Add SSS to the principled shader. 2017-11-16 21:30:15 +01:00
Clément Foucault
57c3fbd324 Eevee: SSS: Add Christensen-Burley diffusion profile.
This seems to be a correct implementation of the same diffusion profile as Cycles uses by default.

There are a few bias though:
- We consider _A_ the albedo to be 1 when evaluating _s_.
- We use a factor of 0.6 when computing _d_ to match more or less cycles results.

Note that doing per pixel jittering does bias the result even further (loss of energy).
2017-11-16 21:30:15 +01:00
Germano
88c88c4610 Fix T51210: Draw Manager: Support for Metaball Drawing
Differential Revision: D2914
2017-11-16 15:12:32 -02:00
Bastien Montagne
562da211c2 Merge branch 'master' into blender2.8 2017-11-16 12:50:53 +01:00
Bastien Montagne
d697e3d46e BLI listbase: add bytes finding helpers.
Quite similar to string ones actually, except more generic. Used in
id_override_static branch currently.
2017-11-16 12:49:31 +01:00
Campbell Barton
ae8130e287 Merge branch 'master' into blender2.8 2017-11-15 23:17:25 +11:00
Campbell Barton
9c7b89241d BLI_utildefines: sync w/ 2.8 2017-11-15 23:06:34 +11:00
Campbell Barton
474362b363 Cleanup: use 'uint' 2017-11-15 22:58:39 +11:00
Campbell Barton
9cbf374814 GSet: utils to access data stored outside the set 2017-11-15 22:45:37 +11:00
Bastien Montagne
2a7f8d3cb3 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenlib/BLI_math_matrix.h
	source/blender/blenlib/intern/math_matrix.c
	source/blender/blenlib/intern/rand.c
	source/blender/editors/animation/anim_channels_edit.c
	source/blender/makesrna/intern/rna_mask.c
2017-11-15 10:46:19 +01:00
Dalai Felinto
44517c5f21 Merge commit '212a8d9e5ae7' into blender2.8
Considerable non-trivial merge conflict fixes.
2017-11-15 07:40:27 -02:00
Dalai Felinto
258292abc0 Merge commit '212a8d9e5ae7^' into blender2.8 2017-11-15 07:07:27 -02:00
Bastien Montagne
556b13f03e Fix T53309: Remove default 'Clear loc/rot/scale delta transform' shortcuts.
The loc one (shift-alt-G) was same as 'remove selected from active group'
action... Clear delta transform is not a common operation, so we can
live without a default shortcut for it.

Note that using same key (G) in same space for two completely different
kind of operations is probably a rather bad thing, nice topic for future
keymap work. ;)

Probably nice to have in 2.79a.
2017-11-14 22:51:44 +01:00
Dalai Felinto
7549b10212 Cleanup: order from a-z structs in BKE_collection.h and BKE_layer.h 2017-11-14 18:41:20 -02:00
Clément Foucault
3546636870 Eevee: SSS: Fix SSS with Add Shader node. 2017-11-14 21:34:20 +01:00
Clément Foucault
e70c563aa3 Eevee: Add SSS objects to probe rendering.
This does NOT do the SSS diffusion when rendering probe but at least you can see your object without SSS in reflections / bounce light.
2017-11-14 21:13:38 +01:00
Clément Foucault
bc648af4e1 Fix Opengl Error with glBlitFramebuffer
This was caused by 93936b8643

From GL spec :
GL_INVALID_OPERATION is generated if mask contains GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT and the source and destination depth and stencil formats do not match.

So blitting framebuffer with depth or stencil require the SAME FORMAT.
2017-11-14 20:49:33 +01:00
Sergey Sharybin
2868dcbe2b Fix compilation error with clang-5 2017-11-14 17:11:48 +01:00
Sergey Sharybin
6f15554af3 Alembic: Fix mismatch in forward declaration with definition 2017-11-14 17:11:48 +01:00
Arto Kitula
0a3fa9c25c Fix missing SpinLock typedef on macOS 2017-11-14 16:51:34 +02:00
Campbell Barton
f23a595228 Add stdlib include for utildefines
Ideally we could just declare abort, but this has attributes
based on the platform, so include stdlib instead.
2017-11-14 23:38:53 +11:00
Sergey Sharybin
55696b56d9 Fix T53068: AMD Threadripper not working well with Blender
The issue was caused by SpinLock implementation in old pthreads we ar eusing on
Windows. Using newer one (2.10-rc) demonstrates same exact behavior. But likely
using own atomics and memory barrier based implementation solves the issue.

A bit annoying that we need to change such a core part of Blender just to make
specific CPU happy, but it's better to have artists happy on all computers.

There is no expected downsides of this change, but it is so called "works for
me" category. Let's see how it all goes.
2017-11-14 12:21:15 +01:00
Campbell Barton
7adc698eed Cleanup: order BLI before BKE headers
This was done nearly everywhere already
2017-11-14 17:23:40 +11:00
Campbell Barton
b5eeec715e Cleanup: remove BLI_blenlib from ghash header
This causes source files to depend on ghash header
for BLI_string/rect/listbase.

Also quiet warnings.
2017-11-14 17:08:34 +11:00
Campbell Barton
40ad1cf0b1 BLI: sync changes from 2.8 2017-11-14 16:10:48 +11:00
Clément Foucault
289f9f42ff Eevee: SSS: Add Quality settings.
Samples : pretty self explanatory.
Jitter Threshold : Reduce cache misses and improve performance (greatly) by lowering this value. This settings let user decide how many samples should be jittered (rotated) to reduce banding artifacts.
2017-11-14 02:17:34 +01:00
Clément Foucault
f8b1430566 Eevee: Initial Separable Subsurface Scattering implementation.
How to use:
- Enable subsurface scattering in the render options.
- Add Subsurface BSDF to your shader.
- Check "Screen Space Subsurface Scattering" in the material panel options.

This initial implementation has a few limitations:
- only supports gaussian SSS.
- Does not support principled shader.
- The radius parameters is baked down to a number of samples and then put into an UBO. This means the radius input socket cannot be used. You need to tweak the default vector directly.
- The "texture blur" is considered as always set to 1
2017-11-14 00:49:54 +01:00
Clément Foucault
89e9f6ea79 DRW: Better stencil support.
A stencil mask is now assigned to each shading group and the stencil test is defined like the depth test via the DRW_STATE_* defines.
2017-11-13 23:33:06 +01:00
Clément Foucault
93936b8643 GPUTexture: Add for stencil to default depth buffers.
Theses will be used by eevee SSS.

TODO: only allocate stencil if needed.
2017-11-13 23:25:46 +01:00
Clément Foucault
ab013224ad GPUMaterial : Add sss_data to Closure struct. 2017-11-13 22:09:12 +01:00
Dalai Felinto
f402638211 Cleanup on depsgraph logic 2017-11-13 12:17:14 -02:00
Dalai Felinto
1cb6cea71c Merge remote-tracking branch 'origin/master' into blender2.8 2017-11-13 11:48:48 -02:00
Sergey Sharybin
8a03e4d409 Depsgraph: Fix relations for metaballs
Initially spotted and investigated by Dalai and Germano.
2017-11-13 14:43:08 +01:00
Brecht Van Lommel
ebcb880375 Fix T53273: render bake settings properties not showing correct Python path. 2017-11-12 20:30:28 +01:00
Campbell Barton
5b3c15e336 Fix T53294: bpy.ops.image.open crash 2017-11-12 16:05:28 +11:00
Campbell Barton
aae8e21100 BMesh Py API: Expose color alpha 2017-11-12 15:48:24 +11:00
Clément Foucault
f30a2a7862 GPUFramebuffer: Add possibility to blit stencil buffer. 2017-11-11 16:23:55 +01:00
Campbell Barton
0260fad9ba Manipulator: ruler tool
Add the 3D view ruler as a tool,
the modal operator remains for now
however it may be removed if we use the tool-system for 2.8.

Note that this does copy code from the operator,
its different enough not to attempt to de-duplicate.
2017-11-11 03:27:21 +11:00
Campbell Barton
63830cd6a9 Manipulator: public highlight utility function
Also utility to find group from a manipulator map.
2017-11-11 03:19:51 +11:00
Sergey Sharybin
1bd8a82960 Fix assert failure when trying to draw empty string 2017-11-10 16:29:57 +01:00
Germano
8f5e7c3fa9 Merge branch 'master' into blender2.8 2017-11-10 13:02:49 -02:00
Germano
d95eabf0a9 mball_tessellate: Simplify face creation
Faces that have the last two indices equal are considered triangles, and not those that the last index is 0
Improvement of 7% in performance of the `polygonize` function
2017-11-10 12:58:34 -02:00
Dalai Felinto
34c99ee85b Fixup for doversion/layers: disable collections for scene layers 2017-11-10 11:27:30 -02:00
Dalai Felinto
2ec01cc7c5 Layers doversion: Handle hide and hide_render objects
We now created nested collections for the original Collection 1, 2 ...
collections for the "hide" and "hide_render" objects.

Also, remove logic for rename single-collection files, it's now kept as
it was originally (Collection 1, Collection 5, ...).

Thanks Sergey Sharybin and Pablo Vazquez for patch review and suggestions.
2017-11-10 10:37:23 -02:00
Sergey Sharybin
7922b62519 Workaround crash rendering font objects
Needs a proper scene layer and dependency graph, which we do not have
yet during render pipeline.
2017-11-10 11:09:10 +01:00
Bastien Montagne
7a6ad2901c Merge branch 'master' into blender2.8 2017-11-10 10:13:19 +01:00
Dalai Felinto
7defb27f08 Farewell BaseLegacy
Finally, bases are all using the latest, newest SceneLayer bases.
2017-11-09 15:45:19 -02:00
Dalai Felinto
06a7db85bc BGE cleanup: remove Base from KX_Light.h 2017-11-09 15:45:19 -02:00
Sergey Sharybin
3dde21f97e Depsgraph: Fix broken copy-on-write draw after ownership changes
Need to build layer collections callbacks using proper CoW pointer.
2017-11-09 16:42:54 +01:00
Dalai Felinto
cec7f1215a Rename Scene macros back to their original _NEW less names 2017-11-09 13:35:46 -02:00