Commit Graph

57140 Commits

Author SHA1 Message Date
Antony Riakiotakis
e0cf86a9e2 Fix T43010 regression in material setting.
Caused by own fix for another display case.

Shoud be safe for 2.73 final.
2014-12-26 20:06:56 +01:00
julianeisel
fd47202043 GPencil: Picky whitespace cleanup 2014-12-26 20:00:52 +01:00
Antony Riakiotakis
3253ed9e26 Put editor initialization before python.
Initially it was moved to allow setting keymaps of python defined menus
in C but looks like it breaks macro definition in python.

Thanks to Julian for tracking this down. It should fix T42485
2014-12-26 19:14:01 +01:00
julianeisel
6339ba1ee2 Fix T42977: Weights failed to display in Wireframe mode when using Face Select
D948, reviewed by @mont29 (thanks for that)
2014-12-26 16:53:40 +01:00
julianeisel
da78d2d742 GPencil: Use a different brush cursor for eraser
D783 with minor edits to increase contrast
2014-12-26 16:38:51 +01:00
Bastien Montagne
cf178f71ac Fix T42641, Graphical fragments showing on Blender 2.71 and higher when baking.
Safe for 2.73...

This revert rB9b0ab890676790bb1e8e77797629b889ea66f69e - needed to set that threshold to a small
negative value to remove the last artefacts reported in T39735, but now I could not reproduce
any with the previous 0.0f value, so restoring it for the time being.

If this 'shadowed neighbor face' case re-appears, we can always choose a value in-between, like -1e-18f...
2014-12-26 13:00:36 +01:00
Campbell Barton
2b595579e3 Fix T43013: Flip with bridge aligned loops 2014-12-26 20:22:21 +11:00
Sergey Sharybin
836ea4b70f Fix T43019: Child of objectes used by duplis are visible in Cycles
Seems the parent check didn't go deep enough and only checked single parent.
Now it checks the chain of parents which seems to be correct but requires
much more intense testing.
2014-12-26 13:36:45 +05:00
Campbell Barton
53ec177b7f optimize interp_weights_poly_v2, v3
use line_point_factor instead of length between vertices.
2014-12-26 08:46:48 +11:00
Campbell Barton
f84defa9c0 optimize interp_weights_poly_v2, v3
halve sqrtf calls per per polygon corner.
2014-12-26 08:46:48 +11:00
Campbell Barton
445e50fd1e cleanup: use cross_tri_v2 when area isn't needed. 2014-12-26 08:46:48 +11:00
Sergey Sharybin
cd095aae13 Cycles: Distance optimization for QBVH
This commit implements heuristic which allows to skip nodes pushed to the stack
from intersection if distance to them is larger than the distance to the current
intersection.

This should solve speed regression which i didn't notice in the original QBVH
commit (which could have because i had WIP version of this patch applied in my
local branch).

From quick tests speed seems to be much closer to what is was with regular BVH.

There's still some possible code cleanup, but they'll need a bit of assembly
code check and now i want to make it so artists can happily use Cycles over the
holidays.
2014-12-25 22:40:02 +05:00
Sergey Sharybin
30e3aa1561 SCons: Don't regenerate icons if not changes
This is rather a handbook example how NOT to do things in SCons, ideally
it should be official SCons target so all the dependencies and source file
modification stops being our worry. Especially since for CMake we already
do have an app to do generate all the data.

I don't have time to clean this up now but this constant icons regeneration
just pisses me off atm.
2014-12-25 19:17:30 +05:00
Jens Verwiebe
c1f54bcdcc OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions.
Dunno exactly why this was done earlier, but propose not to remove code not understood.
2014-12-25 15:12:56 +01:00
Bastien Montagne
3e034831de Refactor 'immediate search' feature
Currently, code just checks whether a text-edited button uses a given icon (VIEWZOOM) to decide to apply changes on each typed char.

