Commit Graph

2718 Commits

Author SHA1 Message Date
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