Commit Graph

291 Commits

Author SHA1 Message Date
Brecht Van Lommel 1dafe759ed Update CUEW to latest version
This brings separate initialization for libcuda and libnvrtc, which
fixes Cycles nvrtc compilation not working on build machines without
CUDA hardware available.

Differential Revision: https://developer.blender.org/D3045
2018-02-07 11:53:01 +01:00
Campbell Barton a1c45a453f Merge branch 'master' into blender2.8 2018-02-05 17:58:31 +11:00
Ray Molenkamp f8236e4869 cycles: fix cxx11 usage for cycles_cubin_cc 2018-02-04 15:11:08 -07:00
Campbell Barton eeb621566a Merge branch 'master' into blender2.8 2018-02-04 10:46:34 +11:00
Ray Molenkamp a5052770b8 cycles: Add an nvrtc based cubin cli compiler.
nvcc is very picky regarding compiler versions, severely limiting the compiler we can use, this commit adds a nvrtc based compiler that'll allow us to build the cubins even if the host compiler is unsupported. for details see D2913.

Differential Revision: http://developer.blender.org/D2913
2018-02-03 10:59:09 -07:00
Dalai Felinto d9858d5897 Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-19 12:46:23 -02:00
Sergey Sharybin 8e1dd7ed81 Cycles: Remove unneeded include statements
Also try to move them from headers to implementation files as much as possible.
2018-01-19 15:19:45 +01:00
Campbell Barton 1b2f8b2754 Merge branch 'master' into blender2.8 2017-12-04 16:51:07 +11:00
Brecht Van Lommel d64d8b5be5 Fix Cycles standalone crash when saving output, after recent refactoring. 2017-12-02 05:45:09 +01:00
Dalai Felinto 1cb6cea71c Merge remote-tracking branch 'origin/master' into blender2.8 2017-11-13 11:48:48 -02:00
Sergey Sharybin d1a761c4d4 Cycles: Fix compilation error of standalone application 2017-11-13 10:49:05 +01:00
Sergey Sharybin 1737887938 Merge branch 'master' into blender2.8 2017-11-10 10:36:46 +01:00
Sergey Sharybin db7a78a2be Cycles: Fix compilation error with latest OIIO
There was some changes about namespaces, which causes ambiguities.

Replaces using namespace with an explicit symbols we need. Is good idea to NOT
pull in the whole namespace anyway!
2017-11-10 10:04:33 +01:00
Campbell Barton 941484ff81 Merge branch 'master' into blender2.8 2017-11-01 01:27:03 +11:00
Sergey Sharybin 39671ac504 Fix crash of standalone app after recent refactor 2017-10-31 13:34:23 +01:00
Brecht Van Lommel f5456df095 Merge branch 'master' into blender2.8 2017-10-24 02:05:41 +02:00
Brecht Van Lommel ae41f38f78 Code refactor: pass device to scene, check OSL with device info. 2017-10-24 01:03:59 +02:00
Dalai Felinto e4f2b2be26 Workspace: Move engines to workspace and Properties Editor cleanup
Engine is not stored in WorkSpaces. That defines the "context" engine, which
is used for the entire UI.

The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes")
is obtained from context.

Introduce a ViewRender struct for viewport settings that are defined for
workspaces and scene. This struct will be populated with the hand-picked
settings that can be defined per workspace as per the 2.8 design.

* use_scene_settings
* properties editor: workshop + organize context path

Use Scene Settings
==================
For viewport drawing, Workspaces have an option to use the Scene render
settings (F12) instead of the viewport settings.

This way users can quickly preview the final render settings, engine and
View Layer. This will affect all the editors in that workspace, and it will be
clearly indicated in the top-bar.

Properties Editor: Add Workspace and organize context path
==========================================================

We now have the properties of:

Scene, Scene > Layer, Scene > World, Workspace

[Scene | Workspace] > Render Layer > Object
[Scene | Workspace] > Render Layer > Object > Data
(...)

