Commit Graph

3425 Commits

Author SHA1 Message Date
Thomas Dinges
11fe01b0da Merged revision(s) 58226-58240 from trunk/blender into soc-2013-dingto. 2013-07-14 16:54:20 +00:00
Brecht Van Lommel
08dc76b1ec Fix a few issues found by coverity code scan in cycles code, nothing that caused
an actual bug as far as I can tell.
2013-07-14 13:19:57 +00:00
Brecht Van Lommel
cad3406c81 Fix some unnecessary memory allocation slowness in cycles mesh export. 2013-07-14 12:51:41 +00:00
Thomas Dinges
12a45c8b1b Merged revision(s) 58093-58225 from trunk/blender into soc-2013-dingto. 2013-07-13 23:52:43 +00:00
Thomas Dinges
17ee2732f4 UI / Cycles:
* Make it more clear for the user what affects 3D View and Final render.
* Static / Dynamic BVH only affects viewport, BVH Cache only final. (see BlenderSync::get_scene_params)
2013-07-12 00:08:55 +00:00
Brecht Van Lommel
e64937c96d Fix #36091: external render engines like Luxrender don't work well with the save
buffers option, it requires specific tile sizes and if they don't match what
OpenEXR expects file saving can get stuck.

Now I've made support for his optional, with a bl_use_save_buffers property for
RenderEngine, set to False by default.
2013-07-11 12:22:29 +00:00
Brecht Van Lommel
3a89f98a24 Fix #36053: slow GPU render with panorama camera + depth of field. 2013-07-10 17:25:52 +00:00
Brecht Van Lommel
9460d9f344 Fix #36080: fix cycles crash with certain group node setups, accessing freed
memory.
2013-07-10 10:50:19 +00:00
Thomas Dinges
0b4244d1df Merged revision(s) 58059-58092 from trunk/blender into soc-2013-dingto. 2013-07-09 00:58:25 +00:00
Thomas Dinges
c4fa047894 Cycles / Ray Depth:
* Added a Ray Depth output to the Light Path node, which returns the current ray bounce (0, 1, 2, 3...)
* This can be used to use different shaders for direct and indirect lighting and artificial effects.

Examples:
* http://www.pasteall.org/pic/show.php?id=55158 Here we use the output to apply a different shader to the third bounce. As in this example, you can use Math Nodes (Greater Than / Less Than) if you want to use values outside of the 0/1 range.

* http://www.pasteall.org/pic/show.php?id=55159 Here we restrict the maximum bounce on a per shader basis for the left sphere. This way it looks like we would only have 1 max bounce set in the scene "Light paths" panel. 
This can be used to e.g. improve performance for objects far from the camera, which do not need full GI. 

Technical notes:
* Implemented for both integrators and SVM/OSL.
* This is done by passing state.bounce to the shader_setup_from_* functions.
* Note: We don't pass state.bounce to kernel_shader_evaluate() and therefore shader_setup_from_displacement() method doesn't set the value, this is outside the path trace loop. Maybe a ToDo?
2013-07-09 00:18:13 +00:00
Brecht Van Lommel
3d847ed6e6 Fix #36064: cycles direct/indirect light passes with materials that have zero
RGB color components gave non-grey results when you might no expect it.

What happens is that some of the color channels are zero in the direct light
pass because their channel is zero in the color pass. The direct light pass is
defined as lighting divided by the color pass, and we can't divide by zero. We
do a division after all samples are added together to ensure that multiplication
in the compositor gives the exact combined pass even with antialiasing, DoF, ..

Found a simple tweak here, instead of setting such channels to zero it will set
it to the average of other non-zero color channels, which makes the results look
like the expected grey.
2013-07-08 23:31:45 +00:00
Brecht Van Lommel
a2553444fa Fix #35969: blender internal and cycles not updating mesh while in edit mode.
Patch for blender internal made by Campbell.
2013-07-08 22:41:14 +00:00
Sergey Sharybin
7d2030d233 Arrempt to fix Cycles compilation with Clang
Issue is caused by missing sse flags for Clang compilers,
this flags only was set for GNU C compilers.

