Commit Graph

291 Commits

Author SHA1 Message Date
Martijn Berger 74d3f3746c CMake cleanup target_link_libraries_decoupled 2016-03-30 15:15:17 +02:00
Sergey Sharybin 003f908f0d Fix T47987: Blender Cycles standalone does not properly read UV coordinates from XML 2016-03-29 10:02:17 +02:00
Martijn Berger b5b269ac11 Fix compilation of cycles standalone and network device 2016-03-11 10:00:47 +01:00
Dalai Felinto de7a8af793 Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices

The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)

Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).

* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER

* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)

* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).

* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.

* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.

* We have no support for interocular distance attenuation based on the proximity of the poles  (which helps to reduce the pole rotation effect/artifact).

THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451

This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.

All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case	 Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332

Reviewers: sergey, dingto

Subscribers: #cycles

Differential Revision: https://developer.blender.org/D1223
2016-03-10 09:28:29 -03:00
Martijn Berger b5171e250c Make cycles standalone link again 2016-02-15 21:00:25 +01:00
Sergey Sharybin ad26407b52 Cycles: Implement approximate reflectance profiles
Using this paper:

  http://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf

This model gives less blurry results than the Cubic and Gaussian
we had implemented:

- Cubic: https://developer.blender.org/F279670
- Burley: https://developer.blender.org/F279671

The model is called "Christensen-Burley" in the interface, which
actually should be read as "Physically based" or "Realistic".

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht, dingto

Subscribers: robocyte

Differential Revision: https://developer.blender.org/D1759
2016-02-04 13:27:23 +05:00
Sergey Sharybin 2af7637f20 Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
2016-01-14 12:27:22 +05:00
Lukas Stockner 64df7a2b38 Cycles: Read Wave texture profile in the XML parser 2016-01-10 00:24:12 +01:00
Martijn Berger 2d9ed6e7c8 fix compiling cycles after recent gflags / glog shuffle 2016-01-05 14:14:10 +01:00
Martijn Berger e2d3e36ca7 Cycles standalone: add support for reading UV coordinates to the XML scene reader 2015-06-27 12:05:05 +02:00
Thomas Dinges 6a33d13ae7 Expose Background AO and Transparent flag to XML API 2015-06-12 00:32:00 +02:00
Thomas Dinges a6101cde06 Cycles XML API: * Add Bump and Holdout Node * Add todo comments for various things. * SSS falloff now works. 2015-06-01 19:56:39 +05:00
Thomas Dinges b10bc3a6ec Cycles: Number keys 0-3 can be used in interactive mode now to set max bounces. 2015-06-01 19:56:36 +05:00
Martijn Berger 8dd9b7cc5f Cycles standalone, add device type in output listing 2015-05-20 17:11:09 +02:00
Martijn Berger 3ed009af96 Change behavior of cycles xml to conform the spec: "Each XML document has exactly one single root element" 2015-05-17 23:41:38 +02:00
Thomas Dinges effb912061 Cycles Standalone: Expose various light settings. 2015-05-17 12:36:42 +02:00
Thomas Dinges d01b226870 Cleanup: Remove leftover from Distorted Noise node in XML reader. 2015-05-05 10:38:45 +02:00
Thomas Dinges 66f96e555c Cycles: Fix copy / paste mistake in XML reader. 2015-05-04 14:31:20 +02:00
Sergey Sharybin 16794f908f Cycles: Fix possible uninitialized XML read state which might cause crashes 2015-04-30 15:46:09 +05:00
Martijn Berger 3204aff6d0 Fix compilation of cycles network server when logging is enabled 2015-03-29 22:22:53 +02:00
Sergey Sharybin 5ff132182d Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.

Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
2015-03-28 00:15:15 +05:00
Sergey Sharybin 2fad3132a3 Cycles: Fix compilation error of Cycles standalone with Libmv disabled 2015-02-14 21:33:14 +05:00
Sergey Sharybin 197dcfdc19 Cycles: Fix compilation error happened after recent render time commit 2015-01-15 21:28:04 +05:00
Sergey Sharybin e9596e5def Cycles: Post-reintegration tweaks to ensure things do compile
This commit contains all the tweaks which were missing in initial patch
re-integration from the standalone Cycles repository.

This commit also contains an utility cmake macro to help linking targets
with different libraries for release/debug builds, the name currently is

  target_link_libraries_decoupled

