Commit Graph

4439 Commits

Author SHA1 Message Date
Sergey Sharybin
13d8671a1a Cycles: Add support of Glog logging
This commit makes it possible to use Glog library for the debug logging.
For now only possible when using CMake and in order to use the logging
the WITH_CYCLES_LOGGING configuration variable is to be enabled.

When this option is not enabled or when using Scons there's no difference
in Cycles behavior at all, when using logging and no output to the console
impact is gonna to be minimal.

This is done in order to make it possible to have debug logging persistent
in code (without need to add it when troubleshooting some bug and removing
it afterwards).

For now actual logging is not placed yet, only all the functions needed for
the logging are written and so.
2014-09-25 17:08:32 +06:00
Jens Verwiebe
faaf0c719f OSX: ensure windows are restored at their saved position,
meaning here we need to take docksize into account
2014-09-24 20:55:48 +02:00
Martijn Berger
25ec0d97f9 make "tri_shader" an int instead of a float
tri_shader does no longer need to a float.

Reviewers: dingto, sergey

Reviewed By: dingto, sergey

Subscribers: dingto

Projects: #cycles

Differential Revision: https://developer.blender.org/D789
2014-09-24 13:34:28 +02:00
Thomas Dinges
cbffc7499e Cycles: Shader Graph Optimization for Mix RGB nodes.
Basically the same as AC2c58e96685e8, but for Mix RGB Shaders, in case we use the Mix type. This way the node can be used as texture switch for example, setting the Factor to 0.0 or 1.0, without wasting extra memory / render time.
2014-09-24 12:52:36 +02:00
Thomas Dinges
1b5ec32ed9 Cleanup: Avoid some defines for scene_intersect(), related to Min Width. 2014-09-24 11:32:29 +02:00
Sergey Sharybin
362b0239fe Fix typo in previous commit
Buttons are too much close to each other on the keyboards!
2014-09-23 23:09:44 +06:00
Sergey Sharybin
e422e56db0 Move versioning code under the subversion check 2014-09-23 22:56:37 +06:00
Thomas Dinges
2ed1b67835 Fix T41912, OpenCL compile error when building without __SVM__
Thanks to Vitaliy Filippov for the patch.
2014-09-23 12:54:16 +02:00
Thomas Dinges
31da72545e Cycles: Backward compatibility code for the Clamp splitting in 2.70.
If an older file (< 270) had clamp enabled, with e.g. a value of 2.0, Direct and Indirect clamp are now automatically set to 2.0 as well.
2014-09-19 22:25:36 +02:00
Thomas Dinges
0542442310 Cycles: Add a UI warning, in case the experimental GPU kernel is used.
The experimental kernel is slower and can cause issues on some cards still, so better communicate it well.
2014-09-19 22:25:35 +02:00
Thomas Dinges
75b61f5346 Cycles: Remove unused Mix Shaders from the ShaderGraph, instead of only relinking.
Differential revision: https://developer.blender.org/D796
2014-09-19 13:21:25 +02:00
Thomas Dinges
40a1c7b9c7 Cleanup: Indentation and Whitespace. 2014-09-19 12:57:09 +02:00
Nathan Letwory
d04e488273 Add texture coordinate export. 2014-09-19 10:44:42 +03:00
Campbell Barton
8c3daab298 Cleanup: style, spelling 2014-09-18 09:37:49 +10:00
Campbell Barton
0e0e528ea4 Cleanup: pep8 2014-09-17 18:36:17 +10:00
Sergey Sharybin
c9f0c20e48 Cycle: Add a bit of explanation why we're using such a dirty hack 2014-09-16 12:46:31 +06:00
Campbell Barton
106ea0b20b Cleanup: sync map_to_sphere, UNLIKELY xy zero case 2014-09-16 12:41:16 +10:00
Jens Verwiebe
0c3ff81e79 Cycles: tentative fix get rid of os-specific issue in struct ShaderClosure ( aligment issues due order ) 2014-09-15 21:20:24 +02:00
Thomas Dinges
03ce9882af Fix T41839, OpenCL error.
Also some style fixes, we don't do the "put as much as possible in 1 line" contest.
2014-09-15 14:22:39 +02:00
Thomas Dinges
89b62804dc Followup for last commit, we can break the loop, once we have a match. 2014-09-11 15:02:19 +02:00
Thomas Dinges
61e58c378a Fix T41784, Re-enabling transparent shadows in Cycles doesn't work correctly 2014-09-11 14:51:48 +02:00
Thomas Dinges
da3be518b6 Comment out SVM fresnel_conductor() function for now, still unused. 2014-09-07 21:13:00 +02:00
Thomas Dinges
aa8d25bf09 Cycles / OSL: Add a conductive fresnel shader template.
This adds a fresnel conductive OSL preset to the Text Editor. Based on a patch by Lukas Stockner.
Differential revision: https://developer.blender.org/D145