Reviewers: Campbell Barton, Julian Eisel
Differential Revision: https://developer.blender.org/D2842
2017-10-16 17:29:04 -02:00
Sergey Sharybin e4ab70da86 CMake: Add option to build against system-wide Glog
Similar to previous commit for Gflags.
2017-04-21 14:36:34 +02:00
Sergey Sharybin c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
Sergey Sharybin 66ef0b8834 Cycles: Fix compilation error of app after the include directories change 2017-03-29 16:54:41 +02:00
Sergey Sharybin 14f6e27f6a Cycles: Cleanup, style 2017-01-13 15:24:56 +01:00
Lukas Stockner a2ebc5268f Cycles: Refactor Progress system to provide better estimates
The Progress system in Cycles had two limitations so far:
 - It just counted tiles, but ignored their size. For example, when rendering a 600x500 image with 512x512 tiles, the right 88x500 tile would count for 50% of the progress, although it only covers 15% of the image.
 - Scene update time was incorrectly counted as rendering time - therefore, the remaining time started very long and gradually decreased.

This patch fixes both problems:
First of all, the Progress now has a function to ignore time spans, and that is used to ignore scene update time.
The larger change is the tile size: Instead of counting samples per tile, so that the final value is num_samples*num_tiles, the code now counts every sample for every pixel, so that the final value is num_samples*num_pixels.

Along with that, some unused variables were removed from the Progress and Session classes.

Reviewers: brecht, sergey, #cycles

Subscribers: brecht, candreacchio, sergey

Differential Revision: https://developer.blender.org/D2214
2016-12-03 05:02:21 +01:00
Brecht Van Lommel 111e2f5aba Fix T49904: Cycles standalone missing default generated texture coordinates. 2016-11-12 17:33:07 +01:00
Brecht Van Lommel 69288737ca Fix Cycles standalone not finding CPU device after recent changes. 2016-11-12 17:33:07 +01:00
Brecht Van Lommel 188ecee642 Fix T49985: cycles standalone using wrong socket names for XML reading. 2016-11-12 17:33:07 +01:00
Mai Lavelle 74bd809962 Cycles Standalone: Fix support for subdivision meshes
Changes from microdisplacement work broke previous support for subdivision
meshes, sometimes leading to crashes; this makes things work again. Files
that contain "patch" nodes will need to be updated to use meshes instead, as
specifying patches was both inefficient and completely unsupported by the new
subdivision code.
2016-08-24 10:39:00 -04:00
Mai Lavelle 4d1bf1472e Cycles Standalone: Fix building after microdisp changes 2016-08-10 14:08:13 -04:00
Lukas Stockner ef27d8ec5a Cycles Standalone: Add option to set the tile size from the command line
Since the optimal values depend on the device used, this option doesn't make much sense in the XML.
Therefore, it's now specified via the command line, just like the device itself.
2016-08-10 19:17:03 +02:00
Mai Lavelle c96ae81160 Cycles microdisplacement: ngons and attributes for subdivision meshes
This adds support for ngons and attributes on subdivision meshes. Ngons are
needed for proper attribute interpolation as well as correct Catmull-Clark
subdivision. Several changes are made to achieve this:

- new primitive `SubdFace` added to `Mesh`
- 3 more textures are used to store info on patches from subd meshes
- Blender export uses loop interface instead of tessface for subd meshes
- `Attribute` class is updated with a simplified way to pass primitive counts
  around and to support ngons.
- extra points for ngons are generated for O(1) attribute interpolation
- curves are temporally disabled on subd meshes to avoid various bugs with
  implementation
- old unneeded code is removed from `subd/`
- various fixes and improvements

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2108
2016-07-29 03:36:30 -04:00
Brecht Van Lommel 24d53f79b2 Fix Cycles debug build assert on some platforms, tighten checks to avoid this in the future. 2016-06-12 17:35:15 +02:00
Brecht Van Lommel 42aec3b355 Cycles: nodify shader nodes
Differential Revision: https://developer.blender.org/D2038
2016-06-11 20:32:24 +02:00
Sergey Sharybin d5220d23f9 Cycles: Fixes for recent refactor
- add_vertex() can be called from split_vertex() which does not guarantee
  to have properly pre-allocate arrays.