it gets a target and list of libraries and makes sure debug builds are
using libraries with "_d" suffix.

After all this changes it'll hopefully be easier to interchange patches
between blender and standalone repositories, because they're now quite
identical.
2015-01-01 01:31:08 +05:00
Sergey Sharybin 405c0fddb4 CMake: Rework linking strategy a bit
Made it a dedicated macro to link release/debug targets against lib/lib_d
libraries which helps keeping code a bit more clean.

Also made it so MSVC is now happy about building debug Cycles with OSL
support.

Reshuffled code a bit and put some comments about what's going on, which
should make it a bit more clear.
2015-01-01 01:31:08 +05:00
Sergey Sharybin 3b6b32d6a3 Cycles FTBFS: Send Boost after OIIO to the linker since the order matters 2015-01-01 01:31:08 +05:00
Sergey Sharybin 9b8942ac71 Cycles Standalone: Add initial support for compilation on Windows
This applies to an application comiling from the standalone Cycles repository
only.

There's still lack of proper install target, so currently pthreads
library is to be copied next to cycles.exe manually.
2015-01-01 01:31:08 +05:00
Sergey Sharybin 9e2e408323 Cycles: Add logging to OSL and CUDA initialization/compilation
This is what was handy troubleshooting issues in the studio,
plus this is exactly the same thing which would be helpful
when solving issues with paths to compiled shaders and cubins
for standalone repository.
2015-01-01 01:31:08 +05:00
Sergey Sharybin bbf12722ed Cycles: Fully support WITH_CYCLES_LOGGING option
This commit generalizes logging module a little bit in making it possible to use
Glog logging in standalone Cycles repository.
2015-01-01 01:31:07 +05:00
Sergey Sharybin f2665d52e2 CMake: Minor cleanup 2015-01-01 01:31:07 +05:00
Sergey Sharybin e0a809fb1d Cycles: Fix compilation error when OIIO is compiled with external PugiXML parser
Basic idea is to check whether OIIO is compiled with embedded PugiXML parser
and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library.
2015-01-01 01:31:07 +05:00
Campbell Barton a4c3ca8671 CMake: use pthreads on all os's 2015-01-01 01:31:07 +05:00
Sergey Sharybin 4497b6ac84 Cycles: Synchronize changes with standalone repository
This changes were done in original commit of the standalone Cycles repository
and needed here for easier patch synchronization.
2015-01-01 01:31:07 +05:00
Thomas Dinges ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
Thomas Dinges 3820d44979 Cycles: Add missing entries in the Integrator constructor and some updates
to the XML API.

(Changes from the standalone repo)
2014-12-17 22:28:33 +01:00
Thomas Dinges 694d74bc6d Fix for last commit, accidentaly removed transparent shadows property. 2014-11-17 11:31:59 +01:00
Thomas Dinges 90f3102f9c Cycles Standalone: Updates for Volume sampling. 2014-11-16 20:18:14 +01:00
Thomas Dinges bfdb9f9e0f Cycles: Remove Integrator volume sampling flag, that was moved to Shader. 2014-11-16 19:50:14 +01:00
Jason Wilkins 8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Nathan Letwory d04e488273 Add texture coordinate export. 2014-09-19 10:44:42 +03: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
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
Sergey Sharybin 77b7e1fe9a Deduplicate CUDA and OpenCL wranglers
For now it was mainly about OpenCL wrangler being duplicated
between Cycles and Compositor, but with OpenSubdiv work those
wranglers were gonna to be duplicated just once again.

This commit makes it so Cycles and Compositor uses wranglers
from this repositories:

  - https://github.com/CudaWrangler/cuew
  - https://github.com/OpenCLWrangler/clew

This repositories are based on the wranglers we used before
and they'll be likely continued maintaining by us plus some
more players in the market.

Pretty much straightforward change with some tricks in the
CMake/SCons to make this libs being passed to the linker
after all other libraries in order to make OpenSubdiv linked
against those wranglers in the future.

For those who're worrying about Cycles being less standalone,
it's not truth, it's rather more flexible now and in the future
different wranglers might be used in Cycles. For now it'll
just mean those libs would need to be put into Cycles repository
together with some other libs from Blender such as mikkspace.

This is mainly platform maintenance commit, should not be any
changes to the user space.

Reviewers: juicyfruit, dingto, campbellbarton

Reviewed By: juicyfruit, dingto, campbellbarton

