Commit Graph

4114 Commits

Author SHA1 Message Date
Lawrence D'Oliveiro
ef3eb7adc6 Code cleanup: don't use unnecessary .exe extension in scons, simplify code.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D236
2014-04-29 14:03:08 +02:00
6dec2b1a2b Cycles CUDA: add support for sm_50 cards in kernel.cu, for testing. 2014-04-28 14:46:53 +02:00
Campbell Barton
a2489e29f6 Code cleanup: style, unused import 2014-04-28 00:19:15 +10:00
11310b554a Cycles: avoid some CUDA performance on scenes without deformation motion blur. 2014-04-26 14:29:52 +02:00
61eba8fd06 Fix T39843: cycles memory leak rendering with high transparent depth. 2014-04-25 15:30:12 +02:00
Campbell Barton
a15be34389 Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
2014-04-25 05:36:16 +10:00
Campbell Barton
e0920364ce Quiet warning 2014-04-23 17:01:56 +10:00
6b9ca06088 Cycles: some tiny hair intersection optimizations that help maybe 2%. 2014-04-23 01:35:28 +02:00
0f85174d50 Fix occasional wrong normal for curves with minimum width.
This caused a couple of fireflies in koro_final.blend. The wrong normal would
cause the shading point to be set as backfacing, which triggered another bug
with hair BSDFs on the backface of hair curves. That one is not fixed yet but
there's a comment in the code about it now.
2014-04-23 01:35:27 +02:00
6974b69c61 Cycles: optimization for hair BVH build, allow max 2 hair curves per leaf.
This gives me 14% reduction in render time for koro_final.blend.
2014-04-22 17:15:41 +02:00
Bastien Montagne
0e2f6c7fc4 Fix T39833: Nurbs Crash
Converting empty object to mesh can generate a 'Null' BL:Mesh, we have to check against it.
2014-04-21 23:41:39 +02:00
9ab259f55b Cycles: shadow function optimization for transparent shadows (CPU only).
Old algorithm:

Raytrace from one transparent surface to the next step by step. To minimize
overhead in cases where we don't need transparent shadows, we first trace a
regular shadow ray. We check if the hit primitive was potentially transparent,
and only in that case start marching. this gives extra ray cast for the cases
were we do want transparency.

New algorithm:

We trace a single ray. If it hits any opaque surface, or more than a given
number of transparent surfaces is hit, then we consider the geometry to be
entirely blocked. If not, all transparent surfaces will be recorded and we
will shade them one by one to determine how much light is blocked. This all
happens in one scene intersection function.

Recording all hits works well in some cases but may be slower in others. If
we have many semi-transparent hairs, one intersection may be faster because
you'd be reinteresecting the same hairs a lot with each step otherwise. If
however there is mostly binary transparency then we may be recording many
unnecessary intersections when one of the first surfaces blocks all light.

We found that this helps quite nicely in some scenes, on koro.blend this can
give a 50% reduction in render time, on the pabellon barcelona scene and a
forest scene with transparent leaves it was 30%. Some other files rendered
maybe 1% or 2% slower, but this seems a reasonable tradeoff.

Differential Revision: https://developer.blender.org/D473
2014-04-21 19:34:25 +02:00
Thomas Dinges
f6abc96b6b Cleanup: Remove OpenCL __MULTI_CLOSURE__ sanity check, not needed anymore after 04a10907dc41. 2014-04-21 18:08:01 +02:00
Thomas Dinges
5ce2edfc6f Cleanup: Pass PathState as a whole, instead of individual members.
Differential Revision: https://developer.blender.org/D477
2014-04-21 17:52:19 +02:00
785f20f8c3 Fix T39793: cycles SVM shading bug with tangled up nodes after recent optimization. 2014-04-21 17:17:52 +02:00
04a10907dc Code cleanup: remove old closure sampling code Cycles.
This was the original code to get things working on old GPUs, but now it is no
longer in use and various features in fact depend on this to work correctly to
the point that enabling this code is too buggy to be useful.
2014-04-21 16:14:37 +02:00
Carlo Andreacchio
7765b73f6d Cycles: add Transparent Depth output to Light Path node.
This can for example be useful if you want to manually terminate the path at
some point and use a color other than black.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D454
2014-04-21 14:44:36 +02:00
John Pavel
f8cd3d974d Code cleanup: add some asserts and fix a typo in BVH build.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D467
2014-04-21 14:44:36 +02:00
Kevin Dietrich
83988b6cdd Fix new Cycles UV Map node not working correct for bump mapping.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D475
2014-04-21 14:44:36 +02:00
2a9ef256b1 Cycles: SVM optimization for mix shaders, to skip more code when the mix weight
for one of the input shaders is zero.

This gives about 5% speedup for koro_final.blend. In general this is important
so you can design shaders that run faster for shadows, diffuse bounces, etc, for
example by skipping procedural textures or even using a single fixed color.
2014-04-18 14:40:19 +02:00
2d7b53331c Fix cycles using acosf in panorama render when it should use safe_acosf. 2014-04-18 13:51:29 +02:00
Thomas Dinges
d46e1b54f4 Cycles Standalone: Use progressive refine in background mode too.
This is only a workaround, with tiled rendering the image output has a wrong aspect ratio. (squashed image)
2014-04-17 23:17:04 +02:00
39bfde674c Cycles CUDA: don't use cuLaunchGridAsync at all for display devices.
As suggested by Martijn, this is slower than cuLaunchGrid.
2014-04-17 12:18:49 +02:00
18da79f471 Cycles CUDA: only do async execution for GPUs not used for display.
Otherwise devices used for display will lock up the UI too much. This means
you might still get 100% CPU for the display device, but for others CPU usage
should be low still.

