Commit Graph

1131 Commits

Author SHA1 Message Date
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
Brecht Van Lommel
65cbcde831 Fix cycles world ray visibility not working correct with multiple importance
sampling.
2013-07-02 21:03:16 +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
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
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
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
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
8d6e5e2fee Cycles: update build configurations to include CUDA sm_35 architecture. When using
a compiler older than CUDA 5.0 it will give a warning and skip this architecture.
2013-06-20 13:10:47 +00:00
Brecht Van Lommel
f811e6e3ae Cycles: optimized SSE BVH traversal now also works with SSE2 CPUs, so all the
way back to Pentium 4, using a slightly less efficient instruction.

Also ensure /Ox is used for Visual Studio for RelWithDebInfo builds.
2013-06-19 17:54:26 +00:00
Brecht Van Lommel
16204bd647 Cycles: prepare to make CUDA 5.0 the official version we use
* Add CUDA compiler version detection to cmake/scons/runtime
* Remove noinline in kernel_shader.h and reenable --use_fast_math if CUDA 5.x
  is used, these were workarounds for CUDA 4.2 bugs
* Change max number of registers to 32 for sm 2.x (based on performance tests
  from Martijn Berger and confirmed here), and also for NVidia OpenCL.

Overall it seems that with these changes and the latest CUDA 5.0 download, that
performance is as good as or better than the 2.67b release with the scenes and
graphics cards I tested.
2013-06-19 17:54:23 +00:00
Jürgen Herrmann
a7416641e6 Fix for Debug build on MSVC2008 and MSVC2012 after Cycles Kernel optimization:
Compiler optimization was accidentally set to /Ox for debug build too.
Changed this to be /Od in Debug and /Ox in Release mode.
2013-06-19 17:17:51 +00:00
Thomas Dinges
dd54b99b33 Cycles / UI:
* Some tweaks to the material "Settings" panel.
2013-06-18 22:34:37 +00:00
Brecht Van Lommel
649dd6f648 Fix cycles crash on some processors. We actually need S-SSE3 support for this
new BVH traversal code, not just SSE3.
2013-06-18 16:52:02 +00:00
Brecht Van Lommel
484d765bd4 Cycles: attempt to fix internal compile error with some visual studio builds 2013-06-18 13:19:16 +00:00
Jürgen Herrmann
5fc1d9205a Cycles BVH Build fix for MSVC 2012.
needs to include intrin.h for _BitScanForward and _BitScanReverse.
2013-06-18 12:32:43 +00:00
Thomas Dinges
c194cdaedf Cycles / BVH:
* GCC needs -mssse3 compile flag too (4.7.2) to compile.
2013-06-18 10:05:47 +00:00
Brecht Van Lommel
d57c6748c4 Cycles: optimization for BVH traveral on CPU's with SSE3, using code from Embree.
On the BMW scene, this gives roughly a 10% speedup overall with clang/gcc, and 30%
speedup with visual studio (2008). It turns out visual studio was optimizing the
existing code quite poorly compared to pretty good autovectorization by clang/gcc,
but hand written SSE code also gives a smaller speed boost there.

This code isn't enabled when using the hair minimum width feature yet, need to
make that work with the SSE code still.
2013-06-18 09:36:06 +00:00
Brecht Van Lommel
9131adca9f Cycles: add "Transparent Shadow" option for materials, to disable them per material. 2013-06-18 09:36:00 +00:00
Campbell Barton
9161a4daa5 fix for own error in recent solitify refactor (r57402), face flip check was incorrect. 2013-06-14 16:10:32 +00:00
Thomas Dinges
88b30ccb8c Cycles:
* Style cleanup for M_PI constants.
* Move Wireframe node into __EXTRA_NODES__ define
2013-06-14 14:29:00 +00:00
Brecht Van Lommel
f8bfe53ded Fix #35730: cycles not rendering dupliverted metaball, needs another special
exception.
2013-06-13 14:33:18 +00:00
Brecht Van Lommel
f9b06060c2 Fix #35729: cycles normal maps not showing properly in preview render. 2013-06-13 13:55:05 +00:00
Brecht Van Lommel
a17d8a29bb Fix #35733: lamps on render layers that are both excluded and used for masking
should not be used, same as emissive meshes.
2013-06-13 13:09:32 +00:00
Brecht Van Lommel
a5f60e9337 Fix #35723: cycles motion blur rendering issue after recent optimizations to skip
some unneeded object syncing.
2013-06-12 20:47:48 +00:00
Brecht Van Lommel
37f92119e4 Fix #35665: more CUDA issues with recent kernel changes, tested on sm_20, sm_21
and sm_30 cards, so hopefully it should all work now.

Also includes some warnings fixes related to nvcc compiler arguments, should make
no difference otherwise.
2013-06-11 21:58:48 +00:00
Brecht Van Lommel
e895e2e0d1 Fix #35711: cycles border render issue after recent changes. 2013-06-11 14:15:46 +00:00
Brecht Van Lommel
de83a4f13c Fix #35251: cycles crash rendering with a particular user preferences configuration. 2013-06-11 12:52:02 +00:00
Sergey Sharybin
e969bb207d Fix compilation error caused by recent wavelength node commit
Apparently, it's bad idea to rely on compiler to cast NULL
which is (void*)0 to int -- and in fact if i was a compiler
would also generate an error.

Further, couldn't see why we need to pass NULL or 0 th add_node,
argument value is defautl to 0 already.
2013-06-11 08:07:05 +00:00
Thomas Dinges
9020df976c Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometers, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

* Code cleanup:
** Moved color functions (xyz and hsv) into dedicated utility files.
** Remove svm_lerp(), use interp() instead. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wavelength

Example render:
http://www.pasteall.org/pic/show.php?id=53202

This is part of my GSoC 2013. (revisions 57322, 57326, 57335 and 57367 from soc-2013-dingto).
2013-06-10 21:55:41 +00:00
Brecht Van Lommel
2213b92e48 Fix cycles OSL node sockets not preserving values when updating with new code. 2013-06-10 20:47:58 +00:00
Brecht Van Lommel
9d3ad07f14 Cycles: ray visibility panel is now also available for the world, works same as
meshes and lamps. The light path node already made this possible but it's a bit
faster to render this way and convenient.
2013-06-10 20:34:34 +00:00
Brecht Van Lommel
d16a608f6d Fix cycles backwards compatibility for specular_toon shader this actually needs
to be done in cycles itself to keep compatibility for bytecode too.

Also fix broken button to compile OSL from the text editors, this got broken after
recent change to disable editing of library linked nodes.
2013-06-10 20:10:03 +00:00
Brecht Van Lommel
2ce0ecd956 Attempt to fix #35665: disable correlated multi jitter sampling on the GPU for now,
seems to be giving issues with CUDA 4.2 but I can't figure out why exactly.
2013-06-10 19:01:37 +00:00
Brecht Van Lommel
ab52b15964 Fix #35681: cycles excluded layers still got evaluated before and after
rendering even if they were not used on any render layers.
2013-06-10 13:53:38 +00:00
Brecht Van Lommel
183629b451 Fix cycles OSL backwards compatibility for specular_toon, it got renamed to glossy_toon
but we can keep the old name working too.
2013-06-10 13:06:10 +00:00