Differential Revision: https://developer.blender.org/D707
2014-08-05 13:57:50 +06:00
Karsten Schwenk 8ce1090d4e Cycles: Ashikhmin-Shirley anisotropic BSDF
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions

Reviewers: brecht, dingto

Differential Revision: https://developer.blender.org/D549
2014-06-14 13:49:57 +02:00
Thomas Dinges 3de3987ea1 Cycles: Add dedicated nodes to split/combine vectors.
This was already possible via the RGB nodes, but that seems weird.
2014-06-13 21:59:14 +02:00
Thomas Dinges 2c69f1e574 Cleanup: Remove unused total power Emission code in Cycles, that was never exposed in the UI.
Differential Revision: https://developer.blender.org/D562
2014-05-30 14:32:59 +02:00
Brecht Van Lommel e97a186ffe Fix cycles standalone compile error of shading system enum change. 2014-05-19 19:33:09 +02:00
Campbell Barton dc13969e48 Style cleanup: indentation, braces 2014-05-05 02:19:08 +10:00
Campbell Barton 1618329b00 Code cleanup: style, require ; for cuda_assert, opencl_assert 2014-05-04 03:57:50 +10:00
Campbell Barton 95d885b3f4 Quiet float conversion warnings when building cycles standalone 2014-05-04 03:15:20 +10: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
Kevin Dietrich cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
Lukas Tönne 8da4936590 Fix for build error in Cycles standalone caused by new DeviceDrawParams
added in rB74518b28267e9b18199212fbaa3c689fa018d20c.

No special bind/unbind needed for standalone viewer, so can just use a
static stub in the display callback.
2014-03-26 18:11:16 +01:00
Thomas Dinges 8e0ee51b85 Cycles Standalone: XML Updates for Branched Path Multi Light. 2014-03-23 12:29:30 +01:00
Thomas Dinges ce5395868f Cycles Standalone: Support for relative paths and string OSL parameters.
Patch by John Haddon.
Differential Revision: https://developer.blender.org/D418
2014-03-21 17:22:41 +01:00
Campbell Barton 8480bb64ec Code cleanup: style 2014-03-17 21:48:13 +11:00
Thomas Dinges e643d2c211 Cycles Standalone: Tweak for d59f53f7b7, use "closure color" as type name, to 100% match the OSL data type. 2014-02-25 00:01:19 +01:00
Lukas Tönne d59f53f7b7 Support for generic OSL shader parameters in the Cycles standalone XML
reader.

To make a generic OSL shader connectable to other nodes, the parameters
must be declared via "input" and "output" child elements:

  <osl_shader name="tex" src="./osl/stripes.osl">
    <input name="Stripes" type="int" />
    <output name="ColorOut" type="color" />
  </osl_shader>

`name` must be the same as the OSL shader parameter name.
`type` must be one of float, int, color, vector, point, normal, closure,
       string (matching cycles socket types)

Beyond this the OSL script nodes then work just like all other nodes.

OSL parameter sockets can be connected to other cycles nodes:

  <connect from="checker color" to="tex Stripes" />
  <connect from="tex ColorOut" to="floor_closure color" />

They can set default values for the input sockets by attributes of the
main node element:

  <osl_shader name="tex" src="./osl/stripes.osl" Stripes="3" >
    <input name="Stripes" type="int" />
    <output name="ColorOut" type="color" />
  </osl_shader>

This system of specifying custom attributes should probably be changed,
since it can easily create name conflicts and arbitrarily long elements.
But that is a different issue to be solved for all nodes in general.
2014-02-24 11:35:32 +01:00
Thomas Dinges 30e89552e2 Cycles Standalone: XML wrapping of Lights and some more volume settings. 2014-02-14 23:22:29 +01:00
Thomas Dinges 8a1f3238be Cycles Standalone: Add more controls and options
* P key, pauses the render
* W/A/S/D for camera movement
2014-02-14 21:40:51 +01:00
Thomas Dinges 8cc925a216 Cycles Standalone: The camera now gets properly updated, when changing window size or using --width --height overwrites. 2014-02-14 18:40:31 +01:00
Thomas Dinges 76dd68351c Cycles Standalone: Up/Down movement was inverted. 2014-02-14 13:56:23 +01:00
Thomas Dinges 34d1746331 Cycles Standalone: Add interactive mode (I-key), to avoid accidental changes/movement.
Also some code and whitespace cleanup.
2014-02-14 13:41:02 +01:00
Thomas Dinges b09684567e Cycles Standalone: The camera can now be moved and rotated with LMB/RMB mouse key.
ToDo: Add controls for forward/backward movement.
2014-02-14 01:17:01 +01:00
Thomas Dinges 0da1321985 Cycles Standalone: More updates for the Node XML API.
Should be almost complete now, apart from Ramp Nodes (Color Ramp, RGB Curves...).
2014-02-13 20:37:41 +01:00
Thomas Dinges e29a45b396 Cycles: Separation of Indirect and Direct clamping.
Indirect and Direct samples can now be clamped individually. This way we can clamp the indirect samples (fireflies), while keeping the direct highlights.
Example render: http://www.pasteall.org/pic/show.php?id=66586