See the differential for details.
2014-09-07 18:28:59 +02:00
Campbell Barton
2e560ebb95 No need for try/except in D766 2014-09-07 12:05:44 +10:00
Thomas Dinges
50d6067f4e Cycles: Several fixes for Presets.
* Fix caustic properties, was not updated.
* Remove wrong items, leftovers from panel splitting.
* Add missing items. Even if the bundled presets do not set those, a user expects that all properties inside the panel are taken into account, when adding a new preset.
2014-09-07 04:03:23 +02:00
Thomas Dinges
1ff83d8a37 Cycles: Fix Caustic tooltips.
Now that the option has been reversed, the tooltips should be changed too.
Thanks to David Black, for bringing this up!
2014-09-07 01:36:00 +02:00
Sergey Sharybin
f670a8aeaa Fix T41709: Bump not rendered correctly behind transparency using Branched Path Tracing 2014-09-06 18:16:38 +06:00
Sergey Sharybin
1b319669d0 Cycles: Workaround cuda 6.5 compiler bug with sm_50 2014-09-06 15:10:17 +06:00
Sergey Sharybin
769ba42899 Cycles: Fix for the BSDF evaluation init 2014-09-06 14:30:58 +06:00
Thomas Dinges
8243c55f14 Cycles: Split caustics option, to allow separate control for Reflection and Refraction caustics.
This way artists can only disable/enable refraction or reflection caustics.
See Cycles logs for an example: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Cycles

Differential revision: https://developer.blender.org/D766
2014-09-05 20:39:35 +02:00
Thomas Dinges
cdd1d5a93c Cycles: Initial support for volume ray visibility.
This adds a new "Volume Scatter" option to the "Ray Visibility" panels and can be used to e.g. exclude lamps from having an influence on the volume. See release logs for an example: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Cycles

Differential revision: https://developer.blender.org/D771
2014-09-05 16:17:39 +02:00
Sergey Sharybin
fbed2047c8 Fix wrong track of the memory when doing device vector resize before freeing it
This is rather legit case which happens i.e. when having persistent images enabled
and session is updating the lookup tables.

Now device_memory keeps track of amount of memory being allocated on the device,
which makes freeing using the proper allocated size, not the CPU side buffer
size.
2014-09-04 17:25:12 +06:00
Thomas Dinges
c670ceb562 Cleanup: Code deduplication for similar passes. 2014-09-04 01:00:40 +02:00
Sergey Sharybin
f7062ff3ed Fix T41693: Volumes get brightened with extra volume samples on GPU + BPT 2014-09-03 21:28:43 +06:00
Thomas Dinges
00acf4b816 Cleanup: Use function call and delete obsolete comment. 2014-09-02 23:26:49 +02:00
Sergey Sharybin
6212b7302c Cycles: Rebuild BVH from scratch if loading cache failed
Before this Cycles used to try using the cache even so it knew for the
fact that reading it from the disk failed. This change doesn't make it
more stable if someone will try to trick Cycles and give malformed data
but it solves general cases when Blender crashed during the cache write
and will preserve rendering from crashing when trying to use that partial
cache.
2014-09-01 18:05:10 +06:00
Thomas Dinges
35bc266de7 Cleanup: Silence compiler warning. 2014-09-01 02:49:28 +02:00
Thomas Dinges
1f19a093aa Cycles: Always assign the proper value for volume bounces.
I don't see a reason not to do this, and this also fixes update problems when 3D View rendering is running (no volume shader), and then a volume shader gets added.
2014-08-31 14:00:51 +02:00
Thomas Dinges
204e1e0a18 Fix Cycles Integrator presets, not taking Volume bounces into account. 2014-08-30 16:48:44 +02:00
Sergey Sharybin
d438208474 Cycles: Fix triangle ribbons hair in viewport and ortho camera
There were several issues involved into triangle ribbons hair:

