Commit Graph

62306 Commits

Author SHA1 Message Date
Campbell Barton
472599402f Cleanup: ghash/edgehash style
Call functions on own lines (nicer for debugging)
2015-11-29 17:51:12 +11:00
Bastien Montagne
37801588d4 install_deps.sh: always give py version arg to cmake/scons (same as we already do with llvm).
This should avoid 'casual builders' to have issues when we switch py versions.
2015-11-28 19:52:45 +01:00
Bastien Montagne
fb0fa3cb9e Move linux's scons to py3.5 too! 2015-11-28 19:52:45 +01:00
Julian Eisel
57628cb562 UI: More minor UI cleanups for keymap editor
Place non-editor related keymaps together, place animation editor keymaps together, move 'Header' keymap (which had exactly 1 entry) into 'Screen' keymap, move SCREEN_OT_header (for showing/hiding header) into 'Header' keymap.

Again, this shouldn't break any key configs, but key configs that contain SCREEN_OT_header will add an entry for this under 'Screen' again. Just a very minor glitch.
2015-11-28 18:24:21 +01:00
Sergey Sharybin
a3ddaa3d8c Render pipeline: Remove dead code
Remained since some rather recent render speedup commits.
2015-11-28 22:08:49 +05:00
Julian Eisel
3123194e88 UI Cleanup: Mask keymap shouldn't be part of Clip Editor keymap
Also removed unrelated comment (copied & pasted from a few lines above I guess).
Shouldn't break any custom key configs.
2015-11-28 17:46:55 +01:00
Julian Eisel
175110ec87 Cleanup: 'area' vs 'region'
Apparently this is the result of some sloppiness during 2.5 project and since then it confused people who were trying to understand the area-region relation (myself included).

Sorry if this causes merge conflicts for anyone, but at some point we really had to do it :/
2015-11-28 17:22:44 +01:00
Sergey Sharybin
51f996836c C++ RNA: Pass structures by reference
C++ structures might be rather big and passing them by value is not really
optimal. There should be no functional changes apart from better memory
access pattern when synchronizing huge scenes to Cycles.
2015-11-28 21:20:30 +05:00
Sergey Sharybin
2ae7593700 Cycles: Avoid having two consequence getenv() calls 2015-11-28 21:05:12 +05:00
Sergey Sharybin
6147c4037d Cycles: Fix wrong volume stack after SSS bounce
Was introduced by a recent fixes, now it should be all correct and additionally
it solves the TODO mentioned in the code.
2015-11-28 20:07:34 +05:00
Sergey Sharybin
f5d1551b6e Cycles: Fix wrong original ray used for SSS baking
Also de-duplicated some code by moving to an utility function.
2015-11-28 20:07:34 +05:00
Sergey Sharybin
1e43f0d742 Cycles: Set of fixes for delayed SSS ray tracing
There were multiple issues which are solved now:

- It was possible that ray wouldn't be bounced off the BSSRDF, for example
  when PDF or shader eval is zero. In this case PathState might have been
  left in pre-bounced state which would have been gave incorrect shading
  results.

  This is solved by having separate PathState for each of the hits.

- Path radiance summing wasn't happening correct as well, indirect rays
  were using wrong path radiance in the case when there were more than
  one hit recorded.

  This is now using a bit trickier state machine which calculates path
  radiance for just SSS (both direct and indirect) and then sums it back
  to the final radiance.

- Previous commit wasn't totally correct either and was an induced bug
  due to wrong path state left from the "un-happened" ray bounce.

  There should be no special case happening here, BSSRDFs will be replaced
  with diffuse ones due to PATH_RAY_DIFFUSE_ANCESTOR flag.

- Merged back codebases for "delayed" and "immediate" indirect SSS ray
  tracing, hopefully making it easier to maintain the codebase.

Sure this changes brings memory usage back by about 4-5%, but overall
it's still about 2x memory reduction for the experimental kernel here.

Thanks Brecht for the review!
2015-11-28 20:07:34 +05:00
Sergey Sharybin
8919ed3a62 Cycles: Fallback to diffuse BSDF for the indirect SSS rays when BSSRDF is hit
This is actually how it was intended to work, just didn't notice it wasn't
really happening in the main ray loop.