WARNING: This breaks backwards compatibility. If you had Clamping enabled in an old file, you must re-enable either Direct/Indirect clamping or both again.

Reviewed by: brecht
Differential Revision: https://developer.blender.org/D303
2014-02-10 21:46:02 +01:00
Thomas Dinges b0c314af9f Cycles Standalone: Expose Shader settings in the xml api. 2014-02-07 23:23:37 +01:00
Thomas Dinges 9025101122 Cycles Standalone: Exit when no xml file can be found. 2014-02-07 22:31:38 +01:00
Martijn Berger 4b07579cd4 Cycles_server also needs to link to libdl on linux 2014-02-03 20:19:15 +01:00
Thomas Dinges 12109dd18e Cycles Standalone: Basic support for external OSL shaders.
* Very simple implementation, only allows for 1 output socket. As we haven't decided yet whether we keep the XML API, rather not spend more time on this now.

* To use an external osl shader, put the .osl file next to the xml file.
* Parameters: "output" is the output socket name, "output_type" the variable type (float, color and closure color are supported).
Example:
<osl_shader name="tex" src="ramp_closure.osl" output="Phong" output_type="closure color" />
<connect from="tex Phong" to="output surface" />
2014-01-26 16:23:07 +01:00
Thomas Dinges f746d90398 Cycles Standalone: Various changes
* Change Info in header, put more important info to the left
* API: Move Camera width/height to camera, add some film properties
* Add ESC key to help menu
2014-01-25 18:57:02 +01:00
Martijn Berger b46dcafa7a fix building cycles standalone on windows / cmake 2014-01-25 14:20:25 +01:00
Thomas Dinges 1dd05a1e7b Cleanup: Simplify Cycles standalone OSL detection code. 2014-01-25 13:25:26 +01:00
Thomas Dinges 544b7e6be4 Cycles Standalone: Add a help message, which appears when pressing the "h" key.
This is very basic for now, but can be extended with more info (available devices for example) later.

Thanks to Bastien and Sergey for some help with the glRect coordinates stuff.
2014-01-24 12:59:15 +01:00
Thomas Dinges ae3f577ac1 Cycles Standalone: Volume integrator settings. 2014-01-21 20:56:56 +01:00
Thomas Dinges a6e697f6d7 Cycles Standalone: XML Updates for the integrator. 2014-01-21 19:15:54 +01:00
Thomas Dinges 5ece1594ca Cycles Standalone: Updates for the XML API, added some missing nodes. Still not complete, but better. 2014-01-21 01:30:20 +01:00
Marcus von Appen f0fb60f8c9 Fix cycles standalone compile on some systems, CMAKE_DL_LIBS should be enough.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D205
2014-01-13 10:36:02 +01:00
Brecht Van Lommel a35db17cee Cycles Volume Render: work on nodes and closures.
* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:02 +01:00
Brecht Van Lommel c05209ec01 Fix T37827: cycles XML mesh export utility not longer worked. 2013-12-16 11:08:41 +01:00
Martijn Berger 85a0c5d4e1 Cycles: network render code updated for latest changes and improved
This actually works somewhat now, although viewport rendering is broken and any
kind of network error or connection failure will kill Blender.

* Experimental WITH_CYCLES_NETWORK cmake option
* Networked Device is shown as an option next to CPU and GPU Compute
* Various updates to work with the latest Cycles code
* Locks and thread safety for RPC calls and tiles
* Refactored pointer mapping code
* Fix error in CPU brand string retrieval code

This includes work by Doug Gale, Martijn Berger and Brecht Van Lommel.

Reviewers: brecht