Added if branch for Clang now, which contains the same
flags apart from -mfpmath=sse, This is because Clang was
claiming it's unused argument.

Probably OSX would need some further checks since it's
also using Clang. I've got no idea why it could have
worked for OSX before..
2013-07-07 18:29:57 +00:00
Thomas Dinges
0b5b82bb53 Merged revision(s) 57979-58058 from trunk/blender into soc-2013-dingto 2013-07-07 14:23:20 +00:00
Brecht Van Lommel
e75064bd34 Fix #36037: cycles from dupli generated texture coordinates were wrong, should
have been normalized to 0..1 range.
2013-07-07 10:39:56 +00:00
Thomas Dinges
285ef99931 Cycles:
* Added 2 new nodes to combine and separate HSV colors. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=54828
2013-07-03 23:46:56 +00:00
Thomas Dinges
e7fc69bdfd Merged revision(s) 57908-57978 from trunk/blender into soc-2013-dingto. 2013-07-03 22:12:42 +00:00
Campbell Barton
905cb1639a update doxygen congfig and tweaks to warnings when running doxygen. 2013-07-03 04:47:50 +00:00
Brecht Van Lommel
65cbcde831 Fix cycles world ray visibility not working correct with multiple importance
sampling.
2013-07-02 21:03:16 +00:00
Thomas Dinges
3a6e382d4a Cycles / Vector Transform Node:
* After some more thinking, solved the remaining ToDos. :) 
* Added is_object check to check if we have a valid object.
* If we operate on the world, and try to convert from/to object space, we now assume world space instead, same as OSL.
2013-07-01 23:17:24 +00:00
Thomas Dinges
7f1005cd6a Cycles / Vector Transform Node:
* Implementation of the node for SVM. This covers all possible transformations: World <> Object <> Camera space.
As far as I can tell, it also works fine with Motion Blur enabled.

ToDo:
* SVM differs from OSL, when the node is used on the world.
2013-07-01 22:56:56 +00:00
Thomas Dinges
8c9769c18d Cycles UI script:
* Fix a merge error, device_type was not defined anymore after Non-Progressive integrator changes for GPU.
2013-07-01 21:30:45 +00:00
Thomas Dinges
465a7195b4 Merged revision(s) 57828-57907 from trunk/blender into soc-2013-dingto 2013-07-01 15:23:48 +00:00
Brecht Van Lommel
c776d5e003 Fix #35904: on Windows force NVidia Optimus, which does automatic graphics
switching between an integrated Intel and a dedicated NVidia card, to use the
dedicated card for Blender.

A more portable and general solution would be nice, but it's all I could find:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
2013-06-28 17:58:48 +00:00
Brecht Van Lommel
54b1976958 Fix #35896: cycles crash with OSL image textures and viewport + preview render
running at the same time.
2013-06-28 13:05:21 +00:00
Thomas Dinges
4a113cab0a Merged revision(s) 57768-57827 from trunk/blender into soc-2013-dingto 2013-06-27 16:16:54 +00:00
Thomas Dinges
c15b13f78f Cycles / Ramp closures:
* Fix crash with negative values in Phong Ramp, and add some checks to survive INF and NAN values. 