Solves some memory issues reported in T46880.
2015-11-28 20:07:34 +05:00
Sergey Sharybin
299fae1838 Cycles: Fix missing indirect subsurface initialization in the bake code 2015-11-28 20:07:34 +05:00
c76fbf10e2 OpenGL: remove unnecessarily paranoid bound texture preservation. 2015-11-28 15:35:34 +01:00
8e1c63b396 OpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state. 2015-11-28 15:35:34 +01:00
e1b8a5dc6f OpenGL: set OpenGL lights through simple shader API. 2015-11-28 15:35:34 +01:00
b5f9746dae OpenGL: update simple shader API.
Restore fixed function lighting code for now and control use of GLSL shader
with a variable, make light types more clear, reduce state changes, some other
minor tweaks.
2015-11-28 15:35:34 +01:00
263f4cd342 OpenGL: rename GPU_enable_material to better indicate it's binding shaders. 2015-11-28 15:35:34 +01:00
Ulysse Martin
34f51cd498 Fix a regression introduced by https://developer.blender.org/D1396 on video playing
Fix a regression introduced by https://developer.blender.org/D1396 on video playing

Look at @mariomey example file.

Reviewers: panzergame

Subscribers: mariomey

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1623
2015-11-28 14:56:22 +01:00
Antony Riakiotakis
96cff85610 Fix possible hang on buffer allocation failure. Reported by coverity
scan, thanks...errr.
2015-11-28 09:33:48 +01:00
Campbell Barton
c5ac037c8e BMesh: pass loops instead of edges/verts to filter funcs
This allows to check the source face we're walking over.
2015-11-28 13:40:18 +11:00
Campbell Barton
a12fa185f8 BMesh: use typed filter callbacks (const args too) 2015-11-28 13:37:02 +11:00
bafccb00de OpenGL: fix cycles texture draw mode not respecting double sided lighting. 2015-11-27 21:56:08 +01:00
Bastien Montagne
d3612cfca8 Fix T46883: VSE Meta Strip crash on leaving Meta editing (tab).
Own stupid copy/paste error in recent commit.
2015-11-27 21:38:03 +01:00
Bastien Montagne
da6578e647 Fix T46827: Appending Specific Groups Doesn't Work on Windows.
Issue was with datablocks which names would include '/', new filebrowser filelisting code
would cleanup the entire filepath, hence giving invalid filename in this case.

That 'path separator in ID names' bit us already in lib/datatype/datablock separating func,
this is really stupid to allow that in something handled as a filepath imho, but well...

Note: would have break the same under *nix with '\' char.
2015-11-27 21:18:06 +01:00
Bastien Montagne
bab8deef17 Fix (unreported) broken BLI_join_dirfile() in some cases on Windows.
That function was epic failing in case trying to join '//' and 'foo.blend', would
give '//\foo.blend'... Now check for both SEP and ALTSEP!
2015-11-27 21:18:06 +01:00
Gaia Clary
85362dfe80 fix T46868: added workaround for a collada issue with UTF8 filenames 2015-11-27 14:56:52 +01:00
Sergey Sharybin
20fc9c00fd Cycles: Fully roll-back to non-delayed SSS indirect rays for CPU
There are some issues to be solved with the recent optimization we did for
the indirect rays for the SSS. Those issues will take a bit of a time to
be fully solved still and we need to unlock Caminandes team now, so let's
revert some changes back.

CUDA will still use delayed indirect rays since it's an experimental
feature.

For the details about what's to be done still please refer to T46880.
2015-11-27 17:15:02 +05:00
Sergey Sharybin
175f00c89a Revert "Cycles: Fix wrong SSS with regular path tracing and clamping enabled"
This wasn't really a complete fix and only worked if there was a single scatter
event recorded only. Proper fix requires some more thoughts to make it correct
without memory use increase.