Differential Revision: http://developer.blender.org/D36
2013-12-07 12:26:58 +01:00
Brecht Van Lommel 731ffd3cd4 Cycles: remove approximate subdivision surface with gregory patches code.
It was never fully implemented and will be replaced by OpenSubdiv. Only linear
subdivision remains now. Also includes some refactoring in the split/dice code,
adding a SubdParams struct to pass around parameters more easily.
2013-11-28 02:11:42 +01:00
Campbell Barton 48c1e0c0fc spelling: use American spelling for canceled 2013-10-26 01:06:19 +00:00
Thomas Dinges 8f699dbd5e Cycles:
* More build fixes, 2 link errors remain. http://www.pasteall.org/45279

Note: Probably those paths should only be added for Windows and Linux, as "OPENIMAGEIO_LIBPATH" already inherit them for Mac OS. Also "OPENIMAGEIO_LIBRARIES" inherits the libs for Linux already. Is that intended or a lack of consistency?
2013-08-31 02:56:03 +00:00
Thomas Dinges 615894323a Cycles / Standalone:
* Fix some link errors on Windows, still missing png, zlib, jpeg and tiff.

I couldn't yet figure out the correct flags to pass on here, and the 2300 lines huge main CMakeLists file doesn't help with it...
2013-08-31 02:25:43 +00:00
Campbell Barton 427317d8d8 use CMAKE_DL_LIBS rather then linking libdl directly.
added to cycles standalone too.
2013-08-30 20:26:57 +00:00
Thomas Dinges a51f8e4353 Cycles / Standalone:
* Standalone can now be compiled without the GUI, making the glut dependency optional. 

Added WITH_CYCLES_STANDALONE_GUI cmake flag.
2013-08-30 17:34:27 +00:00
Thomas Dinges 0502fc0112 Cycles Standalone:
* Fix compiler warning, == / = mismatch.
2013-08-30 16:39:39 +00:00
Thomas Dinges ff4e018753 Cycles / Standalone:
* Rename test to standalone.

Note: New CMAKE flag is WITH_CYCLES_STANDALONE.
2013-08-27 02:37:48 +00:00
Brecht Van Lommel 01e22d1b9f Cycles: more code refactoring to rename things internally as well. Also change
property name back so we keep compatibility.
2013-08-23 14:34:34 +00:00
Brecht Van Lommel b9ce231060 Cycles: relicense GNU GPL source code to Apache version 2.0.
More information in this post:
http://code.blender.org/

Thanks to all contributes for giving their permission!
2013-08-18 14:16:15 +00:00
Campbell Barton b8c3efc8c3 code cleanup: compiler warnings 2013-07-21 16:40:34 +00:00
Thomas Dinges 1a131171cb Cycles Test App:
* Fix compile for camera xml properties.
2013-01-17 22:51:54 +00:00
Brecht Van Lommel e5b457dbc9 Cycles: merge some changes from a local branch to bring network rendering a bit
more up to date, still nowhere near working though, but might as well commit this
in case someone else is interested in working on it.
2012-12-21 11:13:46 +00:00
Thomas Dinges 5fab174031 Cycles Test App:
* Remove outdated hard coded path from path_init().
2012-11-09 21:44:31 +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
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
Campbell Barton b0c7c8756f code cleanup: cycles now uses system includes for boost/oiio.. etc, so we dont get warnings from system headers. 2012-09-20 09:04:43 +00:00
Thomas Dinges 51077ea97a Cycles / Test:
* Enable progressive flag, tiles are not working properly (Image gets brighter with more samples and no visible updates until all tiles are finished).
2012-09-14 13:11:48 +00:00
Brecht Van Lommel adea12cb01 Cycles: merge of changes from tomato branch.
Regular rendering now works tiled, and supports save buffers to save memory
during render and cache render results.

Brick texture node by Thomas.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Brick_Texture

Image texture Blended Box Mapping.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Image_Texture
http://mango.blender.org/production/blended_box/