Patch by Brecht and myself.
2013-06-27 16:08:06 +00:00
Thomas Dinges
c6ce8de20e Code cleanup / Cycles:
* Some cleanup for castings.
2013-06-27 15:48:16 +00:00
Brecht Van Lommel
b466a5c9a9 Fix #35890: memory leak in OS X ghost locale detection. 2013-06-27 13:24:55 +00:00
Campbell Barton
603258d763 fix for zero length normalize before scanfill for meshes and other minor changes. 2013-06-27 04:32:44 +00:00
Thomas Dinges
29a82a04fa Cycles:
* Assure SSE2 intrinsics are also used on SSE3 CPUs and x86.
2013-06-27 00:03:48 +00:00
Brecht Van Lommel
7902fa57b6 Code cleanup: cycles
* Reshuffle SSE #ifdefs to try to avoid compilation errors enabling SSE on 32 bit.
* Remove CUDA kernel launch size exception on Mac, is not needed.
* Make OSL file compilation quiet like c/cpp files.
2013-06-26 23:29:33 +00:00
Thomas Dinges
372c4f80f4 * Comment out change from r57790 to fix compilation for now. 2013-06-26 23:15:52 +00:00
Thomas Dinges
ce06d6d795 Cycles / Brick texture:
* Avoid some unneeded int castings, they were only needed in the original Texture Nodes implementation as custom1 and custom2 were shorts.
2013-06-26 23:08:18 +00:00
Thomas Dinges
15f5da4cd4 Cycles / SSE2:
* kernel_sse2 was built without actual SSE2 intrinsics on x86 systems.
2013-06-26 22:12:23 +00:00
Brecht Van Lommel
e11e30aadf Fix Cycles OpenCL issue if context/program creation fails, mistake by me,
patch #35866 by Doug Gale to fix it.
2013-06-26 12:24:33 +00:00
Thomas Dinges
63f1e253c3 Merged revision(s) 57671-57767 from trunk/blender into soc-2013-dingto 2013-06-26 11:46:55 +00:00
Brecht Van Lommel
8574808b2d Fix #35546: clicking cycles "Use Nodes" did not do a proper undo push, due to
button disappearing as soon as it's clicked. Workaround now is to make this an
operator. Thanks to Lukas and Campbell for tracking this down.
2013-06-25 16:38:40 +00:00
Brecht Van Lommel
0309f442bb Render stats text: show elapsed time for blender internal, hide useless "Single Layer"
at the start, more clearly indicate what the render time of the last frame was, some
other tweaks for consistency.
2013-06-24 22:41:24 +00:00
Thomas Dinges
15aed4127b Fix [#35852], hide Cycles sampling pattern menu, when using GPU. 2013-06-24 04:28:07 +00:00
Brecht Van Lommel
8acdc0515d Fix #35847: cycles group nodes did not work well exposing inputs like normal or
texture coordinate that should automatically use the default normal or texture
coordinate appropriate for that node, rather than some fixed value specified by
the user.
2013-06-23 19:24:32 +00:00
Thomas Dinges
00234dab2f Merged revision(s) 57587-57670 from trunk/blender into soc-2013-dingto 2013-06-23 18:04:13 +00:00
Thomas Dinges
e4ef608020 Cycles / Vector Transform Node:
* Implementation of Vector Transform Node into Cycles.
* OSL backend is done, SVM needs the matrices still.
2013-06-23 17:51:08 +00:00
Brecht Van Lommel
240fb6fa26 Cycles: ensure any SSE data is allocated 16 byte aligned, happens automatically
on many platforms but is not assured everywhere.
2013-06-22 14:35:09 +00:00
Brecht Van Lommel
5da48f425f Cycles OSL: don't set optimize=2 option in OSL shading system, this is already
the default, and by not setting it the user can override it with an environmnet
variable, for example:

export OSL_OPTIONS="optimize=0"
2013-06-22 12:52:15 +00:00
Campbell Barton
dfbbac9b94 style cleanup 2013-06-22 10:59:30 +00:00
Brecht Van Lommel
86c7bf7331 Fix #35812: cycles image texture node not doing proper alpha handling of PNG
images with open shading language enabled.
2013-06-21 13:05:10 +00:00
Brecht Van Lommel
2e3035dd80 Cycles OpenCL: make displacement and world importance sampling work. 2013-06-21 13:05:08 +00:00
Brecht Van Lommel
e1f79351d6 Fix #35804: NVidia OpenCL render issue after sampler changes, workaround what looks like a compiler bug. 2013-06-21 12:34:34 +00:00
Brecht Van Lommel
2df82a2a2b Code cleanup: fix some vs2012 compiler warnings 2013-06-21 12:33:19 +00:00