51549 Commits

Author SHA1 Message Date
Martijn Berger
cb4d32cba3 one more msvc 2013 change 2013-12-30 22:25:56 +01:00
Campbell Barton
a857a6fcf9 Fix T37970: Node scale/rotate use incorrect pivor
note: added code to use real node center, but ifdef'd for now since it
doesnt work well with absolute snapping.
2013-12-30 20:09:16 +11:00
Campbell Barton
4606ded232 Node Editor: enable transform helper line 2013-12-30 19:23:29 +11:00
Campbell Barton
6a473305af Fix T37920: BGE LibLoad failed for meshes with no materials 2013-12-30 15:49:13 +11:00
Campbell Barton
0d6ae3fda2 Main API: refactor naming, use BKE_main_ prefix and add main arg. 2013-12-30 13:25:27 +11:00
Campbell Barton
19103b4437 Code Cleanup: quiet unused define warning 2013-12-30 12:19:27 +11:00
Campbell Barton
d44132d0d0 Fix for crash with game engines LibLoad feature 2013-12-30 12:18:41 +11:00
Campbell Barton
6d9e6bca8f Code Cleanup: cycles tips and long lines 2013-12-30 12:06:36 +11:00
Campbell Barton
24c807ffd4 Code Cleanup: unused defines & style 2013-12-30 10:58:18 +11:00
Brecht Van Lommel
889d77e6f6 Cycles Volume Render: heterogeneous (textured) volumes support.
Volumes can now have textured colors and density. There is a Volume Sampling
panel in the Render properties with these settings:

* Step size: distance between volume shader samples when rendering the volume.
  Lower values give more accurate and detailed results but also increased render
  time.
* Max steps: maximum number of steps through the volume before giving up, to
  protect from extremely long render times with big objects or small step sizes.

This is much more compute intensive than homogeneous volume, so when you are not
using a texture you should enable the Homogeneous Volume option in the material
or world for faster rendering.

One important missing feature is that Generated texture coordinates are not yet
working in volumes, and they are the default coordinates for nearly all texture
nodes. So until that works you need to plug in object texture coordinates or a
world space position.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-30 00:04:02 +01:00
Brecht Van Lommel
af128c4c96 Fix cycles volume emission not working with OSL. 2013-12-30 00:04:02 +01:00
Brecht Van Lommel
30aa0c2482 Code refactor: better distinguish scatter and absorption for volume integration. 2013-12-30 00:04:02 +01:00
Martijn Berger
5d3adafcbb Buildbot SCons MSVC 2013 packing also requires something extra 2013-12-29 19:56:03 +01:00
Martijn Berger
8c4d40d0e5 MSVC 2013 buildbot changes 2013-12-29 17:43:31 +01:00
Martijn Berger
21d587d9fc Added option to have a seperate environment for executing nvcc
This can be used to compiler cuda kernels with Visual Studio 2010 while
the rest of blender is compiled with MSVC 12.0 / 2013
2013-12-29 14:57:21 +01:00
Campbell Barton
42aa19088e Text3d: add select all operator
also add Edit menu for 3d text and move cut/copy/paste there.
2013-12-29 23:55:05 +11:00
Campbell Barton
1c8d1569da correction to previous commit 2013-12-29 23:34:13 +11:00
Campbell Barton
451343022a Fix crash moving the cursor after deleting 3d text 2013-12-29 23:18:38 +11:00
Campbell Barton
748b800eba Text3d: add assert's to check the selection and length are valid 2013-12-29 23:16:02 +11:00
Sergey Sharybin
873c6e5479 Fix movie output when using render border
Reported by @plasmasolutions in IRC.
2013-12-29 17:25:56 +06:00
Sergey Sharybin
3b08ee8996 Follow up to the previous commit: vfont_get_data is to use the same RW lock 2013-12-29 17:07:38 +06:00
Sergey Sharybin
df5631216a Fix T37980: Multiple font objects sharing an external font gives problems
Solved by adding RW lock to BKE_vfont_to_curve.

So now all the threads are allowed to read chars from ghash,
but they'll be locked as soon as one thread would need to load
more chars from font to the ghash.
2013-12-29 16:44:07 +06:00
Campbell Barton
57e8c5870a Text3d: setting upper/lower case now uses the selection 2013-12-29 21:05:39 +11:00
Campbell Barton
9a3855e655 Text3d: remove redundant call to wcslen 2013-12-29 21:04:54 +11:00
Campbell Barton
d0ec1b1caa Fix for 3d text ctrl+arrow keys failing for multi-byte characters. 2013-12-29 16:54:43 +11:00
Campbell Barton
07851dd8df Math Lib: replace point in polygon function with one thats ~23x faster.
rather then using angle summing, use line intersection checks.
2013-12-29 14:50:15 +11:00
Campbell Barton
28f5573197 Fix for inexact 3d cursor placement especially when zoomed out.
Even with the startup scene clicking multiple times in the corner of the
view without moving the mouse would move the cursor a little each time.
2013-12-29 13:35:00 +11:00
Campbell Barton
eb4090dadf Fix missing check if isect_plane_plane_v3 fails to find an intersection. 2013-12-29 12:51:27 +11:00
Brecht Van Lommel
3f39af9cc2 Fix cycles volume render crash when trying to access primitive attributes
like generated texture coordinates or tangents.
2013-12-28 23:39:15 +01:00
Brecht Van Lommel
fe222643b4 Cycles Volume Render: add volume emission support.
This is done using the existing Emission node and closure (we may add a volume
emission node, not clear yet if it will be needed).

