Commit Graph

3023 Commits

Author SHA1 Message Date
Brecht Van Lommel
e7f594b0df Fix #33347: cycles OSL crash connecting string to vector socket. 2012-11-30 06:10:16 +00:00
Brecht Van Lommel
f1745706ad Fix cycles motion blur + OSL + object texture coordinates issue. 2012-11-29 16:11:37 +00:00
Brecht Van Lommel
186bdbd8d8 Fix #33344: cycles motion blur was still crashing on CUDA sm 2.0. Solution now
is also an optimization, use quaternion nlerp instead of slerp, there's no good
reason to use slerp, and nlerp is faster too.
2012-11-29 13:07:45 +00:00
Daniel Genrich
d387dcd110 Fix compile error with clang.
Patch by sambler via irc
2012-11-29 12:22:07 +00:00
Brecht Van Lommel
0d6976ad0c Fix #32900: object motion blur not working on the GPU. To make this work I disabled motion
blurring of scale animation, probably not a big loss in practice since it's not so common
to animate this, can be added back later.
2012-11-29 00:43:50 +00:00
Brecht Van Lommel
bb0195e039 Fix #33337: cycles crash with progressive refine and multiple render layers. 2012-11-28 19:57:29 +00:00
Brecht Van Lommel
33f81187fb Fix #33335: cycles SVM closure issue in recent bugfix, incorrectly tagging
node as done.
2012-11-28 19:13:34 +00:00
Brecht Van Lommel
4c13633582 Fix #33334: missing glossy label for OSL phong ramp caused assert. 2012-11-28 16:42:32 +00:00
Sergey Sharybin
a8905364c3 Typo fix in comment. No functional changes. 2012-11-28 09:49:26 +00:00
Brecht Van Lommel
f4c93ae935 Fix #33328: cycles not rendering dupliframes, needs an exception. 2012-11-27 21:47:55 +00:00
Brecht Van Lommel
5f8fded639 Fix cycles OSL shader loading warnings after recent bugfix. 2012-11-27 16:02:12 +00:00
Brecht Van Lommel
ceed3ef640 Fix #32907: failure rendering a complex node setup, hitting fixed max number
of closures limit. Optimized the code now so it can handle more.

Change SVM mix/add closure handling, now we transform the node graph so that
the mix weights are fed into the closure nodes directly.
2012-11-26 21:59:41 +00:00
Jason Wilkins
f5d8cd34cd -fno-rtti is a gcc option which gives a warning when using MSVC 2012-11-26 13:48:48 +00:00
Brecht Van Lommel
58ee2bdfc0 Fix: cycles light sampling crash, happens on rare occasions due to float
rounding errors.
2012-11-26 11:05:22 +00:00
Campbell Barton
7ef78723b7 code cleanup: doxy comment corrections and correct own typo animation player docs. 2012-11-26 00:59:11 +00:00
Brecht Van Lommel
ed986b62e8 Fix #33152: cycles SVM crash with certain shader nodes setups where closures would
appear multiple times after flattening the mix/add shader part of the graph into a
tree structure.
2012-11-24 14:50:21 +00:00
Campbell Barton
ae9675a585 disable GL_MULTISAMPLE_ARB by default on X11 (same as OSX cocoa) 2012-11-24 01:06:54 +00:00
Brecht Van Lommel
d8c257faa7 IK Solver:
* Rename Legacy to Standard, it's not being deprecated as far as I know.
* Make option to toggle off Location solving work with Standard.
* Make it converge a bit better in some cases by enforcing a minimum number of
  iterations before giving up.
* Move IK solver choice out of bone panel, it's an armature level setting and
  should be set there.
