Commit Graph

57453 Commits

Author SHA1 Message Date
Lukas Tönne
ba8b8ec998 Implemented internal hair pressure to prevent hair from collapsing in
on itself.

This uses the same voxel structure as the hair smoothing algorithm.
A slightly different method was suggested in the original paper
(Volumetric Methods for Simulation and Rendering of Hair), but this is
based on directing hair based on a target density, which is another
way of implementing global goals. Our own approach is to define a
pressure threshold above which the hair is repelled in the density
gradient direction to simulate internal pressure from collisions.
2015-01-20 09:29:21 +01:00
Lukas Tönne
345c7b144d Fixed hair velocity smoothing.
This is an important hair interaction feature that simulates friction
between hairs in an efficient way. The method is based on the paper
"Volumetric Methods for Simulation and Rendering of Hair"
( http://graphics.pixar.com/library/Hair/paper.pdf )

It was partially implemented already, but didn't work in this simplified
version. The same voxel structure can be used for implemeting repelling
forces on hair based on density, which can help a hair system maintain
volume instead of collapsing in on itself.
2015-01-20 09:29:21 +01:00
Lukas Tönne
b331a82910 Support for various data properties of the hair grid in the voxel
texture.
2015-01-20 09:29:21 +01:00
Lukas Tönne
efc0cd1658 Fixed voxel grid initialization from hair points and colliders by using
the suggested tent function from the original paper.

Plain float->int conversion for the grid location otherwise leads to
skewed data and unnecessary loss of information.
2015-01-20 09:29:21 +01:00
Lukas Tönne
5f41b19463 New voxel texture mode "Hair", for displaying the internal hair volume
structure as a texture.

This is mostly a debugging feature that may be removed again later.
2015-01-20 09:29:21 +01:00
Lukas Tönne
4cd6111159 Code cleanup: Use a variable-sized array for the hair volume velocity
smoothing and collision code, split into multiple functions.
2015-01-20 09:29:21 +01:00
Campbell Barton
9e5c3a1fa9 Fix for Trusted option, loading new file
Would use the setting of the previously loaded file, now re-initialize from preferences.
2015-01-20 16:38:31 +11:00
Campbell Barton
1d56f456f7 Fix glitch in view-axis (order of drawing) 2015-01-20 16:37:07 +11:00
Campbell Barton
289960787e Fix UI glitches drawing text at different sizes
Font height was ignoring DPI in some cases (camera-name & eyedropper).
2015-01-20 15:50:20 +11:00
Campbell Barton
09eec627ed UI: cleanup UI_fontstyle_string_width, UI_draw_string
Both were maked as temp, but used often.

Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
2015-01-20 15:50:20 +11:00
Campbell Barton
f8c52402d6 BLF: remove paranoid checks for unset default font 2015-01-20 15:50:20 +11:00
Sergey Sharybin
a1f4821b94 Fix T42212: Singular reflection pass is incorrect in regular path tracer
Issue seems to be caused by not totally proper pdf and eval values for this
closure. Changed it so they reflect to ggx/beckmann reflection with roughness
set to 0, which is effectively the same as the sharp reflection.
2015-01-20 03:03:45 +05:00
Bastien Montagne
4a4297ba02 I18n tools minor update. 2015-01-19 20:49:36 +01:00
Jeroen Bakker
35d3b6316b D627: Memory usage optimization for the compositor.
The compostor used a fixed size of 4 floats to hold pixel data. this
patch will select size of a pixel based on its type.
It uses 1 float for Value, 3 float for vector and 4 floats for color
data types.

When benchmarking on shots (opening shot of caminandes) we get a
reduction of memory of 30% and a tiny speedup as less data
transformations needs to take place (but these are negligable.

More information of the patch can be found on
https://developer.blender.org/D627 and
http://wiki.blender.org/index.php/Dev:Ref/Proposals/Compositor2014_p1.1_TD

Developers: jbakker & mdewanchand
Thanks for Sergey for his indept review.
2015-01-19 18:17:50 +01:00
Bastien Montagne
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
Bastien Montagne
50cbff1851 Fix a crasher in recent own mesh remap code ('island' area... :/ ). 2015-01-19 15:51:21 +01:00
Bastien Montagne
0af11a1742 Make use/computation of lnors consistant.
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.

Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).

Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
2015-01-19 15:51:20 +01:00
Sergey Sharybin
694806a9cf Cycles: Correction to camera in volume detection after clipping commit
The check should also become aware of the fact were using clipping plane
instead of clipping sphere now.
2015-01-19 19:28:28 +05:00
Sergey Sharybin
7fd4c440ec Fix T43311: using displacement shader crashes blender
Issue was caused by wrong order of scene device update, which could
lead to missing object flags in shader kernel.

This patch solves a bit more than that making sure objects flags are
always properly updated, so adding/removing volume BSDF will properly
reflect on viewport where camera might become being in volume and so.
2015-01-19 19:23:21 +05:00
Campbell Barton
18ae259cc4 Cleanup: unused Global flags. 2015-01-20 01:07:12 +11:00
Campbell Barton
45dfb3b742 Fix for security issue loading blend's
Auto-Execute option could be overridden by opening a startup.blend
2015-01-20 00:58:32 +11:00
Sybren A. Stüvel
4c74fb24a2 Fix: ActionGroups.new() UI description copy-paste error 2015-01-19 12:58:48 +01:00
Sergey Sharybin
2f4aef9f3b Cycles: Avoid crash in statistics when canceling BVH build
Also add missing render_time initialization in progress.
2015-01-19 13:39:35 +05:00
Joshua Leung
32ffc63d20 Bugfix T43293: Crash when editing shared GPencil datablock in VSE
The problem here was that when a Grease Pencil datablock is shared between
the 3D view and another one of the editors, all the strokes were getting handled
by the editing operators, even if those strokes could not be displayed/used
in that context. As a result, the coordinate conversion methods would fail,
as some of the needed data would not be set.

The fix here involves not including any offending strokes in such cases...
2015-01-19 19:11:18 +13:00
Joshua Leung
0a128af21d GPencil: Added asserts for checking when trying to convert coordinates for invalid stroke types (for current editor)
Added for checking on the cause of T43293, and to aid in setting up a fix to
remedy the situation.
2015-01-19 19:11:17 +13:00
Campbell Barton
09c83d6fea Viewport: Add adjustable safe areas, 3d-view & VSE
Also adds safe-area presets.

D325 by Diego Gangl with own edits.
2015-01-19 16:47:57 +11:00
Campbell Barton
9f54a73b32 WM: add a notifier for camera/viewport options
Added so viewport options only used in a camera view wont cause all 3d-views to redraw.
2015-01-19 15:42:18 +11:00
Campbell Barton
e91148e463 RNA/API: name outliner sort option like UIList 2015-01-19 14:22:02 +11:00
Campbell Barton
704494e8cd Fix own error in freestyle api 2015-01-19 11:31:23 +11:00
julianeisel
ffe56536f1 Outliner: Make alphabetical sorting optional
A new option to the Outliner's View menu is added to enable/disable sorting of items.
2015-01-19 01:01:23 +01:00
Bastien Montagne
90b5697459 Fix mathutils.barycentric_transform()
Dummy typo, we need a 3D vector here...
2015-01-18 18:41:47 +01:00
Sybren A. Stüvel
ecc58da8f1 Documentation: fixed documented types to match actual types
The BGE API uses Vectors, but often this was documented as list.

Maniphest Tasks: T43240

Differential Revision: https://developer.blender.org/D1006
2015-01-18 11:08:33 +01:00
Bastien Montagne
6e97db7b30 Fix T43301: Three of the 'mirror keyframes' tools were mirroring along wrong axis.
Names are rather confusing here... :/
2015-01-17 23:09:41 +01:00
Bastien Montagne
119ff676e1 Fix T43283: Crash on undo/redo/ and save/reload after (new) weight transfer.
Mesh stores its dvert in a specific pointer too, in addition of regular CD layer...
That whole vgroup handling is really breaking apart the 'universality' of CD system. :(

Also added some DAG and WM updates in operators...
2015-01-17 17:42:45 +01:00
Tamito Kajiyama
c9e5d9226b Fix T43090: Cycles + Freestyle + border render = black render.
The reported problem was due to a special case where there are no strokes
to be rendered.  Since rendering an empty scene is a waste of time, the issue
was addressed here by skipping the stroke rendering process entirely.
2015-01-18 00:39:03 +09:00
Kévin Dietrich
448d143ad0 Fix T43273: vector math cross product inconsistent
GLSL missed the normalization step.

Reviewers: psy-fi, sergey, mont29

Reviewed By: mont29, sergey

Subscribers: mont29

Maniphest Tasks: T43273

Differential Revision: https://developer.blender.org/D1000
2015-01-17 14:58:48 +01:00
Torsten Rupp
82223270a8 Fix T23942: Add "Delete Hierarchy" to outliner context menu.
Patch by rupp (Torsten Rupp), review and minor style edits by mont29 (Bastien Montagne).
2015-01-17 14:55:18 +01:00
Sergey Sharybin
f65b369f16 Fix compilation error with strict compiler rules 2015-01-17 00:22:46 +05:00
Sergey Sharybin
89e562e19b Cycles: Fix compilation error with latest OSL
They went back from string_view to string for compiler options.

Still having linking errors here, but maybe others will be more lucky to fully
compiler blender with new OSL.
2015-01-17 00:15:47 +05:00
Sergey Sharybin
09ac6cae09 Cycles: Cleanup and optimization comment update 2015-01-17 00:15:47 +05:00
Sergey Sharybin
eff2fe9a72 Cycles: Minot cleanup, save some cpu tics per curve segment export 2015-01-17 00:15:47 +05:00
Bastien Montagne
585275325e Fix T43275: Crash on Render when using 'save buffer' and render layer name contains a '/'
Added a new BLI_path_utils func, `BLI_filename_make_safe()`, which for now simply
replaces unsafe chars for paths (like '\' or '/') by an underscore...
2015-01-16 18:48:59 +01:00
Bastien Montagne
da8f16e288 FCurve RNA API: add funcs to convert to samples/to keyframes.
So far, we had an operator to 'bake' keyframe curves into samples, but no
way to make the fcurve editable again (i.e. to convert it back into a keyframes one).

Needed to fix mocap addon (see T43259).

Also, fixed a glitch in `fcurve_store_samples()`, since given end frame is included in range,
it is valid to give same start and end frame (in case you want a single point in samples,
not much practical cases, but...).
2015-01-16 17:26:28 +01:00
Lukas Tönne
913e2bae19 Show buttons for particle system modifiers render/viewport toggles
in the particle buttons list.

This is much more convenient than having to switch back and forth
between particle and modifier buttons. The modifier box for particles
does not contain anything useful other than these two toggles anyway.
2015-01-16 17:08:07 +01:00
Antony Riakiotakis
5685c43586 Select appropriate folder for MinGW-w64 gcc 4.9 2015-01-16 15:04:02 +02:00
Sergey Sharybin
9bb06c99f3 Cycles: Minor typo fix in debug print 2015-01-16 18:03:58 +05:00
Sergey Sharybin
5d5077957e Cycles; Correction to previous debug print to survive prints from multiple threads
This commit basically makes it so statistics print from different BVH trees are not
being interleaved with each other. Glog ensures this when debug print is done as a
single put to stream operator.
2015-01-16 16:39:02 +05:00
Sergey Sharybin
5684ad8072 Cycles: Report BVH statistics after build 2015-01-16 15:05:53 +05:00
Bastien Montagne
fd58f5ac9d Fix T43271: Sequencer: RNA's 'add_effect' was not updating effect strip len correctly. 2015-01-16 10:41:38 +01:00
Sergey Sharybin
3f60d665bb Cycles: Fix stupid typo in the previous commit 2015-01-16 02:21:35 +05:00