- Even for the viewport rendering the blender scene camera was
  used for orientation. This made hair triangles oriented to
  the scene camera, not to the viewport camera.

- Triangle orientation was actually supposing the camera is
  perspective. Triangles weren't oriented properly for the
  orthographic camera resulting in different hair width across
  it's length.

This issues are solved now, but there are some related TODOs:

- Rotating viewport doesn't re-orient the triangles, so after
  viewport navigation hair might not look correct. However,
  with this fix toggling viewport render (to force hair sync)
  makes viewport render correct.

  This isn't so much trivial fix, would require making BVH
  aware of the dynamic triangle orientation, so they get
  properly oriented without full hair re-sync.

- Panorama camera behavior didn't change but looks like it
  should, however not really sure atm what's the right thing
  to do here.
2014-08-29 16:44:16 +06:00
Sergey Sharybin
2b15c012c2 Followup for the previous commit: apparently for CMake py files are hardcoded 2014-08-28 19:49:20 +06:00
Sergey Sharybin
21a7433faa Fix T41473: Cycles volume rendering is too dark
The issue was caused by the changed defaults from the Cycles side.
Because of those properties being saved as an IDProp and not being
saved to the file, every change to the defaults would ruin someone's
day updating the values.

Added a bpy.app.handler.version_update which is run after the regular
do_versions() are done and could be sued by the scripts to apply
versioning code on their settings.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D761
2014-08-28 18:59:24 +06:00
Sergey Sharybin
d84c15696b Fix T41601: Correlated multi-jitter with high samples "hangs"
Issue was caused by the precision issues which made sdivm by 1 under
it's actual value. We can try to do some eps magic, but from the tests
on laptop and desktop doing integer division is not slower than using
floats here.
2014-08-28 15:15:59 +06:00
Campbell Barton
3f2cf6da6f Cleanup: remove _DEBUG define usage 2014-08-27 18:59:32 +10:00
Dalai Felinto
146ed67d55 Cycles Aperture Ratio - option to produce anamorphic bokeh
Thanks for Aldo Zang for the help with the fix for the panorama/fisheye
depth of field calculation and the overall math.

Reviewed By: sergey, dingto

Subscribers: juicyfruit, gregzaal, #cycles, dingto, matray

Differential Revision: https://developer.blender.org/D753
2014-08-27 10:51:50 +02:00
Thomas Dinges
24ea3ab1a9 Cleanup: intrin.h is already included via util_optimization.h. 2014-08-27 03:22:36 +02:00
Sergey Sharybin
e827d904ae Move include outside of the CCL namespace 2014-08-27 00:11:06 +06:00
Thomas Dinges
fb3f32760d Cycles: Add an experimental CUDA kernel.
Now we build 2 .cubins per architecture (e.g. kernel_sm_21.cubin, kernel_experimental_sm_21.cubin).
The experimental kernel can be used by switching to the Experimental Feature Set: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Experimental_Features

This enables Subsurface Scattering and Correlated Multi Jitter Sampling on GPU, while keeping the stability and performance of the regular kernel.

Differential Revision: https://developer.blender.org/D762
Patch by Sergey and myself.

Developer / Builder Note:
CUDA Toolkit 6.5 is highly recommended for this, also note that building the experimental kernel requires a lot of system memory (~7-8GB).
2014-08-26 17:02:26 +02:00
Sergey Sharybin
44fc0ddee9 Cycles: Use compiler intrinsics for clz/ctz in CMJ code for MSVC 2014-08-26 14:22:08 +06:00
Thomas Dinges
e2c412f8cc Cycles: Make Correlated Multi Jitter a regular feature.
It can be helpful in some cases and it works properly, so no need to hide it behind the experimental flag anymore. It's only enabled for the CPU though.
2014-08-26 03:45:50 +02:00