2012-11-24 00:18:34 +00:00
Brecht Van Lommel
2a9b5e8f81 Fix #33267: cycles math node power gave different results for CPU and GPU. The
GPU variants do not support pow(-1, 2), it doesn't check for even exponents, do
manually now.
2012-11-23 17:39:41 +00:00
Jason Wilkins
69b88cf719 Patch [#33196] Warning Fixes 11-16-2012
* MEM_CacheLimitier - Size type to int conversion, should be safe for now (doing my best Bill Gates 640k impression)
* OpenNL CMakeLists.txt - MSVC and GCC have slightly different ways to remove definitions (DEBUG) without the compiler complaining
* BLI_math inlines - The include guard name and inline option macro name should be different. Suppressed warning about not exporting any symbols from inline math library
* BLI string / utf8 - Fixed some inconsistencies between declarations and definitions
* nodes - node_composite_util is apparently not used unless you enable the legacy compositor, so it should not be compiled in that case.

Leaving out changes to BLI_fileops for now, need to do more testing.
2012-11-23 15:12:13 +00:00
Brecht Van Lommel
c25cfd3044 Fix cycles AO issue, still was missing AO pass for black/non-diffuse objects. 2012-11-23 13:41:25 +00:00
Campbell Barton
8ab5aa6e8d code cleanup: warning & style 2012-11-23 06:35:06 +00:00
Daniel Genrich
ef67ddeba9 Bugfix [#29186] Object contribute to fluid sim animation start earlier than keyframe
Also fix:
- Fluid simulation was always lagging 1 frame behind: E.g. the 250th frame in blender showed 249th frame of the fluid simulation.

Change:
- Animated enabled/disabled property only gets counted as "on" if value >= 1

Note that this bugfix should solve many problems with timings of animated fluid sim properties.
2012-11-23 05:00:07 +00:00
Dalai Felinto
f403ca34c7 final fix for Sensor Fit (AUTO, HOR, VERT) in panorama lens - patch by Brecht Van Lommel and me 2012-11-23 02:10:13 +00:00
Brecht Van Lommel
a72c03bc1c Fix cycles OSL wrong reflection texture coordinate. 2012-11-22 22:24:34 +00:00
Brecht Van Lommel
f4297c2ec5 Cycles: disable anisotropic BSDF on CUDA sm 1.x, to try to get it building again. 2012-11-22 16:08:18 +00:00
Sergey Sharybin
eb75e43685 Solved descriptors leak in OCIO module on windows
Seems was simply caused by wrong destructor used in processorRelease
2012-11-22 12:48:09 +00:00
Brecht Van Lommel
d4222c2240 Tweak macbook trackpad version check, now assumes to be there for version >= 10. 2012-11-22 11:50:15 +00:00
Jens Verwiebe
b3b3d00e06 Fix #33185 correct now, forgot stringlength incrased 2012-11-22 11:26:21 +00:00
Jens Verwiebe
d8958e02d2 Fix #33185 by taking new sysctl hw.model into accont 2012-11-22 10:59:46 +00:00
Brecht Van Lommel
6094011c90 Fixes for OS X default locale: use pclose and do error checking for file read. 2012-11-21 15:14:19 +00:00
Jens Verwiebe
d314eef7a7 OSX/locale: moved command up, so errorchecking also happens 2012-11-21 14:29:34 +00:00
Jens Verwiebe
d0b7b0d228 OSX/locale: workaround to get osx system locale from user defaults 2012-11-21 13:54:54 +00:00
Sergey Sharybin
cdcab16d12 Style cleanup: mixed tabs/spaces were used for indentation in osl_closures.h 2012-11-21 13:45:37 +00:00
Sergey Sharybin
b118512448 Cycles: solve -Wmissing-declarations for osl kernel 2012-11-21 13:41:47 +00:00
Brecht Van Lommel
a9c601ceff Fix #33257: cycles camera clipping did not work through transparent objects. 2012-11-21 13:22:24 +00:00
Brecht Van Lommel
3a67122aef Fix #33256: cycles Z pass for orthographic camera was not right, now is more
useful for e.g. fog in compositing.
2012-11-21 13:00:57 +00:00
Brecht Van Lommel
90cdf34f56 Fix #32796: cycles did not support image auto refresh option. 2012-11-21 13:00:51 +00:00
Brecht Van Lommel
36d2d090f6 Fix for #33250: animation player shortcut keys not working on OS X. 2012-11-21 03:33:49 +00:00
Dalai Felinto
8c4fa687e0 Cycles bugfix: AUTO wasn't working for Equisolid Fisheye lens
Now one no longer needs to match the sensor dimensions with the render dimensions manually.

IMPORTANT NOTE: if you were using AUTO before with mismathing sensor aspect ratio (comparing to the render dimensions)
this will change your render! We can doversion this, but apart from Tube project I don't know if anyone else
is using this yet (part due to this bug and the only recently fixed 3dview preview aspect ratio).

That should help more artists to take advantage of this fantastic Blender feature.
It still helps to know the parameters of kwnown cameras/lens though.
For example:

Nikon DX2S with a 10.5mm fisheye can be set with:
Render resolution: 4288 x 2848
Sensor 23.7 x 15.70 (15.70 can be ommitted if AUTO is used as fit method)

Note: some cameras render different sizes according to the recording mode.
For example, a Red Scarlet in 5k (@12 fps) can render a full circular fisheye with a sigma 4.5 lens.
The same camera in the 30fps recording mode renders 4k in a cropped circular image.
So it's not only the resolution that changes, but the actual sensor been used.

So just keep in mind that the more information you have from the camera/lens you want to emulate the better.
Bug found at/patch written as a follow up of the BlenderPRO2012, patch reviewed by Brecht Van Lommel
2012-11-21 01:07:30 +00:00
Brecht Van Lommel
fdadfde5c5 Fix #33158: motion vector pass wrong in cycles in some scenes, wrong vectors
due to float precision problem in matrix inverse.
2012-11-21 01:00:03 +00:00
Brecht Van Lommel
fd619cd7f1 Fix #33177: OSL render difference with missing textures and HSV nodes. 2012-11-20 17:40:21 +00:00
Brecht Van Lommel
ab1b5af08d Fix cycles OSL missing support for texture mapping paramaters found in texture
properties tab.
2012-11-20 17:40:10 +00:00
Brecht Van Lommel
a80b0915c7 Fix #33243: cycles CUDA going missing sometimes, disabled the new code now that
can detect if a device becomes available while Blender runs, appears to be
unreliable for some reason.
2012-11-20 17:39:56 +00:00
Campbell Barton
68e9fdeb81 code cleanup: comment unused members of bmesh operator slots and some osl style edits. 2012-11-20 14:31:58 +00:00
Thomas Dinges
f92359cc29 Fix [#33239] Cycles OSL : Environment Texture Rotation Incorrect:
* Projection mappings were not implemented yet.
2012-11-20 14:18:56 +00:00
Brecht Van Lommel
abce6309e3 Scons: better fix for OSL compiler path, so it also works on OS X. 2012-11-19 15:50:28 +00:00
Brecht Van Lommel
312abf8cb2 SCons: make OSL linking work on windows, and fix OSL compiler path issue to
properly expand to absolute path.
2012-11-19 14:54:35 +00:00
Sergey Sharybin
9947f70f19 Localization should not depend on debug locale library
Linking happens fine, but blender crashes on startup -- crash with familiar
backtrace happens with i18n disabled (in that case it's something to do with OIIO).
2012-11-19 13:15:11 +00:00
Jens Verwiebe
3b570440e4 OSX/scons: refine oslc compile workaround 2012-11-19 11:46:55 +00:00
Thomas Dinges
70b6e2717a Windows / OSL:
* Scons cleanup, to avoid redeclaration of /EHsc. Linking still fails.
2012-11-18 15:02:09 +00:00
Thomas Dinges
6810813068 OSL / Windows:
* Some fixes for scons, kernel/osl compiles now. 
* Still disabled per default, as relative path to oslc.exe does not work and linking fails.
2012-11-18 03:56:53 +00:00
Campbell Barton
973cb29d84 style cleanup: if's on the same line. 2012-11-18 02:41:55 +00:00
Jens Verwiebe
4ece50723b OSX/scons/osl: ready for compile now, little hack to be resolved, todo:fix a crash with shadercompile 2012-11-16 00:43:28 +00:00
Brecht Van Lommel
104a7bfb90 Fix #33170: cycles viewport update issue with motion blur enabled
(which is supposed to do nothing in this case).
2012-11-15 21:52:17 +00:00
Jens Verwiebe
69320ea595 OSX/scons/osl: initial osl compiling, todo: fix shader compile and copy to bundle 2012-11-15 21:35:25 +00:00
Brecht Van Lommel
7e97cd4b49 Fix #33188: AO pass wrong after recent change. 2012-11-15 21:32:05 +00:00
Brecht Van Lommel
2324c80f50 Cycles OSL: windows build system changes to support static OSL/OIIO. 2012-11-15 17:16:27 +00:00
Thomas Dinges
1c9b548d92 Windows / Scons OSL:
* Initial support, still commented.
2012-11-15 16:34:22 +00:00
Sergey Sharybin
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
Brecht Van Lommel
613cf7ae37 Cycles: ambient occlusion now takes per-BSDF normals into account. 2012-11-15 15:37:58 +00:00
Brecht Van Lommel
1c410ab6e7 Fix #33183: cycles bump mapping was not executed with only an AO node in a material. 2012-11-15 14:08:46 +00:00
Sergey Sharybin
9eccf40daa OSL Scons rules
Initial support of OSL builds using SCons build system. Only tested on Linux now.
No changes to configuration files themselves -- for now check how it's configured
for linux buildbot (it was already horror to make all this changes and verify them,
changes to linux-config.py could easily be done later).

Currently WITH_BF_STATICOSL and WITH_BF_STATICLLVM are more like rudiments because
linking against oslexec requires special trick with --whole-archive. We woul either
need to find a way dealing with this oslexec less hackish or drop STATICOSL and 
STATICLLVM flags. Will keep dropping this flags for until we have "final" build
rules for OSL.

Still can not make 32bit linux rendering with OSL -- blender simply crashes when
starting rendering. So for time being this issues are solving disabled OSL for
32bit build slaves.
2012-11-15 13:11:12 +00:00
Brecht Van Lommel
16f1c86953 Fix OSL build error on linux. 2012-11-14 22:45:44 +00:00
Brecht Van Lommel
71389d4d74 Cycles OSL: windows build fixes. 2012-11-14 17:18:47 +00:00
Campbell Barton
1c1e7a0237 avoid divide by zero in cycles progress calculation 2012-11-13 01:53:07 +00:00
Bastien Montagne
e811a2d0ff Fix to allow several include dirs for python under scons build system (needed with new py3.3 debian-like packages). 2012-11-12 18:31:15 +00:00
Campbell Barton
40382c15ac enable multi-sampling on x11 2012-11-12 10:16:50 +00:00
Campbell Barton
cf6994b910 code cleanup: spelling,
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00
Bastien Montagne
5ff3017900 Replacing gettext i18n backend by boost::locale one.
This commit adds a small and simplistic C wrapper around boost's locale library as intern/locale, and heavily simplifies/reduces Blender's own i18n code (under blenfont/ dir). And it adds back UI translation on windows' official builds (with msvc)!

Note to platform maintainers: iconv and gettext (libintl) can now be removed from precompiled libs (not gettext binaries, under windows, of course ;) ).

Note to MinGW32/64 users: boost_locale lib has not yet been uploaded for those build env, please disable WITH_INTERNATIONAL for now (hopefully will be fixed very soon, have contacted psy-fy).
2012-11-11 16:54:26 +00:00
Brecht Van Lommel
afd42031a9 Fix #32974: cycles curved motion blur is not working well combined with rotation,
problem is that the curved interpolation is not constant speed which leads to
mismatches. Turns out this is really hard to solve and implement efficiently, so
curved motion blur is disabled for now, until I can find a solution.
2012-11-11 15:02:05 +00:00
Brecht Van Lommel
1ca4670267 Cycles: panorama camera in viewport camera view now shows the render mapped
to the camera border rather than the entire viewport.
2012-11-10 22:31:29 +00:00
Jens Verwiebe
45cd54bcd1 OSX/ndof: rollback 52072, test showed we need individually weak functions -> todo: solve the clang link issue other way 2012-11-10 15:13:41 +00:00
Brecht Van Lommel
5ddc5fbfb3 Fix #33135: cycles object info random number not working anymore. 2012-11-10 14:50:34 +00:00
Jens Verwiebe
4ec5a42456 OSX/cmake: little cleanup in ghost 2012-11-10 13:53:58 +00:00
Jens Verwiebe
472b3d47f9 OSX/ndof: test link whole framework weak rather than single functions to fix clang compile issue 2012-11-10 13:53:02 +00:00
Campbell Barton
fecc3b9d68 add 2 new utility functions to the BGE mesh py api.
mesh.transform(matid, matrix)
  mesh.transform_uv(matid, matrix, uv_index=-1))


much more efficient then looping over verts in python to transform them.
2012-11-10 09:45:43 +00:00
Sergey Sharybin
f5c9f2c253 Cycles: correction to how device of lists is exposed to blender
compute_device_list is using static vector of device information which
had pointers (identifier and name) to values from device information
structures. That structures are also stored in static vector and being
refreshed every 5 seconds.

The issue is, as soon as device information is being updated, pointers
in vector from compute_device_list became incorrect.

Seems it was the reason of issues with sudden switching from CUDA to
OpenCL on my desktop and from CUDA to CPU on my laptop, It was also
seems to be making persistent images behaves instable.

Made it so device identifier and name are copied from device info
to structures used by RNA (CCLDeviceInfo).

Alternative could be avoid cacheing CCLDeviceInfo and always use actual
list of device information by RNA. It shouldn't be so much slow.
2012-11-10 08:37:02 +00:00
Sergey Sharybin
c9cd4d61ba Fix #33132: Incorrect render session update when using persistent images issue and changing resolution 2012-11-10 08:13:13 +00:00
Campbell Barton
936f0388e8 code cleanup: some warnings and formatting for PyMethodDef's in the BGE. 2012-11-10 05:42:50 +00:00
Brecht Van Lommel
7d03e5c615 Fix part of #33132: render resoltuion refresh issues after persistent images
was added for cycles.

This fixes the case where the option is disabled. I moved the option now to
Blender itself and made it keep the engine around only when it's enabled. Also
fixes case where there could be issues when switching to another renderer.
2012-11-09 23:54:58 +00:00
Brecht Van Lommel
09b34e69d4 Fix #33131: more useful cycles behavior for layers that are both marked excluded
and as mask layer. Now it will still use the mask, and have no further influence
rather than just being excluded entirely.
2012-11-09 23:28:51 +00:00
Thomas Dinges
4bcf0358a8 Cycles / OSL:
* UI fix for "shading_system" property, own fault from r51120
2012-11-09 22:01:37 +00:00
Thomas Dinges
5fab174031 Cycles Test App:
* Remove outdated hard coded path from path_init().
2012-11-09 21:44:31 +00:00
Brecht Van Lommel
3f0fe65635 Fix #32972: cycles crash changing to GPU render with OSL enabled. 2012-11-09 21:27:05 +00:00
Thomas Dinges
46dd1a9167 Cycles / CMake:
* Removed PARTIO building code, partio code was removed already.
* Include "app" dir only when building with CYCLES_TEST enabled.
2012-11-09 18:31:04 +00:00
Dalai Felinto
03cc3b94c9 Fisheye Equidistant Lens algorith bugfix
r = lens * theta

Thanks for Adriano Oliveira for reporting this and chasing down the right formula.
Now fulldome works no longer need to use equisolid + a specific lens+sensor size.

And happy birthday to me. And yes, that's how I celebrate it ;)
2012-11-09 09:11:24 +00:00
Sergey Sharybin
ffbf0a1b12 Cycles: no need in spin lock in memory statistics
This functions are called from device code which is guaranteed
not to be called simultaneously from different threads.
2012-11-09 08:47:08 +00:00
Sergey Sharybin
76525d5398 Cycles: persistent images option
This option enables keeping loaded images in the memory in-between
of rendering.

Implemented by keeping render engine alive for until Render structure
is being freed.

Cycles will free all data when render finishes, optionally keeping
image manager untouched. All shaders, meshes, objects will be
re-allocated next time rendering happens.

Cycles cession and scene will be re-created from scratch if render/
scene parameters were changed.

This will also allow to keep compiled OSL shaders in memory without
need to re-compile them again.

P.S. Performance panel could be cleaned up a bit, not so much happy
     with it's vertical alignment currently but not sure how to make
     it look better.

 P.P.S. Currently the only way to free images from the device is to
       disable Persistent Images option and start rendering.
2012-11-09 08:46:53 +00:00
Brecht Van Lommel
f171d0f29c Fix #33125: cycles OSL crash with multiple render sessions running at the same time. 2012-11-09 03:10:22 +00:00
Campbell Barton
610d746c12 code cleanup: double promotion warnings with new bevel code & wrong use of NULL in cycles. 2012-11-09 03:08:02 +00:00
Brecht Van Lommel
863291bc8e Fix #33113: cycles not rendering motion blur correct with dying particles.
There were a bunch of other issues with dupli motion blur and syncing, the problem
being that there was no proper way to detect corresponding duplis between frames
or updates. As a solution, a persistent_id was added to the DupliObject. It's an
extension of the previous index value, with one index for each dupli level. This
can be used to reliably find matching dupli objects between frames. Works with
nested duplis, multiple particle systems, etc.
2012-11-08 16:35:28 +00:00
Brecht Van Lommel
e73408f247 Cycles: add strength input for normal map node. 2012-11-08 16:35:20 +00:00
Campbell Barton
617a73c573 code cleanup: unused defines & some formatting. 2012-11-08 06:46:10 +00:00
Campbell Barton
353ad46e10 code cleanup: quiet double promotion warnings 2012-11-07 23:52:33 +00:00
Jens Verwiebe
aa42934cef itask: reworked conditionals for osx version compatibility 2012-11-07 21:19:43 +00:00
Brecht Van Lommel
204113b791 Fix #33107: cycles fixed threads 1 was still having two cores do work,
because main thread works as well.
2012-11-07 21:00:49 +00:00
Bastien Montagne
01200ca2ac UI message fixes... 2012-11-07 14:56:53 +00:00
Jens Verwiebe
d7fe02936b Fix ITASK warnings 2012-11-07 11:57:51 +00:00
Jens Verwiebe
a68416e681 OSX: some more version target cleanups and corrections 2012-11-07 10:43:31 +00:00
Campbell Barton
852a41fb0e style cleanup, also remove redundant call to set_listbasepointers in free_main(). 2012-11-07 01:02:28 +00:00
Dalai Felinto
0890c2a4a0 support for string parameters in OSL nodes
for now subtype is not defined, but once we start parsing the metadata we can set texture inputs as FILEPATH
also, it takes relative strings and convert to absolute for all strings (which is arguably a good solution, but
should work for now)
2012-11-06 21:36:44 +00:00
Brecht Van Lommel
d68981158b Fix cycles crash with normal map node, issue with tangent sign attribute. 2012-11-06 21:27:59 +00:00
Brecht Van Lommel
3e9f2938f0 Cycles OSL: support for the trace(point pos, vector dir, ...) function, to trace
rays from the OSL shader. The "shade" parameter is not supported currently, but
attributes can be retrieved from the object that was hit using the
getmessage("trace", ..) function.

As mentioned in the OSL specification, this function can't be used instead of
lighting, the main purpose is to allow shaders to "probe" nearby geometry, for
example to apply a projected texture that can be blocked by geometry, apply
more “wear” to exposed geometry, or make other ambient occlusion-like effects.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL#Trace

Example .blend and render:
http://www.pasteall.org/blend/17347
http://www.pasteall.org/pic/show.php?id=40066
2012-11-06 19:59:10 +00:00
Brecht Van Lommel
209cd25745 Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like
a specular ramp shader. Note this is OSL only still, for experimenting.

Patch by Thomas.
2012-11-06 19:59:07 +00:00
Brecht Van Lommel
27d647dcf8 Cycles: 4 new nodes.
* Tangent: generate a tangent direction for anisotropic shading. Can be either
  radial around X/Y/Z axis, or from a UV map. The default tangent for the
  anisotropic BSDF and geometry node is now always radial Z, for UV tangent use
  this node now.

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

* Normal Map: generate a perturbed normal from an RGB normal map image. This
  is usually chained with an Image Texture node in the color input, to specify
  the normal map image. For tangent space normal maps, the UV coordinates for
  the image must match, and the image texture should be set to Non-Color mode
  to give correct results.

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

* Refraction BSDF: for best results this node should be considered as a building
  block and not be used on its own, but rather mixed with a glossy node using a
  fresnel type factor. Otherwise it will give quite dark results at the edges for
  glossy refraction.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Refraction

* Ambient Occlusion: controls the amount of AO a surface receives, rather than
  having just a global factor in the world. Note that this outputs a shader and
  not a color, that's for another time.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Ambient_Occlusion
2012-11-06 19:59:02 +00:00
Brecht Van Lommel
ccffb6811c Cycles: disable OpenCL in builds for now, since it's not working and is only
confusing users at this point. For experiments you can define the
CYCLES_OPENCL_TEST environment variable to make it show up in the UI.
2012-11-06 19:58:51 +00:00
Dalai Felinto
1c6c3ead4f quick hack to allow 10.8 to build again, will wait Jens for real fix
but basically the error I get is:
Error: redefinition of enumerator 'NSEventTypeRotate'
...

for all the NSEvents
2012-11-06 19:26:45 +00:00
Jens Verwiebe
acc8c654fc OSX: substitute all MAC_OS_X_VERSION defines with MAC_OS_X_VERSION_MIN_REQUIRED macros, to get more reliable version (api) covering 2012-11-06 15:19:49 +00:00
Sergey Sharybin
f07a563f3b Silent strict compiler flag.
Brecht, could you please verify it's indeed nothing should be done for frame node here?
2012-11-06 10:18:42 +00:00
Joshua Leung
2638728bd2 Bugfix: Missing ')' broke Cycles addon 2012-11-05 23:13:09 +00:00
Dalai Felinto
2d7598693e update fisheye tooltip - it was wrongly suggesting equidistant for fulldomes 2012-11-05 19:07:38 +00:00
Sergey Sharybin
a1b954d608 Update CMake rules for audaspace 2012-11-05 14:47:28 +00:00
Joerg Mueller
5a8d5f77af Audaspace:
Replacing AUD_Reference with boost::shared_ptr.
2012-11-05 14:24:35 +00:00
Sergey Sharybin
1231232169 Partial revert of own rev44548.
That was more like workaround which solved particular issue with freestyle
rendering, but introduced some more uncontrollable issues, main of which is
recursive fracture would likely suffer from non-manifolds results of previous
step.

Boolean operation is not the only way to generate zero-area face, it could
also happen with character animation and it's indeed better be solved from
freestule side.

This should fix: #33041 Boolean difference sometimes produces meshes with holes
2012-11-05 12:11:43 +00:00
Sergey Sharybin
b74ba5c595 Stupid copy-paste typo in tiles commit.
That was an example how you should not code :)
2012-11-05 11:57:14 +00:00
Sergey Sharybin
540c9d4208 Cycles: fix crash rendering textured objects in OpenCL
Issue was caused by changed order of texture slots -- float textures
have got lower slots indices than byte textures. OpenCL was still assuming
byte textures goes before float.
2012-11-05 08:05:24 +00:00
Sergey Sharybin
759ea40787 Render engines: replace number of x/y tiles with tile size
Now tile size is setting up explicitly instead of using number of tiles.

This allows better control over GPU performance, where having tiles aligned
to specific size makes lots of sense.

Still to come: need to update startup.blend  to make tiles size 64x64.
2012-11-05 08:05:14 +00:00
Sergey Sharybin
6eec49ed20 Cycles: memory usage report
This commit adds memory usage information while rendering.

It reports memory used by device, meaning:

- For CPU it'll report real memory consumption
- For GPU rendering it'll report GPU memory consumption, but it'll
  also mean the same memory is used from host side.

This information displays information about memory requested by Cycles,
not memory really allocated on a device. Real memory usage might be
higher because of memory fragmentation or optimistic memory allocator.

There's really nothing we can do against this.

Also in contrast with blender internal's render cycles memory usage
does not include memory used by scene, only memory needed by cycles
itself will be displayed. So don't freak out if memory usage reported
by cycles would be much lower than blender internal's.

This commit also adds RenderEngine.update_memory_stats callback which
is used to tell memory consumption from external engine to blender.
This information is used to generate information line after rendering
is finished.
2012-11-05 08:04:57 +00:00
Sergey Sharybin
d71004ea69 Cycles: multi-gpu rendering doesn't know for sure which sample is being sampled,
so only report tile number is being processed
2012-11-05 08:04:41 +00:00
Joshua Leung
ead0005b20 Compile fix on Mingw:
"interface" appeared to be a shadowed var (or even a macro/define elsewhere)
which was causing errors like:
intern\cycles\blender\blender_mesh.cpp:124:23: error: multiple types in one
declaration
intern\cycles\blender\blender_mesh.cpp:124:23: error: declaration does not
declare anything [-fpermissive]
2012-11-05 02:40:10 +00:00
Brecht Van Lommel
2ba840652d Cycles: improve Anisotropic BSDF node, changing the Roughness U/V inputs to
Roughness, Anisotropy and Rotation. Also a fix for automatic tangents and
OSL attribute handling.

Meaning of new sockets explained in the documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Anisotropic
2012-11-04 22:31:32 +00:00
Ton Roosendaal
35e5432029 Possible bugfix 32474
Windows systems: text editor, text object, doesn't allow to input the standard
set of ALT+key characters (the ones coming from the OS).

- Reverted fix january 2012 - that meant to use text object ALT+keys
- Removed old (90ies) feature for hardcoded special characters in Text object.
  (OS delivers this now)

Will wait for confirmation by windows compiler :)
2012-11-04 13:34:13 +00:00
Campbell Barton
7579a9ec37 code cleanup: double promotions 2012-11-04 10:20:16 +00:00
Campbell Barton
ff014a3077 code cleanup: cmake - add missing headers, remove directories from source listing.
also remove logImageLib.c - empty file.
2012-11-03 15:49:38 +00:00
Brecht Van Lommel
9db3f2368c Cycles: use mikktspace now for computing tangents from UV maps. This avoids ugly
averaged tangents at UV seams but instead now the seams will show as discontinuities
in the tangent.
2012-11-03 15:36:02 +00:00
Campbell Barton
25591e958d style cleanup: tabs & whitespace 2012-11-03 15:35:03 +00:00
Campbell Barton
060ea498b0 use library argument for bpy.path.abspath in case of linked nodes. 2012-11-03 15:05:09 +00:00
Brecht Van Lommel
eb87529e23 Cycles OSL: shader script node
Documentation here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.65/Cycles