Various bug fixes by Sergey and Campbell.
* Fix for reading freed memory in some node setups.
* Fix incorrect memory read when synchronizing mesh motion.
* Fix crash appearing when direct light usage is different on different layers.
* Fix for vector pass gives wrong result in some circumstances.
* Fix for wrong resolution used for rendering Render Layer node.
* Option to cancel rendering when doing initial synchronization.
* No more texture limit when using CPU render.
* Many fixes for new tiled rendering.
2012-09-04 13:29:07 +00:00
Dalai Felinto ded5e9cd23 clamp for Mix node
the implementation was following my early commit for Math node
I haven't had a chance to run those through Brecht, but would like to do eventually. (they work fine though)
2012-08-30 06:31:02 +00:00
Thomas Dinges e7f12cec35 Cycles Test App:
* Fix for changes in the OpenImageIO API.
2012-08-09 23:00:57 +00:00
Thomas Dinges 3ba31f0481 * Fix for the Cycles XML commit yesterday, blur_glossy has a different internal variable name. 2012-06-21 08:02:18 +00:00
Thomas Dinges b84ee5ae7c Cycles XML:
* Add recent integrator options.
2012-06-20 21:12:38 +00:00
Campbell Barton 2c1abe1f58 style cleanup: assignment & indentation. 2012-06-09 18:56:12 +00:00
Thomas Dinges 49a64a0ab7 Cycles / Cleanup:
* All references to old textures should now be finally removed.
2012-06-08 20:17:02 +00:00
Campbell Barton 857dedbc58 style cleanup 2012-05-27 00:36:50 +00:00
Dalai Felinto d7fbe03a8a Fisheye Camera for Cycles
For sample images see:
http://www.dalaifelinto.com/?p=399 (equisolid)
http://www.dalaifelinto.com/?p=389 (equidistant)

The 'use_panorama' option is now part of a new Camera type: 'Panorama'.
Created two other panorama cameras:

- Equisolid: most of lens in the market simulate this lens - e.g. Nikon, Canon, ...)
             this works as a real lens up to an extent. The final result takes the
             sensor dimensions into account also.
             .:. to simulate a Nikon DX2S with a 10.5mm lens do:
                 sensor: 23.7 x 15.7
                 fisheye lens: 10.5
                 fisheye fov: 180
                 render dimensions: 4288 x 2848

- Equidistant: this is not a real lens model. Although the old equidistant lens simulate
               this lens. The result is always as a circular fisheye that takes the whole sensor
               (in other words, it doesn't take the sensor into consideration).
               This is perfect for fulldomes ;)

               For the UI we have 10 to 360 as soft values and 10 to 3600 as hard values (because we can).


Reference material:
http://www.hdrlabs.com/tutorials/downloads_files/HDRI%20for%20CGI.pdf
http://www.bobatkins.com/photography/technical/field_of_view.html

Note, this is not a real simulation of the light path through the lens.
The ideal solution would be this:
https://graphics.stanford.edu/wikis/cs348b-11/Assignment3
http://www.graphics.stanford.edu/papers/camera/


Thanks Brecht for the fix, suggestions and code review.
Kudos for the dome community for keeping me stimulated on the topic since 2009 ;)

Patch partly implemented during lab time at VisGraf, IMPA - Rio de Janeiro.
2012-05-04 16:20:51 +00:00
Brecht Van Lommel 1d8c798188 Cycles: support for motion vector and UV passes.
Most of the changes are related to adding support for motion data throughout
the code. There's some code for actual camera/object motion blur raytracing
but it's unfinished (it badly slows down the raytracing kernel even when the
option is turned off), so that code it disabled still.

Motion vector export from Blender tries to avoid computing derived meshes
when the mesh does not have a deforming modifier, and it also won't store
motion vectors for every vertex if only the object or camera is moving.
2012-04-30 12:49:26 +00:00
Brecht Van Lommel 93df58160e Fix #30966: cycles nan mesh vertices got set to (0, 0, 0), now remove them instead. 2012-04-16 08:35:21 +00:00
Campbell Barton 303cecf139 spelling cleanup: tesselate -> tessellate (last of these found) 2012-03-20 22:56:26 +00:00
Brecht Van Lommel 4a90339519 Cycles: support for camera rendering an environment map with equirectangular
environment map, by enabling the Panorama option in the camera.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Camera#Panorama