Volume emission only supports indirect light sampling which means it's not very
efficient to make small or far away bright light sources. Using direct light
sampling and MIS would be tricky and probably won't be added anytime soon. Other
renderers don't support this either as far as I know, lamps and ray visibility
tricks may be used instead.
2013-12-28 23:20:53 +01:00
Sv. Lockal
077fe03eaf Use ccl_device_inline for SSE perlin noise
msvc ignores inline hint here and generates a bunch of push/lea
2013-12-28 23:26:42 +04:00
Brecht Van Lommel
2b39214c4d Cycles Volume Render: add support for overlapping volume objects.
This works pretty much as you would expect, overlapping volume objects gives
a more dense volume. What did change is that world volume shaders are now
active everywhere, they are no longer excluded inside objects.

This may not be desirable and we need to think of better control over this.
In some cases you clearly want it to happen, for example if you are rendering
a fire in a foggy environment. In other cases like the inside of a house you
may not want any fog, but it doesn't seem possible in general for the renderer
to automatically determine what is inside or outside of the house.

This is implemented using a simple fixed size array of shader/object ID pairs,
limited to max 15 overlapping objects. The closures from all shaders are put
into a single closure array, exactly the same as if an add shader was used to
combine them.
2013-12-28 20:12:11 +01:00
Brecht Van Lommel
e369a5c485 Cycles Volume Render: support for rendering of homogeneous volume with absorption.
This is the simplest possible volume rendering case, constant density inside
the volume and no scattering or emission. My plan is to tweak, verify and commit
more volume rendering effects one by one, doing it all at once makes it
difficult to verify correctness and track down bugs.

Documentation is here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume

Currently this hooks into path tracing in 3 ways, which should get us pretty
far until we add more advanced light sampling. These 3 hooks are repeated in
the path tracing, branched path tracing and transparent shadow code:

* Determine active volume shader at start of the path
* Change active volume shader on transmission through a surface
* Light attenuation over line segments between camera, surfaces and background

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:10 +01:00
Brecht Van Lommel
133f770ab3 Code cleanup: move shadow_blocked function into separate file. 2013-12-28 16:57:10 +01:00
Brecht Van Lommel
37c4d6a50a Cycles Volume Render: add flags to quickly detect when objects have a volume shader. 2013-12-28 16:57:10 +01:00
Brecht Van Lommel
a35db17cee Cycles Volume Render: work on nodes and closures.
* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:02 +01:00
Campbell Barton
a06c9c277a Fix regression T37971: Crash setting recursive dupli-verts 2013-12-29 01:38:10 +11:00
Lukas Tönne
fa9b5d5449 Fix T37939, concern raised in rBd9e0a94: Avoid access to linked node
tree ID data when freeing bNodeTree data blocks, while also making sure
localized node group copies get freed properly.
2013-12-28 14:54:53 +01:00
Campbell Barton
33b87dc1ad update console shell for changes in api 2013-12-29 00:51:51 +11:00
Campbell Barton
2654b28f04 Text3d: avoid calculating the font boundbox scale for every character 2013-12-28 19:45:54 +11:00
Campbell Barton
1aa62605cd Fix for text3d issue, \n was attempting to find a character too 2013-12-28 19:34:50 +11:00
Campbell Barton
1a91b8bd5d Fix for 3d fonts loading the character of the string terminator.
also remove redundant call to wcslen and ensure FT_Init_FreeType runs
once the font loads.
2013-12-28 19:06:45 +11:00
Campbell Barton
961d0409c8 3D Text: use ghash for character lookups 2013-12-28 17:40:13 +11:00
Campbell Barton
2b3fc4dea7 Fix for BKE_nurb_handles_autocalc using 2d tests on 3d data 2013-12-28 17:29:58 +11:00
Campbell Barton
6f5ced4a30 Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-text 2013-12-28 17:23:59 +11:00
Martijn Berger
114284b1fb creation of path from std::string on Windows (VC10/11/12) crashes (access error)
Summary:
Seems to be a known problem in boost: https://svn.boost.org/trac/boost/ticket/6320

Applied the solution but do not know if this is the right place.

Reviewers: dingto, brecht

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D140
2013-12-27 22:38:46 +01:00
Thomas Dinges
1578b55c27 Cycles: Move SIMD utility functions into its own file.
Recently added SSE macros for noise texture can be moved here as well, but I leave this for later.
2013-12-27 21:30:21 +01:00
Martijn Berger
42044a96e4 Basic scons support for building with Visual Studio 2013 although full MSVC 2013 support still needs more work in scons itself 2013-12-27 19:46:55 +01:00
Thomas Dinges
a92abf5089 Cycles / Perlin Noise: Optimize noise calculation by using SIMD instructions on CPU.
This makes scenes with a Noise Texture render faster, the BMW file is 12-15% faster now.

Patch by Sv. Lockal, many thanks! :)
2013-12-27 18:48:37 +01:00
Sergey Sharybin
602dcb47b0 Fix T36474: Blender 2.68a crashes upon rendering
Summary:
Original issue was caused by wring detection of whether
SS modifier is being applied for render/viewport. After
recent dependency graph commit this was no longer an
issue.

But it still might have happen conflict between viewport
draw and scene_update_for_newframe() invoked from render
thread when using external engines like Cycles.

Solved by adding viewport lock while scene is being
updated and objects being exported to the render engine.

Same lock was already used for Blender Internal.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T36474

Differential Revision: https://developer.blender.org/D138
2013-12-27 18:52:41 +06:00