The check to see if a device is used for display may not be entirely reliable,
it checks if there is a watchdog timeout on the device, but I'm not entirely
sure that always exists for display devices or is disabled for non-display
devices, though some tools like cuda-gdb seem to make the same assumption.

Ref T39559
2014-04-17 12:08:18 +02:00
415e10a0ef Fix another compile error with recent commit on visual studio. 2014-04-16 21:36:19 +02:00
fd99b8d4cf Fix for scons/CUDA build after recent commit. 2014-04-16 21:23:37 +02:00
6f1afdbbfc Cycles CUDA: enabled branched path kernel again, with more registers. 2014-04-16 21:05:04 +02:00
2851ed4a55 Cycles code refactor: use __launch_bounds__ instead of -maxrregcount for CUDA.
This makes it easier to have per kernel number of registers. Also, all the
tunable parameters for this are now in kernel.cu, rather than spread over cmake,
scons and device_cuda.cpp.
2014-04-16 21:05:04 +02:00
eecc426d86 Fix cycles standalone file saving not taking number of samples into account properly. 2014-04-16 15:28:24 +02:00
Jörg Müller
9351e872f5 Fix T39607: Audio not in synch when the blend file loads.
The problem here was that animation buffers got initialized with zeros in the beginning for unknown parts. Now it gets initialized with the first known value.
The bug's result was that the animation of the pitch started with 0 on first playback and thus any seeking while the pitch is zero resulted in seeking to the beginning.
2014-04-15 19:19:56 +02:00
976f59ab8c Fix cycles standalone not writing images in background mode properly. 2014-04-15 15:19:23 +02:00
72308669ce Fix T39284: clamp cycles volume density to be >= 0, to avoid accidental strange shading. 2014-04-15 15:19:23 +02:00
Bastien Montagne
4f1a5192c2 Fix T39742: Crash with Cycles + new autosmooth crash
Nice little mistake, since the invalid mem access only happened once (the first time),
was close to valid mem, and was only used to read, it would not crash often...
2014-04-15 08:31:48 +02:00
Campbell Barton
ea610e655c Style cleanup: C & pep8 2014-04-15 13:11:48 +10:00
Sergey Sharybin
0c51010c67 Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings 2014-04-15 00:15:09 +06:00
2ab9a0ff09 Fix cycles standalone not saving renders in background mode. 2014-04-14 14:11:07 +02:00
Thomas Dinges
f24bfcffef Cycles: Show Auto Smooth and Angle in the UI, after Split Normals are in. 2014-04-14 09:05:19 +02:00
Bastien Montagne
e29698d3cd Split Normals I (5/5): Add support of split normals to Cycles.
Idea and code by Brecht, many thanks!

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D369
2014-04-13 12:51:13 +02:00
Campbell Barton
5d63f162d5 Fix numpad emulation in non-US keyboards
Patch D455 from Benoît Legat with own minor edits.
2014-04-10 20:31:00 +10:00
Thomas Dinges
297a2223b5 Cycles / CUDA: Increase sm_2x registers to 40.
This fixes the ptaxs "ACCESS_VIOLATION" error and should allow our Linux and Windows build bots to compile again.
Unfortunately this comes with a performance penalty on sm_2x cards, so this is only a workaround for now. Branched Path is still globally disabled on GPU.
2014-04-08 23:25:54 +02:00
Martijn Berger
163a3212b4 OpenCL Change opencl_assert to be more like cuda assert where possible.
added some extra warnings and feedback if things go wrong
2014-04-07 16:17:20 +02:00
Martijn Berger
b224fbf2e7 OpenCL + AMD adapt kernel to newer driver 2014-04-07 14:01:31 +02:00
Campbell Barton
43fb105ff1 Move LIKELY/UNLIKELY into header 2014-04-06 17:25:50 +10:00
Campbell Barton
43a201662a Guarded Alloc: use UNLIKELY for debug memset 2014-04-06 12:58:10 +10:00
Pablo Vazquez
1bd3922b3a Fix error when enabling Mist pass but there was no world. Can't find mist settings, so check for World first. 2014-04-05 17:52:06 -03:00
cb0520f79a Fix for auto detect homogeneous volume with OSL, forgot to include this file in last commit. 2014-04-05 14:49:50 +02:00
Thomas Dinges
53f6057aed Cycles UI: Refactor cpu checks into a use_cpu() function. 2014-04-05 12:49:29 +02:00
Thomas Dinges
d923720312 Cycles: Disable Branched Path on all GPUs for now, until we separate the cubins.
SM_20 fails now as well, reported by Zanqdo in IRC.
2014-04-03 22:18:40 +02:00
bd03e4cfe8 Cycles volume: detect homogeneous volume automatically in common cases.
In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.
2014-04-03 22:13:05 +02:00
Sv. Lockal
ab32a1807d Cycles: SSE optimization for Voronoi cells texture
Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
2014-04-03 23:35:10 +04:00