The focal length or sensor settings are not used, the UI can be tweaked still to
communicate this, also panorama should probably become a proper camera type like
perspective or ortho.
2012-02-28 16:44:54 +00:00
Campbell Barton e3958015db Code Cleanup: check is / is not when comparing singletons. 2012-02-02 21:07:56 +00:00
Dalai Felinto 335ffb0ff3 Brightness/Contrast Node for Cycles
Contrast helps to adjust IBL (HDR images used for background lighting).
Note: In the UI we are caling it Bright instead of Brightness. This copy what Blender composite is doing.
Note2: the algorithm we are using produces pure black when contrast is 100. I'm not a fan of that, but it's a division by zero. I would like to look at other algorithms (what gimp does for example). But that would be only after 2.62.
2012-01-24 16:32:31 +00:00
Brecht Van Lommel 8bfa48384d Cycles: checker texture node, patch by Thomas. 2012-01-08 14:55:43 +00:00
Brecht Van Lommel 049ab98469 Cycles: device code refactoring, no functional changes. 2012-01-04 18:06:32 +00:00
Thomas Dinges a06358570e Cycles Test App:
* Added some new integrator parameters to the xml reading. 
* Added ability to specify window width/height, if not set it uses film/camera width/height. 
* Added back the xml exporter script from cycles branch, with modifications to hock up into the UI. To use it, copy the script into 2.61/scripts/startup.

Note: This is intended for developers for now, but the standalone Cycles app has potential to be used as benchmark for example.
2011-12-25 13:34:18 +00:00
Brecht Van Lommel b65061e2ae Cycles: code refactoring, to do render layer visibility test a bit different,
replacing the camera visibility flag with object layer flags.
2011-12-21 20:51:43 +00:00
Brecht Van Lommel 72d2d05770 Cycles: border rendering support, includes some refactoring in how pixels are
accessed on devices.
2011-12-20 12:25:37 +00:00
Dalai Felinto 2a6fdbcccd Cycles Gamma Node
Node specially useful for Texture correction.

This is also a nice example of a simple node made from scratch in case someone wants to create their custom nodes.
Review by Brecht.
2011-12-16 20:35:06 +00:00
Dalai Felinto 3c8ab559a5 Normal Node - Cycles
reviewed by Brecht, with help from Lukas.

Note: dot is reversed compared to Blender.
In Blender Normals point outside, while in Cycles they point inside.
If you use your own custom vector with the Normal Node you will see a difference.
If you feed it with object normals it should work just as good.
2011-12-16 18:15:07 +00:00
Dalai Felinto d15c5e51a1 Invert Color Cycles Node
as with the HSV node the OSL code is relying on the (yet to be implemented) autorename.

Also the svm code could use mix (svm_lerp) instead:
 32 . float3 color_inv = make_float3(1.0f, 1.0f, 1.0f) - color;
 35 . . stack_store_float3(stack, out_color, svm_lerp(color_inv, color, factor));

I have a feeling that each node 'program' should have the least program as possible. I'll see with Brecht later.
But overall I don't know if that's any fast. And apart from that I think we will need this kind of function to move to a library if multiple functions linked in are not a problem.
2011-12-03 23:05:35 +00:00
Brecht Van Lommel 341aa730bd Fix cycles compile issue after last commit. 2011-12-03 21:27:19 +00:00
Dalai Felinto 78495ddf32 CameraData Input Cycles Node
----------------------------
reviewed and approved by Brecht 

Important note:
the camera Z is reverted compared to Blender render.
Now it goes from zero (camera) to positive (in front of the camera)
2011-12-02 20:36:13 +00:00
Dalai Felinto 4fd2736487 HSV Color Node for Cycles
.........................
note, the OSL code has a problem.
In the original node the input and output nodes have the same name (Color).
So this will be fixed here once Brecht come up with a nice autorenaming (or we do a doversion patch) for that.
2011-12-02 16:57:37 +00:00
Brecht Van Lommel efe4ea284a Cycles:
* Fix broken compile of test app.
* Fix some warnings compiling with gcc for 32 bit.
* More tweaks to avoid extended precision issue from #29301.
2011-12-02 14:26:28 +00:00
Dalai Felinto 4db4a0933f SeparateRGB and CombineRGB nodes for Cycles materials
reviewed and approved by Brecht

my first OpenCL code \o/
2011-12-01 21:46:10 +00:00
Campbell Barton 33814e0093 edits to cycles cmake files so cmake_consistency_check.py can parse them. 2011-11-08 20:27:37 +00:00
Brecht Van Lommel 136d27b350 Cycles: add some volume nodes, they don't actually do anything, this is just
to give other developers who may want to work on this to get a starting point.
2011-09-27 20:03:16 +00:00
Campbell Barton 08d52fcc85 added FindOpenImageIO cmake module. 2011-09-18 04:55:22 +00:00
Brecht Van Lommel 66b1dfae89 Cycles: tweaks to properties and nodes
* Passes renamed to samples
* Camera lens radius renamed to aperature size/blades/rotation
* Glass and fresnel nodes input is now index of refraction
* Glossy and velvet fresnel socket removed
* Mix/add closure node renamed to mix/add shader node
* Blend weight node added for shader mixing weights