These changes require an OSL build from this repository:
https://github.com/DingTo/OpenShadingLanguage

The lib/ OSL has not been updated yet, so you might want to keep OSL disabled
until that is done.

Still todo:
* Auto update for external .osl files not working currently, press update manually
* Node could indicate better when a refresh is needed
* Attributes like UV or generated coordinates may be missing when requested from
  an OSL shader, need a way to request them to be loaded by cycles
* Expose string, enum and other non-socket parameters
* Scons build support

Thanks to Thomas, Lukas and Dalai for the implementation.
2012-11-03 14:32:35 +00:00
Brecht Van Lommel
615fe0295f Cycles OSL: refactoring and fixes
* Moved kernel/osl/nodes to kernel/shaders
* Renamed standard attributes to use geom:, particle:, object: prefixes
* Update stdosl.h to properly reflect the closures we support
* Fix the wrong stdosl.h being used for building shaders
* Add geom:numpolyvertices, geom:trianglevertices, geom:polyvertices attributes
2012-11-03 14:32:13 +00:00
Joerg Mueller
b59290a835 Preparation to use boost::shared_ptr. 2012-11-03 09:49:49 +00:00
Brecht Van Lommel
40b3c3a4e6 RNA C++: fixes for lookup_int/lookup_string which were not working in some cases,
and don't use ReportList for function arguments.
2012-11-02 13:36:20 +00:00
Campbell Barton
db8b7fcabb style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
Brecht Van Lommel
0c3d3e5562 Cycles: optimization to not compile shaders and load images that are not
used by any mesh/lamp/world.
2012-10-30 11:51:17 +00:00
Campbell Barton
eb69d1c1ae style cleanup: also quiet harmless compiler warning. 2012-10-29 15:43:54 +00:00
Campbell Barton
0c6a0b293f style cleanup 2012-10-28 15:23:16 +00:00
Campbell Barton
e903701450 style cleanup 2012-10-27 01:46:47 +00:00
Brecht Van Lommel
d19894c8cb Fix #32972: cycles crash switching OSL to SVM in viewport render. 2012-10-26 09:25:02 +00:00
Sergey Sharybin
2505984b52 Cycles: use simplier strategy in next_tile for viewport rendering
No need to find tile closest to rendered center in this case, just
return first possible tile. Saves some computation power.
2012-10-25 12:03:36 +00:00
Joerg Mueller
73f5944ebc Audaspace:
OpenAL multichannel playback support fixed. This should fix bug [#31561] Audio only coming from Front Left in layout and bge.
2012-10-25 10:42:09 +00:00
Joerg Mueller
ad2dffe7c6 Audaspace:
Fix for channel mapping bug. Now 7.1 channels should get mapped correctly.
2012-10-25 10:25:30 +00:00
Joerg Mueller
e66ee1ca9f Audaspace:
RAII locking implementation. This should fix bug [#32096] Background music stops when playing 3D sounds.
2012-10-24 21:33:44 +00:00
Brecht Van Lommel
05f563339b Fix #31894: cycles node muting not working, was not implemented yet. 2012-10-24 21:05:44 +00:00
Brecht Van Lommel
d430046afc Fix blender player link error with scons, include opennl for lapacian smooth modifier. 2012-10-24 19:26:00 +00:00
Sergey Sharybin
1fecf8ff31 Patch #29142: Reduce hopping when switching between perspective and orthographic on 3D view
Patch by Yasuhiro Fujii, thanks!

Original issue was that in vases viewport's lens are different from default
value switching between perspective and orthographic projections will change
viewplane a lot, which is disorienting and annoying.
2012-10-24 16:15:46 +00:00
Sergey Sharybin
d4ee07537e Fix #32951: Progressive refine crashing Blender when used with multiple cuda devices
This time issue was caused by Save Buffers enabled and the reason blender
crashed was tiles generated by cycles didn't match tiles generated by
openexr.

Currently solved it in a way that background rendering will allocate tiles
in the same way render parts are generated in blender. Viewport rendering
will still be using sliced image, but it's more tricky to change and it's
no so big deal for now.
2012-10-24 14:43:29 +00:00
Campbell Barton
c93978d445 code cleanup: some edits for unused vars in recent smooth addition and some style edits. 2012-10-24 11:31:57 +00:00
Sergey Sharybin
40242c2f44 Cycles: update buffers only once in a while when progressive refine is used
It'll mimic the same behavior as regular tile rendering update and it should
give pretty noticeable boost on simpler scenes.
2012-10-23 17:24:23 +00:00
Sergey Sharybin
933864da18 Fix #32951: Progressive refine crashing Blender when used with multiple cuda
Issue was caused by offline rendering could have been allocated the same tile
to different devices and in this case buffers would become invalid.

Made it more clear in the code, so now it's  flag for tile manager to indicate
whether tiles should always be allocated for the same device or not.

Also cleaned a way how tile index for progressive refine is calculating,
which is now avoids tricky computation based on tile coordinate and it's
dimensions.
2012-10-23 16:36:53 +00:00
Campbell Barton
9c58865d20 code cleanup: remove $Id's that crept back in, also osl style edits 2012-10-23 11:47:23 +00:00
Sergey Sharybin
8a2c30ac57 RNA C++ API improvements
Added support of such features, as:

- Ability to call RNA functions using C++ classes
  For example RenderEngine.tag_update

- Property setters (for scalars and arrays)
  Used Qt/jQuery-like getters/setters style, meaning Class.prop() is a getter,
  Class.prop(value) is a setter.

Still to come:

Collection functions are not currently registering inside a property
Meaning BlendData.meshes wouldn't be a subclass of BlendDataMeshes result
you'll need to explicitly create BlendDataMeshes for now instead of doing
BlendData.meshes.remove()
2012-10-22 17:34:16 +00:00
Brecht Van Lommel
57b7f405a4 Fix related to #32929: update list of available devices for cycles rendering
while Blender is running, not only on load. It might help a case when Blender
is started before the CUDA driver is fully initialized.
2012-10-22 14:04:44 +00:00
Brecht Van Lommel
655e24979b Fix #32947: cycles color to float conversion issue after integer socket commit. 2012-10-22 12:22:15 +00:00
Campbell Barton
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
Bastien Montagne
0ee62e4ea6 Revert part of r51487 (those files are needed by the boolean ops code, /intern/bsp/...)! 2012-10-22 06:47:54 +00:00
Campbell Barton
a4b2783169 small optimization for BLI_heap(), give some speedup in decimeter.
- use unsigned ints only (where mixing signed/unsigned)
- turn heap_swap into an inline function, add SWAP_TVAL macro to swap values using a temp value as storage.
- added type checking SHIFT3/4 macros

also style cleanup for CTR_Map
2012-10-22 03:25:53 +00:00
Campbell Barton
226a5ee834 remove LOD_Decimator (c++ decimator), now replaced by bmesh decimator. also remove CTR c++ classes that are no longer used. 2012-10-22 02:39:26 +00:00
Bastien Montagne
26d0492653 A final bunch of UI messages fixes and tweaks, and some BKE_report()<->BKE_reportf() fixes. 2012-10-21 14:02:30 +00:00
Lukas Toenne
285947318f Fix for OSL closure base class. The 'blur' method is not implemented and must be declared pure virtual ('= 0') to avoid compiler error (on Ubuntu 12.04, gcc 4.6.3). 2012-10-21 09:10:47 +00:00
Campbell Barton
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
Joshua Leung
a1a0c8da13 Bugfix [#32932] Can't see the Speaker properties when using Cycles 2012-10-21 05:23:58 +00:00
Campbell Barton
7deb8d8a26 code cleanup: spelling 2012-10-20 20:36:51 +00:00
Campbell Barton
bc8f602601 style cleanup 2012-10-20 18:46:57 +00:00
Thomas Dinges
ba7a7c0925 Cycles / OSL:
* Fix Mapping node, used wrong identifiers for Vector In/Out.
2012-10-20 17:50:24 +00:00
Brecht Van Lommel
73b79a6763 Cycles OSL: light path, texture coordinate, bump and blended box mapping now up
to date and working.
2012-10-20 15:09:36 +00:00
Brecht Van Lommel
e287c97fea Cycles: disable motion blur for CUDA entirely now, also goes wrong on other
architectures. Still did not find a good solution.
2012-10-20 15:09:27 +00:00
Thomas Dinges
950524722c Cycles:
* Build system fixes for closure refactor.
2012-10-20 14:08:49 +00:00
Lukas Toenne
d36dc6d8de Integer socket support in Cycles. Int values are already supported natively in OSL, but were not used as actual ints on the SVM stack. This patch implements all the necessary functionality to support reading input values from RNA properties and convert between SHADER_SOCKET_INT and other types. 2012-10-20 13:11:45 +00:00
Brecht Van Lommel
9a1c1f132d Cycles OSL: most closure code is now shared between OSL and SVM. Also fix
transmission pass and filter glossy option.

The BSDF closure class is now more similar to the SVM closures, and includes
some flags and labels that are needed to properly categorize the BSDF's for
render passes. Phong closure is gone for the moment, needs to be adapated to
the new structure still.
2012-10-20 12:18:00 +00:00
Brecht Van Lommel
3abef3a2e6 Cycles OSL: some build system tweaks to avoid global includes and definitions,
which ensures there is no conflict with other libraries, and avoids full rebuild
when toggling OSL on/off.
2012-10-20 12:17:45 +00:00
Campbell Barton
9f8070d047 code cleanup:
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +00:00
Thomas Dinges
ef80ff105f Cycles/ Layer Weight Node:
* Small tweak for the blend value, to avoid division by zero. 

Thanks to Brecht for pointing out the solution.
2012-10-19 13:51:37 +00:00
Campbell Barton
9b07c98bb4 code cleanup: minor style change & quiet warning, also add assert for BM_vert_splice() to check for invalid use. 2012-10-19 03:07:58 +00:00
Brecht Van Lommel
497ea5f306 Fix #32912: cycles crash with dead particles, actual crash was caused by an
inconsistency in the particle system code, using <= and <. Also tightened up
checks on cycles side to avoid other potential crashes.
2012-10-18 15:00:32 +00:00
Sergey Sharybin
b861f8c3f8 Cycles: suppress path to nvcc appearing in the console in cases
cuda toolkit is installed to different place than /usr/local/cuda
(i.e. happens when using cuda toolkit from repository)
2012-10-18 13:48:02 +00:00
Lukas Toenne
d396bf3546 Fix for OSL compile errors.
1) object_fetch_transform_motion omits the per-object motion blur test (r51394), must use object_fetch_transform_motion_test.
2) KernelCamera.ndctoworld has been removed (r51402), do transform invert directly.
2012-10-18 13:16:57 +00:00
Brecht Van Lommel
95963289c8 More fixes related to #32900, motion blur with cuda sm 2.0 still disabled. 2012-10-18 12:45:27 +00:00
Campbell Barton
812b17f306 style cleanup 2012-10-18 04:51:37 +00:00
Brecht Van Lommel
9d260eedeb Fix #32904: strange pattern on subdivided cube with anistropic shader. Now
tangents from generated coordinates are computed per pixel on the fly, avoids
bad interpolation of singularities.
2012-10-17 23:09:12 +00:00
Thomas Dinges
b2142d6533 Cycles: OSL compile fixes. 2012-10-17 22:58:18 +00:00
Brecht Van Lommel
6915394a3b Attempts to fix CUDA issues on sm 2.0 cards, still no luck getting motion blur
working, but this should make it not crash.

Also fix for wrong shutter time, should have been shorter.
2012-10-17 22:48:29 +00:00
Brecht Van Lommel
4ad103cedd Fix cycles motion blur not working correct with shutter time > 2.0. The soft
limit is 2.0, and anything beyond that is extrapolation which might not work
so well but is still allowed.
2012-10-17 17:27:30 +00:00
Jason Wilkins
11908552db Missing semicolons in intern/ghost/intern/GHOST_WindowCocoa.mm 2012-10-17 17:20:09 +00:00
Thomas Dinges
17c82a7e57 Cycles / OSL:
* Layer Weight is now available in OSL.
2012-10-17 16:16:35 +00:00
Campbell Barton
0c2a1500f2 minor changes
- stub from last commit was incorrect (copied old docs)
- decimator was making copy of quadric for no reason.
- correct typo
2012-10-17 16:10:04 +00:00
Brecht Van Lommel
d08b06f773 Cycles: motion blur is now curved and passes exactly through the midpoint.
Previously it would only interpolate between the previous and next frame,
which meant it might not hit the current frame position.
2012-10-17 12:55:23 +00:00
Brecht Van Lommel
afb75ad2af Cycles: add Tangent input for Anisotropic BSDF.
Also refactor SVM BSDF code, preparing it to be shared with OSL.
2012-10-17 12:17:17 +00:00
Lukas Toenne
0551aa14bb Fix for OSL 'background' attributes (attributes that are not associated to a particular object). Atm this is only the 'ray_length' attribute.
Background attributes are used as fallback in two cases:
1) Non-object light samples (e.g. lamp shaders)
2) Fallback if no implicit object attribute can be found
2012-10-17 12:12:26 +00:00
Campbell Barton
536d9fec80 code cleanup:
- move object_iterators.c --> view3d_iterators. (ED_object.h had to include ED_view3d.h which isn't so nice)
- move projection functions from view3d_view.c --> view3d_project.c (view3d_view was becoming a mishmash of utility functions and operators).
- some some cmake includes as system-includes.
2012-10-17 04:13:03 +00:00
Campbell Barton
fa06aab433 code cleanup: add check spelling osl 2012-10-17 01:53:29 +00:00
Campbell Barton
aeda5142ef style cleanup: make OSL follow our C style convention. http://wiki.blender.org/index.php/Dev:Doc/CodeStyle 2012-10-17 01:47:37 +00:00
Thomas Dinges
a1af01249d Cycles / OSL:
* Add Light Falloff Node.
2012-10-17 00:28:46 +00:00
Thomas Dinges
b4a83e1d0e Cycles / OSL:
* Ray Length is now available in OSL (via get_attribute)
2012-10-16 22:42:05 +00:00
Daniel Genrich
c9fdf6e496 Smoke: Animated collision objects do no longer block smoke. Smoke gets transfered velocity from moving collision object.
Result:
http://www.youtube.com/watch?v=KRtc8eAgaZA

Part of my Blender Development Project Phase III, merged from Smoke2 branch

WIP docs:
http://wiki.blender.org/index.php/User:Genscher/Smoke_Development_Project_2012
2012-10-16 17:01:22 +00:00
Lukas Toenne
617cdb4642 Fix for second bug reported in #32846: Particle emitters are still shown for secondary instances with "show emitter" disabled. This requires checking the duplicator visibility on dupli objects themselves after generating the dupli-list.
The emitter visibility option is messy design, it makes such checks unnecessarily complicated. A better approach would be to allow non-mesh objects to carry particle data, these objects would just be invisible anyway without having to care about extra settings. However, this conflicts with the simplistic particle design of "owner is the emitter" ...
2012-10-16 15:38:52 +00:00
Brecht Van Lommel
7680f88f18 Fix object motion blur crash with lamp sampling(?), missed a check.
Motion blur documentation is here:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.65/Cycles#Motion_Blur
2012-10-16 13:20:57 +00:00
Sergey Sharybin
9be4c94204 Cycles: non-camera viewport render border support
This makes it possible to do a border render inside a viewport even
when not looking through the camera.

Render border could be defined by Ctrl-B shortcut (works for both
camera render border and viewport render border).

Camera render border could still be defined using Shift-B (so no
muscule memory would be broken). Currently used a special flag of
operator to do this, otherwise you'll need to either two operators
with different poll callback or it could go into conflict with a
border zoom,

Border render of a viewport could be enabled/disabled in View
panel using "Render Border" option.
2012-10-16 11:57:46 +00:00
Lukas Toenne
af537c283c Fix for (camera) motion blur changes in Cycles OSL. Compilation was broken due to changed object transform functions. Also added a few missing renderer service implementations for matrix callbacks. 2012-10-16 10:59:35 +00:00
Brecht Van Lommel
7521ce083d Cycles: object motion blur enabled, so in addition to camera motion, moving
objects in the scene will also cause motion blur.

This change does come with a bit of a slow down to the CPU rendering kernel even
with motion blur disabled, due to extra overhead in handling of object matrices.
It's a few percentages on simpler scenes, not so noticeable on more complex ones.
With motion blur enabled rendering is of course also slower as would be expected,
though from testing especially GPU rendering handles it quite well.

This does not support motion blur from deforming objects yet, only translation,
scale and rotation. Deformation blur is probably for another release.
2012-10-16 10:48:19 +00:00
Campbell Barton
af6abc8c80 MESH_OT_vert_connect was missing select flush (newly created edges were not selected).
also <120 line length for cycles property descriptions.
2012-10-16 03:21:22 +00:00
Brecht Van Lommel
fe16b26206 Cycles: fix some update issues with camera motion blur, and do some more work
for getting object motion blur ready.
2012-10-15 21:12:58 +00:00
Daniel Genrich
8a25e2d2b2 Smoke: Merge parts of Smoke2 branch
New:
----------
Collision objects do cause vorticity when passing through smoke

Part of my Smoke Development Project (milestone III)
2012-10-15 19:57:18 +00:00
Brecht Van Lommel
fe47ae525d Cycles: tweak progressive refine tooltip to make it more clear 2012-10-15 17:56:53 +00:00
Brecht Van Lommel
c10c6b1cea Fix #32844: cycles camera motion blur producing completely blurred frames sometimes. 2012-10-15 17:56:40 +00:00
Daniel Genrich
827c70abd8 Update to stable Eigen 3.1.1
- Fixes several bugs within the Eigen library:
http://eigen.tuxfamily.org/index.php?title=ChangeLog#Eigen_3.1.1
2012-10-15 16:29:23 +00:00
Sergey Sharybin
c5300c638c Solve some issues with smoke when using strict compile flags
- Mark some functions as static
- ifdef-ed currently unused functions from spectrum.cpp
- Fixed missing prototype for smectrum() function
2012-10-15 09:25:03 +00:00
Campbell Barton
4d4664d98f code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
Campbell Barton
3a947cf537 code cleanup: remove redundant casts 2012-10-14 08:49:01 +00:00
Campbell Barton
27e54f4d37 code cleanup: remove redundant casts. quiet some qualifier warnings. 2012-10-14 07:40:16 +00:00
Sergey Sharybin
3b88a29abf Cycles: progressive refine option
Just makes progressive refine :)

