Commit Graph

71104 Commits

Author SHA1 Message Date
Campbell Barton
a7362eb219 Manipulator: helper API for drawing custom shapes
This exposes 2 methods for manipulators:
- new_custom_shape
- draw_custom_shape

This can be used for script authors to create and re-use shapes
without dealing with lower level API's.
2017-08-21 00:11:16 +10:00
Campbell Barton
adabc315e9 PyAPI: add gpu.select (initial module)
This only exposes load_id, it's needed for Python manipulator drawing.
2017-08-20 23:13:42 +10:00
Campbell Barton
59e10bae3c Manipulator: add read-only matrix_world 2017-08-20 22:44:22 +10:00
Campbell Barton
2530ae6c74 Merge branch 'master' into blender2.8 2017-08-20 21:22:00 +10:00
Campbell Barton
e27a59d411 Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Recent inclusion caused build error with the BGE.
2017-08-20 21:14:33 +10:00
Campbell Barton
cb03cc6600 PyAPI: gpu.matrix.push_pop context manager
Avoid un-balanced push/pop usage (which can interfere with Blender's
internal state) using a context manager.
2017-08-20 19:42:31 +10:00
Campbell Barton
f6825d333b Fix bpy library load: invalid function signature 2017-08-20 19:04:16 +10:00
Campbell Barton
8037f3602f PyAPI: Add exceptions to stack push/pop
Raise exception when stack limits are reached.
2017-08-20 17:26:51 +10:00
Campbell Barton
33b265c4fb PyAPI: use PyC_Long_As... for gawain
Avoids inline overflow checks.
2017-08-20 15:58:37 +10:00
Campbell Barton
7497488149 Merge branch 'master' into blender2.8 2017-08-20 15:50:15 +10:00
Campbell Barton
46cf33bf01 PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
Campbell Barton
a10a7f42de PyAPI: Integer conversion functions
Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
2017-08-20 15:39:08 +10:00
Campbell Barton
2ff9c8a3bc PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-08-20 15:30:14 +10:00
Campbell Barton
64c7cf2036 PyAPI: correct int range checking 2017-08-20 10:34:21 +10:00
Ray Molenkamp
07ca9860e2 [windows/make.bat] add option to automatically download libs.
The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2782
2017-08-19 12:00:45 -06:00
Brecht Van Lommel
c22b52cd36 Fix T52452: OSL trace broken after shadow catcher recent changes.
We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.
2017-08-19 18:14:16 +02:00
Brecht Van Lommel
4218b9367e Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
2017-08-19 18:14:16 +02:00
Brecht Van Lommel
cfa8b762e2 Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
2017-08-19 18:14:16 +02:00
Campbell Barton
4e4e872478 PyAPI: Add gpu.matrix API 2017-08-20 00:01:19 +10:00
Campbell Barton
2332051419 Merge branch 'master' into blender2.8 2017-08-19 21:54:05 +10:00
Campbell Barton
1cc4033df8 PyAPI: expose matrix parsing function 2017-08-19 21:36:50 +10:00
Campbell Barton
4437ccf476 Correct error in gawain wrapper for non-gcc compilers 2017-08-19 20:22:15 +10:00
Jörg Müller
08094e8f23 Audaspace: cmake fixes, lowering to 3.0 minimum required. 2017-08-19 11:46:21 +02:00
Campbell Barton
9a262ed47e Cleanup: remove unneeded include
Complicated using GPU_matrix from PyAPI.
2017-08-19 17:16:24 +10:00
Clément Foucault
5720890cf8 Eevee: Bloom: Add Bloom Color
Moar artistic control yay!
2017-08-19 02:40:02 +02:00
Clément Foucault
63f70ef14d Eevee: Bloom: Add Clamp setting
It's purpose is to limit the amount of light that spread across the screen.

Not entierly sure if it's very usefull, but it sure help to avoid to drown the screen in bloom.
2017-08-19 02:39:16 +02:00
Clément Foucault
2abc21ace5 Eevee: Fix problem with GPU_texture_generate_mipmap
This function was called to recreate the lower mip level of the probe texture. But this is not it's usage and it introduced a stall.

This patch add cubemap mipmap level regeneration in eevee_effects.c
2017-08-19 01:20:09 +02:00
Brecht Van Lommel
4d428d14af Fix T52443: Cycles OpenCL build error after recent mesh lights changes. 2017-08-19 01:02:55 +02:00
Jörg Müller
a702ff4c03 CMake: Boost no longer needed for Audaspace references either 2017-08-18 19:07:39 +02:00
Brecht Van Lommel
d282dc04ef Cycles tests: add light type tests. 2017-08-18 17:09:12 +02:00
Brecht Van Lommel
5cf36c0f05 Cycles tests: make page less wide, use relative URLs for serving through http. 2017-08-18 17:09:08 +02:00
Dalai Felinto
036f43f3cd Eevee: Convert metallic nodes into princinpled nodes
And wipe metallic out of the map.
2017-08-18 17:08:23 +02:00
Dalai Felinto
e8f0ee157b Swap Eevee material output with (Cycles) Material Output
Since we started supporting the (Cycles) Material Output old files
stopped working. There is no reason to keep the original Eevee material
otuput anymore.