This reverts commit bf9e88bfbebaf5c6228363560970fa526e779c8b.
2015-11-27 17:15:02 +05:00
Campbell Barton
a28e014313 BMesh: Add API call BM_face_calc_point_in_face
Was local to knife code, but this is generally useful.
2015-11-27 22:08:16 +11:00
Sergey Sharybin
bfaebeaee6 Fix T46799: Blender crashes when enumerating POCL devices
The issue was caused by a conflict between std::error_code linked into
Blender which is compiled without C++11 support and POCL's expectations
of std::error_code which was actually linked against C++11's STL.
2015-11-27 14:48:26 +05:00
Campbell Barton
5680ac911b missed last commit 2015-11-27 18:00:02 +11:00
Campbell Barton
2fa1f60d8e CMake/SCons: set Python to 3.5 2015-11-27 17:26:08 +11:00
Sergey Sharybin
254282c6cb Fix crash when ding dyntopo sculpting
This is a regression introduced by 77ac33d and was caused by use-after-free
mistake.
2015-11-27 00:18:35 +05:00
Porteries Tristan
b3808a4e06 BGE: Fix ray cast with unfound property.
To return a valid ray cast result the object must not be NULL and KX_RayCast::RayTest must return true.
2015-11-26 19:54:27 +01:00
Bastien Montagne
d00a3316e7 Fix assert in UI align code in some specific situations.
Situations like [top_button over [label, button]] need some subtle handling, since
we only store one neighbor per side of a button...
2015-11-26 14:28:47 +01:00
Bastien Montagne
b061b5ae7a Fix (unreported) libquery's IDLooper for constraints not handling correctly referenced ID pointers... 2015-11-26 12:16:50 +01:00
Sergey Sharybin
bf9e88bfbe Cycles: Fix wrong SSS with regular path tracing and clamping enabled
Radiance sum and reset was happening in different order after 26f1c51.

This is a quick fix to unlock Caminandes team, perhaps we can avoid having
separate variable to detect when radiance is to be sum.
2015-11-26 16:11:41 +05:00
Stefan Werner
c8a041f489 Fix T46760: Branched Path Tracing converges to different result than plain Path Tracing
Multiple importance sampling for branched path tracing light samples needs to be
calculated separately per BSDF, not with Veach's one sample model.
2015-11-26 14:59:58 +05:00
Campbell Barton
35cf545e3a Fix recent c99 cleanup w/ openmp 2015-11-26 18:04:56 +11:00
Campbell Barton
e060c90ebc Fix assert navigating into dir w/ .blend suffix 2015-11-26 15:39:29 +11:00
Campbell Barton
6483575b35 Fix error with intersect handling split-wire edges 2015-11-26 13:16:45 +11:00
Campbell Barton
cd8a84c869 Cleanup: warnings 2015-11-26 12:38:31 +11:00
Campbell Barton
d7708d135e Partial revert of last commit
Keep index using the outer scope for GHASH iter macros,
while its often nice, in some cases to declare in the for loop,
it means you cant use as a counter after the loop exits, and in some cases signed/unsigned may matter.

API changes should really be split off in their own commits too.
2015-11-26 12:38:31 +11:00
Mike Erwin
77ac33db7b cleanup: C99 and vertex array comments
GPU_buffer no longer has a fallback to client vertex arrays, so remove
comments about it.

Changed a few internal structs/function interfaces to use bool where
appropriate.

Use for-loop scope and flexible declaration placement. PBVH does the
same thing but needs ~150 fewer lines to do it!

The change to BLI_ghashIterator_init is admittedly hackish but makes
GHASH_ITER_INDEX nicer to use.
2015-11-25 19:49:54 -05:00
Mike Erwin
7bbcb643f2 OpenGL: remove unused VBO_DISABLED from PBVH
Was almost certainly being compiled out anyway, but now we don’t have
to read it!
2015-11-25 19:49:54 -05:00
Campbell Barton
88556d801f Fix T46870: bge globalDict kept between sessions 2015-11-26 11:08:35 +11:00
Campbell Barton
d0b453577a Cleanup: whitespace 2015-11-26 11:08:25 +11:00
Campbell Barton
2d52f65c60 Cleanup: use const for linklist API 2015-11-26 08:50:35 +11:00