- Need to check whether Cycles is compiled with OSL in XML reader.
2016-05-31 15:32:31 +02:00
Brecht Van Lommel 11b0874db0 Code refactor: store ShaderNode enums as enum rather than ustring. 2016-05-29 20:30:16 +02:00
Brecht Van Lommel a70a435f28 Code refactor: centralize OSL node creation in shader manager. 2016-05-29 20:30:16 +02:00
Brecht Van Lommel 7cd18dda7d Fix debug mode assert in subd code after recent refactoring. 2016-05-29 20:30:16 +02:00
Brecht Van Lommel b94bfe4cd8 Code refactor: make ShaderNode match Node a bit more, reusing types and enums.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 15:49:15 +02:00
Brecht Van Lommel 98ad473324 Code refactor: nodify Cycles camera and fix some mistakes in XML node read.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 14:07:19 +02:00
Sergey Sharybin 6894bb0555 Fix T48334: Cycles standalone xml import of uv coordinates
In Cycle standalone, the xml import of uv's is done in a way that
a vertex could only have one unique uv coordinate. In practice it
is most of the time not the case.

Patch by Laurent Boiron, thanks!
2016-05-23 13:38:15 +02:00
Brecht Van Lommel 9b9921b765 Code refactor: nodify Cycles shader and lights.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel e7d13b8a1d Code refactor: nodify Cycles background and film.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel 0062d9f58c Code refactor: nodify Cycles integrator.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel ec51175f1f Code refactor: add generic Cycles node infrastructure.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:24 +02:00
Lukas Stockner ad14c471eb Cycles: Add XML parsing of MappingNodes to Cycles Standalone
Reviewers: dingto, sergey

Differential Revision: https://developer.blender.org/D2009
2016-05-19 21:28:57 +02:00
Brecht Van Lommel 0e8cd14dfe Code refactor: use shader pointers rather than shader indexes. 2016-05-17 21:39:16 +02:00
Martijn Berger 0a277f7428 Fix cycles-xml with OSL support after changes inroduced in 1422f0dd16 2016-05-07 10:50:21 +02:00
Sergey Sharybin bd7e4d2a3d Tweaks to the version string formation
Couple of things:

- No need to use string streams to format the version string,
  we can do it at compile time and don't bother with anything
  at runtime.

- Function declaration was wring and would have caused linking
  conflicts in cases when util_version.h was included from
  multiple places.

We should have an utility function to get Cycles version so
applications which are linked to Cycles dynamically can query
the version, but that can't be done as an inlined function in
header and would need to be a function properly exported to a
global symbol table (aka, be implemented in a .cpp file).
2016-04-13 09:45:26 +02:00
Thomas Dinges ed050753ce Add a version number to Cycles standalone
Now Cycles has its own versioning, that is mainly interesting for external projects, which integrate the engine.

We start with version 1.7.0. Reasons for that:

* The engine is too mature for a 1.0 release.
* We assume that Cycles inside of Blender 2.61 was version 0.1. We count upwards in 0.1 steps, therefore Cycles inside of Blender 2.77 would be 1.7.

We use a common versioning scheme here, with 3 decimals for the major, minor and patch level.

At the moment cycles --version can be used to display the version, easy to parse for external projects. The info will be added to the UI later aswell.
2016-04-13 09:45:23 +02:00
Thomas Dinges b8ca4819b2 Revert "Cycles: Remove the Preetham Sky model."
This reverts commit d91316dc67.
2016-04-05 12:25:54 +02:00
Thomas Dinges d91316dc67 Cycles: Remove the Preetham Sky model.
The improved Hosek / Wilkie model was added during my GSoC 2013 and the default since then.

The older model was kinda kept for compatibility, but after more than 2 years it's time to remove it.
The Hosek / Wilkie model is more realistic anyway, and people who really want a day / night transition can mix the Sky Shader with another one (e.g. color) and fade between the two.
2016-04-02 23:36:14 +02:00
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