This means the whole image would be refined gradually using as much
threads as it's set in performance settings. Having enough tiles is
required to have this option working as it's expected.

Technically it's implemented by repeatedly computing next sample for
all the tiles before switching to next sample.

This works around 7-12% slower than regular tile-based rendering, so
use this option only if you really need it.

This commit also fixes progressive update of image when Save Buffers
option is enabled.

And one more thing this commit fixes is handling display buffer with
Save Buffers option enabled. If this option is enabled image buffer
wouldn't have neither byte nor float buffer until image is fully
rendered which could backfire in missing image while rendering in
cases color management cache became full.

This issue solved by allocating byte buffer for image buffer from
tile update callback.

Patch was reviewed by Brecht. He also made some minor edits to
original version to patch. Thanks, man!
2012-10-13 12:38:32 +00:00
Brecht Van Lommel
51105bb2bd Fix for wrong cycles tangent in some cases, was missing transform. 2012-10-13 12:11:01 +00:00
Brecht Van Lommel
fe09b24e86 Cycles: per-BSDF normal input and new Bump node.
Each BSDF node now has a Normal input, which can be used to set a custom normal
for the BSDF, for example if you want to have only bump on one of the layers in
a multilayer material.

The Bump node can be used to generate a normal from a scalar value, the same as
what happens when you connect a scalar value to the displacement output.