There is some version patching code for reading existing files, but it's not
perfect, so shaders may work a bit different.
2011-09-16 13:14:02 +00:00
Brecht Van Lommel 27102bfec4 Cycles: OpenCL library is now dynamically loaded so that blender doesn't crash
if it's not installed on the system.

Code copied from clew.h/clew.c in CLCC:
http://clcc.sourceforge.net/
2011-09-01 19:00:23 +00:00
Brecht Van Lommel df625253ac Cycles:
* Add max diffuse/glossy/transmission bounces
* Add separate min/max for transparent depth
* Updated/added some presets that use these options
* Add ray visibility options for objects, to hide them from
  camera/diffuse/glossy/transmission/shadow rays
* Is singular ray output for light path node

Details here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Render/Cycles/LightPaths
2011-09-01 15:53:36 +00:00
Brecht Van Lommel bae896691a Cycles:
* Add alpha pass output, to use set Transparent option in Film panel.
* Add Holdout closure (OSL terminology), this is like the Sky option in the
  internal renderer, objects with this closure show the background / zero
  alpha.
* Add option to use Gaussian instead of Box pixel filter in the UI.
* Remove camera response curves for now, they don't really belong here in
  the pipeline, should be moved to compositor.

* Output full float values for rendering now, previously was only byte precision.
* Add a patch from Thomas to get a preview passes option, but still disabled
  because it isn't quite working right yet.
* CUDA: don't compile shader graph evaluation inline.
* Convert tabs to spaces in python files.
2011-08-28 13:55:59 +00:00
Brecht Van Lommel 48b4de3152 Cycles:
* auto/fixed threads option is used now, patch by Thomas.
* remove unused CUDA_LIBRARIES, library is dynamically loaded
* fix mesh XML export operator for API update
2011-08-24 10:44:04 +00:00
Brecht Van Lommel 360fcd73fe Cycles:
* add some (disabled) test code for using OpenImageIO in imbuf
* link cycles, openimageio and boost into blender instead of a shared library
* some cmakefile changes to simplify the code and follow conventions better
* this may solve running cycles problems on windows XP, or give a different
  and hopefully more useful error message
2011-08-16 16:15:34 +00:00
Brecht Van Lommel 6686f18948 Cycles: more opencl tweaks, status is:
* kernel has shading nodes / textures disabled, amd/nvidia opencl
  compilers choke on these, need to figure out how to avoid this
* works in cycles_test, not available as option in blender yet
* kernel compiles and runs with opencl 1.1 from intel/amd/nvidia
2011-08-11 12:36:08 +00:00
Brecht Van Lommel 7e4ba190cb Cycles: fix GLEW library build issue. 2011-05-27 12:13:10 +00:00
Brecht Van Lommel 170f8c8c41 Cycles: build without GLUT test app by default. 2011-05-01 10:00:21 +00:00
Brecht Van Lommel 774584d7e8 Cycles: hook up the CMake build system.
New build instructions for Ubuntu Linux in the wiki:
http://wiki.blender.org/index.php/Dev:2.5/Source/Cycles
2011-04-28 13:47:27 +00:00
Ton Roosendaal da376e0237 Cycles render engine, initial commit. This is the engine itself, blender modifications and build instructions will follow later.
Cycles uses code from some great open source projects, many thanks them:

* BVH building and traversal code from NVidia's "Understanding the Efficiency of Ray Traversal on GPUs":
http://code.google.com/p/understanding-the-efficiency-of-ray-traversal-on-gpus/
* Open Shading Language for a large part of the shading system:
http://code.google.com/p/openshadinglanguage/
* Blender for procedural textures and a few other nodes.
* Approximate Catmull Clark subdivision from NVidia Mesh tools:
http://code.google.com/p/nvidia-mesh-tools/
* Sobol direction vectors from:
http://web.maths.unsw.edu.au/~fkuo/sobol/
* Film response functions from:
http://www.cs.columbia.edu/CAVE/software/softlib/dorf.php
2011-04-27 11:58:34 +00:00