This patch adds a propper button flag (UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA flag (PROP_TEXTEDIT_UPDATE) for that.
It's also now usable not only for text buttons, but also for example for num buttons when in 'text edit' mode, etc.

It also fixes an actual bug, which is for text properties, in 'immediate' mode, hitting escape would not restore org value, because `ui_apply_but_TEX()` would set its orgstr to NULL on first call (giving it to `but->rename_orig` instead of copying it).

Note no change in behavior is expected from user POV.
Update for addons using that 'VIEWZOOM' icon 'feature' will follow (if any).

Reviewers: campbellbarton

Reviewed By: campbellbarton

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D938
2014-12-25 12:55:29 +01:00
Thomas Dinges
5f3dc592c8 Revert QBVH switch, after discussion with Sergey. 2014-12-25 12:18:51 +01:00
Sergey Sharybin
7bb29c5528 Fix T42938: image.save_render sometimes saved the wrong pass
Stupid mistake with non0initialized image user.

Safe for final 2.73 release branch.
2014-12-25 15:45:22 +05:00
Sergey Sharybin
9e57babd8d Cycles: Fix really bad bug with shadow rays on non-SSE CPUs
basically shadow rays were totally broken and most of the time did not record
any intersections, leading to really ad rendering artifacts.

This commit makes it so regardless of enabled optimization level render result
would be the same.
2014-12-25 14:30:05 +05:00
Sergey Sharybin
fe06ec82a9 Cycles: Workaround CUDA 6.5.16 error after watertight commit
This issue doesn't happen with 6.5.12 and there's slight piece of hope it'll be
fixed in next toolkit releases..

For now we're forcing CUDA to not inline ray precalculation. This could lead to
some speed regression, but wouldn't expect it to be huge -- this code does not
run that often comparing to actual triangle intersection.
2014-12-25 14:15:37 +05:00
Sergey Sharybin
010f3ee438 Cycles: Fix compilation error on non-SSE2 architectures 2014-12-25 14:11:37 +05:00
Thomas Dinges
ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
Thomas Dinges
4ab821c675 Cleanup: Typo fixes for comments. 2014-12-25 02:42:06 +01:00
Thomas Dinges
6e7c2d2e43 Cycles: Expose QBVH on/off switch to the UI.
We might remove this again in the future, but for testing purposes
during the release cycle, this will be useful.

The setting defaults to QBVH, and can be found in the Performance panel.
2014-12-25 02:19:14 +01:00
Sergey Sharybin
deb06c457d Cycles: Correction for node tail copy on packing BVH
This is harmless for now because tail of the node is zero in there, but better
to fix it early so in the case of extending BVH nodes this code doesn't give
issues.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
0feba652f7 Cycles: Enable QBVH optimization structure for SSE2 CPUs
This commit enables QBVH optimization structure automatically if rendering
with CPU and SSE2 support is detected.

This brings render time of agent shot back to the speed it used to be before
the watertight intersections commit, single koro and sponza scenes are about
7% faster here.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
03f28553ff Cycles: Implement QBVH tree traversal
This commit implements traversal for QBVH tree, which is based on the old loop
code for traversal itself and Embree for node intersection.

This commit also does some changes to the loop inspired by Embree:

- Visibility flags are only checked for primitives.

  Doing visibility check for every node cost quite reasonable amount of time
  and in most cases those checks are true-positive.

  Other idea here would be to do visibility checks for leaf nodes only, but
  this would need to be investigated further.

- For minimum hair width we extend all the nodes' bounding boxes.

  Again doing curve visibility check is quite costly for each of the nodes and
  those checks returns truth for most of the hierarchy anyway.

There are number of possible optimization still, but current state is good
enough in terms it makes rendering faster a little bit after recent watertight
commit.

Currently QBVH is only implemented for CPU with SSE2 support at least. All
other devices would need to be supported later (if that'd make sense from
performance point of view).

The code is enabled for compilation in kernel. but blender wouldn't use it
still.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
788fb8321a Cycles: Store proper empty boundbox for missing child nodes in QBVH
The idea is to make sure those childs would never be intersected with a ray
in order to make it so kernel never worries about number of child nodes.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
30b12b1b27 Cycles: Code cleanup, de-duplicate definition of FEATURE
Previously every BVH traversal file was defining macro to check which features
should be compiled in, now this macro is defined in the parent header.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
0476e2c87a Cycles: Rework BVH functions calls a little bit
Basic idea is to allow multiple implementation per feature-set, meaning this
commit tries to make it easier to hook new algorithms for BVH traversal.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
ab8d9c4b88 Cycles: Add some utility functions and structures
Most of them are not currently used but are essential for the further work.

- CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i

- Added templatedversions of min4, max4 which are handy to use with register
  variables.

- Added util_swap function which gets arguments by pointers.
  So hopefully it'll be a portable version of std::swap.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
f770bc4757 Cycles: Implement watertight ray/triangle intersection
Using this paper: Sven Woop, Watertight Ray/Triangle Intersection

  http://jcgt.org/published/0002/01/05/paper.pdf

This change is expected to address quite reasonable amount of reports from the
bug tracker, plus it might help reducing the noise in some scenes.

Unfortunately, it's currently about 7% slower than the previous solution with
pre-computed triangle plane equations, but maybe with some smart tweaks to the
code (tests reshuffle, using SIMD in a nice way or so) we can avoid the speed
regression.

But perhaps smartest thing to do here would be to change single triangle / ray
intersection with multiple triangles / ray intersections. That's how Embree does
this and it's watertight single ray intersection is not any faster that this.

Currently only triangle intersection is modified accordingly to the paper, in
the future we would also want to modify the node / ray intersection.

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D819
2014-12-25 02:50:49 +05:00
Sergey Sharybin
57d235d9f4 Cycles: Optimize storage of QBVH node by one float4
The idea is to store visibility flags for leaf nodes only since visibility check
for inner nodes costs too much for QBVH hence it is not optimal to perform.

Leaf QBVH nodes have plenty of space to store all sort of flags, so we can make
nodes one element smaller, saving noticeable amount of memory.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
a888b8beaf Cycles; Code cleanup, make it more obvious what #endif belongs to 2014-12-25 02:50:49 +05:00
Sergey Sharybin
144096faad Cycles: Make it more clear offsets in BVH construction
Previously offsets were calculated based on the BVH node size,
which is wrong and real PITA in cases when some extra data is
to be added into (or removed from) the node.

Now use offsets which are not calculated form the node size.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
f27d87d300 Cycles: Replace magic constant in the code with actual node size 2014-12-25 02:50:49 +05:00
Sergey Sharybin
f4a959f734 Cycles: Avoid over-allocation in packing BVH instances
This solves quite an over-allocation in BVH instances packing code,
unfortunately, it's not a magic bullet to solve memory bump caused
by the recent QBVH changes.

For that we'll likely need to decouple storage for leaf and inner
nodes. However, it's not really clear for now if it's something
important since that'd still be just a fraction of memory comparing
to all the hi-res textures.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
8cfac731a5 Cycles: Implement refit_nodes for QBVH
Title says it all, quite straightforward implementation.

Would only mention that there's a bit of code duplication around packing node
into pack.nodes. Trying to de-duplicate it ends up in quite hairy code (like
functions with loads of arguments some of which could be NULL in certain
circumstances etc..). Leaving solving this duplication for later.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
fe4905288d Cycles: Use proper node counter to allocate QBVH nodes
Before all the nodes were counted and allocated, leading to situations when
bunch of allocated memory is not used because reasonable amount of nodes are
simply ignored.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
345ed4dd10 Cycles: Don't do node visibility check in subsurface and volume traversal
Visibility flags are set to all visibility anyway, So there was no reason
to perform that test.

TODO: We need to investigate if having primitive intersection functions
which doesn't do visibility check gives any speedup here as well.
2014-12-25 02:50:49 +05:00
Sergey Sharybin
f4df3ec05a Cycles: Move triangle intersection functions into own file
This way extending intersection routines with some pre-calculation step wouldn't
explode the single file size, hopefully keeping them all in a nice maintainable
state.
2014-12-25 02:50:48 +05:00
Thomas Dinges
43421e9c53 Cycles: Optimize vector math node without links to single values. 2014-12-24 22:45:08 +01:00
julianeisel
76b4fad6db Fix T42879: File Browser - disable selecting ".." entry (Parent Directory) 2014-12-24 19:51:42 +01:00
julianeisel
703bb0f62d Ref T42873: Print "Camera Pano" for panoramic camera view onto viewport 2014-12-24 19:35:12 +01:00
Sergey Sharybin
9d230298f1 Master branch is now alpha cycle of 2.74 release 2014-12-24 20:33:14 +05:00
Sergey Sharybin
607c45ae6b Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
2014-12-24 18:54:38 +05:00
Campbell Barton
0fcf9b2672 Fix rna paint update callbacks assuming meshes 2014-12-24 14:51:35 +11:00
Sergey Sharybin
273fa0a4ef Blender 2.73 release candidate commit
This commit contains:

- Subversion bump to 2.73
- Release cycle is set to "rc"
- Submodules are pointed to appropriate tag now
  (addons contrib just points to the latest contrib repo)
- New shiny splash screen!
2014-12-23 20:42:01 +05:00
Bastien Montagne
e483a21ce6 Fix T42994: Own recent regression in fix for T42945 (rB5cc199e49581),
side/front/top ortho views would no more adapt their snapping unit to zoom factor.

This code would need slightly more refactor actually, but this will be for after release!
2014-12-23 16:12:17 +01:00
Campbell Barton
20aed660f5 Add missing keymap for paint curve 2014-12-23 20:01:47 +11:00
Sergey Sharybin
35f153cdc3 Fix T42928: Drag-drop of generated files to compo reloads them, loosing edits
Origins of this issue goes back to T33402, where compo wasn't sure what kind
of image it is working with (compo should know if it's multilayer or regular
image).

Now we only reload images when dar-dropping from outside of blender.
2014-12-23 10:56:30 +05:00