It includes doversion for old files.
2017-08-18 17:00:45 +02:00
Dalai Felinto
8ab6e8aad6 Expose Transparency BSDF for Eevee UI 2017-08-18 16:59:13 +02:00
Dalai Felinto
2dad2aa9b7 Uniform Buffer Objects: More complete padding solution
Move floats around when needed to accomodate vec3 arrays efficiently.

With this we use slightly less memory when possible. Basically vec3s are not
treated as vec4 unless we have no float to use for padding).

Reviewers: fclem, sergey

Differential Revision: https://developer.blender.org/D2800
2017-08-18 16:42:58 +02:00
Clément Foucault
659be38760 Eevee: Rework GTAO
This includes big improvement:
- The horizon search is decoupled from the BSDF evaluation. This means using multiple BSDF nodes have a much lower impact when enbaling AO.
- The horizon search is optimized by splitting the search into 4 corners searching similar directions to help which GPU cache coherence.
- The AO options are now uniforms and do not trigger shader recompilation (aka. freeze UI).
- Include a quality slider similar to the SSR one.
- Add a switch for disabling bounce light approximation.
- Fix problem with Bent Normals when occlusion get very dark.
- Add a denoise option to that takes the neighbors pixel values via glsl derivatives. This reduces noise but exhibit 2x2 blocky artifacts.

The downside : Separating the horizon search uses more memory (~3MB for each samples on HD viewport). We could lower the bit depth to 4bit per horizon but it produce noticeable banding (might be fixed with some dithering).
2017-08-18 15:09:43 +02:00
Clément Foucault
25789f24f2 Eevee: Add some utils functions 2017-08-18 15:07:17 +02:00
Clément Foucault
2018df9939 Eevee: MinmaxZ: Avoid unecessary conversions. 2017-08-18 15:07:17 +02:00
Clément Foucault
91ab64f38f GPU_texture : Add RG8 format. 2017-08-18 15:07:17 +02:00
Clément Foucault
95b1b7756d Eevee: Fix some problem with Glass & Diffuse BSDF with SSR
Diffuse was not outputing the right normal. (this is not a problem with SSR actually)

Glass did not have proper ssr_id and was receiving environment lighting twice.
Also it did not have proper fresnel on lamps.
2017-08-18 15:07:17 +02:00
Dalai Felinto
f4bd416b34 Fix ubo vec3 alignment issue
This fixes the Principled shader in Eevee, among other nodes.

Basically before we were treating all the vec3 as vec4 as far as memory
goes. We now only do it when required (aka, when the vec3 is not
followed by a float).

We can be even smarter about that and move the floats around to provide
padding for the vec3s. However this is for a separate patch.

That said, there seems to be some strong consensus in corners of the
internet against using vec3 at all [1]. Basically even if we get all the
padding correct, we may still suffer from poor driver implementations in
some consumer graphic cards.

It's not hard to move to vec4, but I think we can avoid doing it as much
as possible. By the time 2.8 is out hopefully most drivers will be
implementing things correctly.

[1] - https://stackoverflow.com/questions/38172696
2017-08-18 12:21:02 +02:00
Campbell Barton
6fe38bf1cc PyAPI: Gawain checks for range
Raise error on vert-buffer data overflow.
Also exception on attempting to fill data thats already on the GPU.
2017-08-18 18:58:52 +10:00
Campbell Barton
4e468ceb71 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 18:29:27 +10:00
Campbell Barton
aae0737f57 CMake: Boost no longer needed for Audaspace 2017-08-18 18:17:29 +10:00
Campbell Barton
0c57d85941 Fix building w/o Audaspace 2017-08-18 18:16:13 +10:00
Jörg Müller
986267300b Audaspace: Moving audaspace 1.3 into extern.
Deleting the old internal audaspace.

Major changes from there are:
- The whole library was refactored to use C++11.
- Many stability and performance improvements.
- Major Python API refactor:
 - Most requested: Play self generated sounds using numpy arrays.
 - For games: Sound list, random sounds and dynamic music.
 - Writing sounds to files.
 - Sequencing API.
 - Opening sound devices, eg. Jack.
- Ability to choose different OpenAL devices in the user settings.
2017-08-18 08:24:12 +02:00
Campbell Barton
d0dad02604 Cleanup: use lowercase prefix for local API's
Also some minor corrections.
2017-08-18 08:58:26 +10:00
Campbell Barton
cb67873ac5 PyAPI: Iniital gawain API for Python
Wraps vertex-format, vertex-buffer and batch's (enough for drawing).

Doesn't yet expose index-buffers or shaders.
2017-08-18 08:45:41 +10:00
Campbell Barton
73df38a879 RNA: don't register manipulator properties by name
Matching behavior for operators.
2017-08-18 07:50:31 +10:00
Campbell Barton
ac28a4fba7 Fix leak in Python BGE filter & image types 2017-08-18 00:55:16 +10:00