Commit Graph

49267 Commits

Author SHA1 Message Date
Brecht Van Lommel
b9ce231060 Cycles: relicense GNU GPL source code to Apache version 2.0.
More information in this post:
http://code.blender.org/

Thanks to all contributes for giving their permission!
2013-08-18 14:16:15 +00:00
Brecht Van Lommel
d43682d51b Cycles: Subsurface Scattering
New features:

* Bump mapping now works with SSS
* Texture Blur factor for SSS, see the documentation for details:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Subsurface_Scattering

Work in progress for feedback:

Initial implementation of the "BSSRDF Importance Sampling" paper, which uses
a different importance sampling method. It gives better quality results in
many ways, with the availability of both Cubic and Gaussian falloff functions,
but also tends to be more noisy when using the progressive integrator and does
not give great results with some geometry. It works quite well for the
non-progressive integrator and is often less noisy there.

This code may still change a lot, so unless you're testing it may be best to
stick to the Compatible falloff function.

Skin test render and file that takes advantage of the gaussian falloff:
http://www.pasteall.org/pic/show.php?id=57661
http://www.pasteall.org/pic/show.php?id=57662
http://www.pasteall.org/blend/23501
2013-08-18 14:15:57 +00:00
Brecht Van Lommel
a2541508ac Fix a few compiler warnings reported by clang. 2013-08-18 14:15:51 +00:00
Stuart Broadfoot
2fd11a6617 Updates for the Cycle Hair UI. With the following changes
- Removed the cycles subdivision and interpolation of hairkeys.
- Removed the parent settings.
- Removed all of the advanced settings and presets.
- This simplifies the UI to a few settings for the primitive type and a shape mode.
2013-08-18 13:41:53 +00:00
Campbell Barton
19d3e230e6 improved BM_face_copy_shared to copy from more possible connected loops and add filter function (not used yet). 2013-08-18 11:44:51 +00:00
Campbell Barton
fa3481cf07 correct own error in recent linked stack edits. 2013-08-18 04:06:49 +00:00
Campbell Barton
754b4ab3bc add hash function BLI_ghash_assign, BLI_edgehash_assign
avoids remove,insert and only hashes the key once.
2013-08-18 03:41:39 +00:00
Thomas Dinges
7cce556344 Code cleanup:
* Forgot to remove RNA/DNA in r59043. No need to keep this here, we never used it in Trunk.
2013-08-18 02:35:39 +00:00
Campbell Barton
ee2d95f850 minor api cleanup for ghash/edgehash
- use single inlined lookup function.
- move comments into source.
- pack iterator vars more efficiently.
2013-08-18 01:00:52 +00:00
Campbell Barton
fbb446dff6 add assert for hashes if an existing element is ever inserted into a ghash/edgehash.
the outliner does this intentionally, so add a flag to allow this situation optionally.
2013-08-18 00:36:04 +00:00
Campbell Barton
763bce4d64 bmesh api internal changes
- optimize BM_face_exists_overlap_subset(), dont check faces smaller then the vert array, don't initialize overlap flag unless its needed.
- BM_face_exists_overlap had incorrect check (currently function is unused so no harm done)
2013-08-17 13:32:56 +00:00
Campbell Barton
0b00ba4ee0 remove unused function 2013-08-17 13:08:09 +00:00
Sv. Lockal
95dc1d922b Fix [36486] Outliner doesn't allow to expand Hierarchies of armature if it's present on 2 Scenes
This is done by fixing logic for finding the first unused element in treehash.
The blend file from [36486] also exposes a memleak, but it should be addressed separately.
2013-08-17 11:49:18 +00:00
Campbell Barton
0f07ca6809 remove unused args from edgenet fill (since rewrite, but they weren't used before either) 2013-08-17 09:25:12 +00:00
Campbell Barton
5fafc222f0 style cleanup 2013-08-17 08:21:40 +00:00
Campbell Barton
85b0315b3b avoid double ghash lookups 2013-08-17 08:00:22 +00:00
Campbell Barton
1b11428101 fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array. 2013-08-17 07:09:07 +00:00
Campbell Barton
d7cc2be2b7 add linklist stack macros, use where over allocating an array was previously done. 2013-08-17 05:33:55 +00:00
Campbell Barton
2633488877 use 'with' keyword for script stub (recommended with py3). 2013-08-17 05:27:58 +00:00
Campbell Barton
9d4bf6b37b change CHECK_TYPE_INLINE macro not to add the pointer in the macro. 2013-08-17 04:48:34 +00:00
Mitchell Stokes
82c845425f BGE: Adding partial support for LibLoaded lights with GLSL materials.
Any GLSL materials loaded after lights are LibLoaded will now use the lights in
heir shaders. This includes materials loaded from the same scene as the LibLoaded
lights. We could later add a new flag to LibLoad to recompile all existing shaders,
but this commit should offer a lot more flexibility as is.
2013-08-17 04:37:25 +00:00
Mitchell Stokes
51bca0d7dc BGE: Flipping vsync constants so VSYNC_ON is 0.
This will make transitions from older versions of Blender easier since VSYNC_ON
will be the default. This could have been changed in a do_version, but the vsync
code has yet to see an official release, so I figured this would be a bit nicer.
Also, this makes VSYNC_ON the default for new scenes as well.
2013-08-17 02:06:45 +00:00
Campbell Barton
ef8ea14f45 rewrite edgenet fill bmesh operator.
previous code created faces with mixed face-flipping and could get very slow,
test with ~60,000 edges here hung my system for over 2min (didnt wait for it to finish), new code executes in about 1 second.

new code doesn't attempt to flip faces correctly, its quite involved to do so, especially when the new faces are not created adjacent to eachother.
so simpler to calculate normals afterwards.
2013-08-16 14:18:54 +00:00
Sergey Sharybin
36c530dec9 Remove ifdef-ed code, it's still in SVn anyway. 2013-08-16 13:58:39 +00:00
Sergey Sharybin
a59777c33f Tweaks to MapUV and PlaneTrack nodes to make results less doggy
This disables crazy adaptive sampling happening in diagonal direction.

This still gives some doggyness, but it's much less dramatic now,
and behavior is pretty damn the same as EWA filtering when rendering
textures with Blender Internal.
2013-08-16 13:58:34 +00:00
Lukas Toenne
8d1c0b6f0f Fix for #36468, "Buffer Groups" option changes compositing output.
Problem is that the read/write buffer operations only work with actual
image inputs. If a singular value is used as group input no actual
buffer will be created, the write operation does not schedule any chunks
and the ReadBufferOperation subsequently returns zero
(MemoryBuffer::read).

The fix uses the (0,0) resolution to detect single value input of the
WriteBufferOperation. The actual resolution is then clamped to (1,1) to
ensure we have a single pixel to store the value in. A m_single_value
flag is also set, so we can reliably distinguish this from genuine image
resolutions without having to check m_width/m_height later on.

The ReadBufferOperation copies this flag from the associated
WriteBufferOperation and if set will always return the single value from
pixel (0,0).
2013-08-16 13:11:15 +00:00
Campbell Barton
fd7bffa3c5 replace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimportant, since append steps over the whole list each time. 2013-08-16 13:06:40 +00:00
Campbell Barton
1677758e45 new bmesh queries BM_face_exists_overlap, BM_face_exists_overlap_subset
the subset version of the function checks if any faces has all its verts in the given array.

also made some additions to linklist functions (arena and pool versions of append).
2013-08-16 13:02:34 +00:00
Thomas Dinges
d75e14b31e * Compile fix, so disabling libmw works again. 2013-08-16 12:43:37 +00:00
Sergey Sharybin
a8353530be Make byte-float conversion threaded in compositor
In fact, there's no need to get float buffer at all,
conversion could be done in pixel processor level
after interpolation.

It might give slightly worse interpolation results
(which i'm not sure would be visible by eye) but
it gives more than 2x speedup on my laptop on node
setups used for warping image.

--
svn merge -r58988:58989 ^/branches/soc-2011-tomato
2013-08-16 10:01:09 +00:00
Sergey Sharybin
970c80e473 Remove unused and unfinished py bindings 2013-08-16 09:46:34 +00:00
Sergey Sharybin
24ce60cfe4 Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.

Movie clip editor changes:

- Artist might create a plane track out of multiple point
  tracks which belongs to the same track (minimum amount of
  point tracks is 4, maximum is not actually limited).

  When new plane track is added, it's getting "tracked"
  across all point tracks, which makes it stick to the same
  plane point tracks belong to.

- After plane track was added, it need to be manually adjusted
  in a way it covers feature one might to mask/replace.

  General transform tools (G, R, S) or sliding corners with
  a mouse could be sued for this. Plane corner which
  corresponds to left bottom image corner has got X/Y axis
  on it (red is for X axis, green for Y).

- Re-adjusting plane corners makes plane to be "re-tracked"
  for the frames sequence between current frame and next
  and previous keyframes.

- Kayframes might be removed from the plane, using Shit-X
  (Marker Delete) operator. However, currently manual
  re-adjustment or "re-track" trigger is needed.

Compositor changes:

- Added new node called Plane Track Deform.

- User selects which plane track to use (for this he need
  to select movie clip datablock, object and track names).

- Node gets an image input, which need to be warped into
  the plane.

- Node outputs:
  * Input image warped into the plane.
  * Plane, rasterized to a mask.

Masking changes:

- Mask points might be parented to a plane track, which
  makes this point deforming in a way as if it belongs
  to the tracked plane.

Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578

This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
Sergey Sharybin
cab2aef71a Add Procrustes PNP ("PPnP") resection algorithm to libmv
This adds a new Euclidean resection method, used to create the
initial reconstruction in the motion tracker, to libmv. The method
is based on the Procrustes PNP algorithm (aka "PPnP"). Currently
the algorithm is not connected with the motion tracker, but it
will be eventually since it supports initialization.

Having an initial guess when doing resection is important for
ambiguous cases where potentially the user could offer extra
guidance to the solver, in the form of "this point is in front of
that point".

--
svn merge -r58821:58822 ^/branches/soc-2011-tomato
2013-08-16 08:26:34 +00:00
Campbell Barton
763c205e72 add support for mempool/linklist functions. 2013-08-16 05:50:00 +00:00
Sergey Sharybin
db01d290e7 Compilation error fix when using scons
OpenEXR libraries shall go after OpenImageIO,
otherwise it'll fail to find symbols needed
for OIIO.
2013-08-15 12:05:42 +00:00
Andrea Weikert
20b5e1f7b8 == filebrowser ==
* FIX: selecting bookmark or recent file caused UNDO push, also caused issue with the 'Open' and 'Cancel' buttons being grayed out.

Reported by Sergey Sharybin in IRC, many thanks.
2013-08-15 10:14:41 +00:00
Sergey Sharybin
d34f9c7a74 Fix #36384: Inconsistent curve fill behaviour
Creating new splines via Python API didn't take
curve dimension into account.

Now adding new splines will set 2D/3D flag for
spline according to curve's dimension.
2013-08-15 07:59:32 +00:00
Sergey Sharybin
58d7ae891d Blender might be compiled without guardedalloc again
This is useful for benchmark tests, to make CPU cache
utilization as good as we could with current design.
2013-08-15 07:36:56 +00:00
Campbell Barton
4006f8c83b fix [#36455] importing obj data after saving doesn't work 2013-08-15 00:32:12 +00:00
Mitchell Stokes
196d30e004 BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
Mitchell Stokes
9afae77fed BGE: Finally adding support for additive layer blending.
Currently this is only for the Python API. The logic brick will be updated in a future commit.
2013-08-14 23:31:49 +00:00
Joerg Mueller
c8f75fb5b1 Adding a new state for sound handles in audaspace: stopped.
Now sounds that stopped playing but are still kept in the device can be differentiated from paused sounds with this state.
This should also fix the performance issues mentioned in [#36466] End of SequencerEntrys not set correctly.
Please test if sound pausing, resuming and stopping works fine in the BGE and sequencer, my tests all worked fine, but there might be a use case that needs some fixing.
2013-08-14 21:21:00 +00:00
Sergey Sharybin
9e42f76bab Fix #36467: ends of curves - 2D differs to 3D
This is getting confused, why bevel is handled different
for 2D and 3D curves?

Anyway, made bevel work for 2D case nice again, but it's
probably nice to unify 2D and 3D cases.
2013-08-14 19:45:35 +00:00
Thomas Dinges
2c2206a272 Cycles:
* Remove an unneeded return in shader_bsdf_eval(), function is void. 
* if / else if tweak in shader_bsdf_ao().
2013-08-14 19:38:14 +00:00
Campbell Barton
7a6f3d9e43 fix [#36349] Separate mesh by material creates meshes with all the materials from the original 2013-08-14 14:36:43 +00:00
Campbell Barton
503b7d5b9a add materials.clear() method, matching other python list method. 2013-08-14 11:29:58 +00:00
Campbell Barton
1979720d03 quiet compiler warnings. 2013-08-14 11:29:22 +00:00
Sergey Sharybin
c09034608c Fix double-free happening when having proxy with motion paths
Make it so mpath is not shared between several bones now.

Fix suggested by Joshua Leung, thanks!
2013-08-14 10:39:16 +00:00
Campbell Barton
7d67261a7b fix bug with editmesh rip, active edge could be left on the unselected side of the edge loops. 2013-08-14 09:14:33 +00:00
Campbell Barton
731672fc9b bmesh utility functions for storing an editselection after another in the list. 2013-08-14 09:13:11 +00:00