Documentation has been updated with the latest changes:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes

Patch by Agustin Benavidez, some implementation tweaks by me.
2012-10-10 15:56:43 +00:00
Brecht Van Lommel
56f798db8c Cycles: make anistropic BSDF / tangent work without UV map, based on generated
coordinates map to a sphere.
2012-10-10 14:21:58 +00:00
Daniel Genrich
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
Brecht Van Lommel
f0a9b66469 Cycles: Anisotropic BSDF enabled, with tangents now computed from the active UV map.
It's using the Ward BSDF currently, which has some energy loss so might be a bit
dark. More/better BSDF options can be implemented later.

Patch by Mike Farnsworth, some modifications by me. Currently it's not possible yet
to set a custom tangent, that will follow as part of per-bsdf normals patch.
2012-10-10 13:02:20 +00:00
Brecht Van Lommel
94f869a256 Cycles: camera motion blur enabled.
Still more work needed to get object motion blur ready.
2012-10-09 18:37:14 +00:00
Brecht Van Lommel
5f52285a01 Fix cycles task manager calling pthread_join() twice. I haven't seen any bugs
from this but best to fix anyway as it causes undefined behavior. Pointed out
on irc by dslammu, thanks!
2012-10-09 14:28:29 +00:00
Daniel Genrich
a580c891a7 Bugfix [#32703] elbeem's isSimworldOk() will never return FALSE
Fixed as suggested by Campbell, thank you!
2012-10-09 13:09:03 +00:00
Brecht Van Lommel
6a82b985c3 Fix #32815: cycles environment render as lamp crash with resolution >= 1024. 2012-10-08 12:15:18 +00:00
Brecht Van Lommel
e3ab85a3f5 Revert fix for #31806, needs a better solution, can hang compiling some shaders. 2012-10-07 14:15:50 +00:00
Nicholas Bishop
e8bc62e162 Avoid unecessary minimizer calculations in dualcon
* The minimize() function, which solves a least-squares problem, is
  only needed for sharp remesh mode, but was being calculated for
  smooth and blocks modes as well. Disabling this calculation when
  it's not needed gives a big performance boost.
2012-10-06 18:28:38 +00:00
Nicholas Bishop
8b4baa347f Code cleanups for dualcon octree
* Move InternalNode operators from Octree class into InternalNode
  struct

* Constify various member functions
2012-10-06 18:28:34 +00:00
Thomas Dinges
f7d61831e1 Cycles / OSL:
* OSL UI message did not show up when device type was GPU, but User Preferences were None. Also remove experimental check, more convenient for testing.
2012-10-06 17:11:53 +00:00
Lukas Toenne
78978dcd80 Fix for a case of 'static initialization fiasco' with OSL closure variables. The parameter lists are using OIIO::TypeDesc static standards, which are also static variables. With static OSL libraries these are not initialized when the closure parameter lists are initialized, so OSL rejects the closure types.
Putting static initialization into functions works just as well, but ensures the OIIO::TypeDesc access is delayed until initialization is complete.
2012-10-06 16:28:02 +00:00
Brecht Van Lommel
098d611c7b Fix for UV texture coordinate problem in cycles, after recent fix. 2012-10-06 11:52:54 +00:00
Brecht Van Lommel
e23b202693 Fix part of cycles/osl light pass rendering, transmission still not correct. 2012-10-05 17:17:19 +00:00
Brecht Van Lommel
b67d75fad2 Fix generated texture coordinate issue after "from dupli" option was added. 2012-10-05 14:54:32 +00:00
Sergey Sharybin
4c3620c69d Fixed compilation error on widows
Was caused by mixing up own C-API typedefs with OCIO's
2012-10-05 10:05:26 +00:00
Sergey Sharybin
862decfc82 Booleans: epsilon for planar checks seems a bit too small for single precision math
This could solve issue #32748: Boolean Modifiers Making unneeded edges?
2012-10-05 07:31:30 +00:00
Thomas Dinges
3eba198818 * Fix Scons build when OCIO is disabled.
Still fails when it's enabled though (unresolved symbols).
2012-10-04 23:44:03 +00:00
Brecht Van Lommel
fedc8e1722 Cycles: add "From Dupli" option for texture coordinate node. This gets the
Generated and UV coordinates from the duplicator of instance instead of the
object itself.

This was used in e.g. Big Buck Bunny for texturing instanced feathers with
a UV map on the bird. Many files changed, mainly to do some refactoring to
get rid of G.rendering global in duplilist code.
2012-10-04 21:40:39 +00:00
Brecht Van Lommel
282f98a84d Fix #31806: cycles crash rendering a particular node setup with multiple mix/add
shader nodes.
2012-10-04 20:12:16 +00:00
Brecht Van Lommel
2a08c0dc56 Code cleanup: fix some clang checker warnings. 2012-10-04 20:11:54 +00:00
Sergey Sharybin
ef107d1a4d Color Management: fallback to stub ocio implementation in cases when
ocio configuration file failed to load

This solves issues with infinite NULL-checks to prevent crashes in
such situations. Currently only happens if there's no configuration
file at all, but could be tweaked further to fallback if this file
isn't usable by blender.
2012-10-04 13:39:08 +00:00
Campbell Barton
dc8340fa33 correct some include dirs not being included as SYSTEM paths in cmake. 2012-10-02 03:18:48 +00:00
Brecht Van Lommel
b1f1ee5138 Fix/workaround #31987: sample as lamp for environment textures not working
with multi GPU when resolution > 128.
2012-10-01 18:31:32 +00:00
Brecht Van Lommel
02fc3eb56c Fix #32725: cycles border render + panorama camera not working in viewport. It will
still look a bit strange since the viewport can't actually render such panorama views,
so the opengl drawn scene behind the border render will not match up.
2012-10-01 17:09:12 +00:00
Thomas Dinges
b012c3cf46 Cycles UI Tweak:
* Don't disable Progressive option, just grey out.
2012-09-29 23:45:35 +00:00
Brecht Van Lommel
71195b247e Fix #32072: cycles shadow pass gave different results with/without emitting
materials present, even though it's only taking lamp shadows into account.
2012-09-28 13:41:34 +00:00
Brecht Van Lommel
1d2e59ba1c Fix cycles "synchronizing object" status being shown when it was already finished. 2012-09-28 12:37:20 +00:00
Campbell Barton
589ada7f0c code cleanup: correct spelling 2012-09-28 06:45:20 +00:00
Brecht Van Lommel
46d82a2a12 Fix #32618: cycles multithreaded image loading could crash with CUDA, was a
threading issue that happens once every X frames.
2012-09-27 17:42:09 +00:00
Campbell Barton
8a51d235e6 pep8 cleanup 2012-09-26 21:19:51 +00:00
Campbell Barton
483a6cd6c2 fix for cycles/python script error in normal panel 2012-09-26 19:23:06 +00:00
Sergey Sharybin
c9d4956f45 Color Management: restore abort() in cases of error and WITH_ASSERT_ABORT enabled 2012-09-26 13:21:10 +00:00
Sergey Sharybin
f45f229af2 Use ${OPENEXR_INCLUDE_DIR} instead of ${OPENEXR}/include
There's no CMake symbol names ${OPENEXR} which lead to using /include
as an include directory, which isn't correct.
2012-09-25 07:34:45 +00:00
Jens Verwiebe
87a8aea313 OSL/cmake: the non-intrusive parts, so other os-maintainers can take code over 2012-09-24 19:06:28 +00:00
Brecht Van Lommel
ae7c3eaceb Fix #32638: mesh double sided normals option not available in any Cycles panel. 2012-09-24 14:36:20 +00:00
Campbell Barton
3e6340214d fix for incorrect declaration rna_Object_free_duplilist() in cycles. 2012-09-23 05:02:06 +00:00
Campbell Barton
34114b3b75 code cleanup: remove/comment unused defines 2012-09-22 13:40:31 +00:00