Commit Graph

830 Commits

Author SHA1 Message Date
Antony Riakiotakis
2a0451dc46 Fix GLEW linking error on MinGW.
The __imp__ prefix on glew lib linking errors should have been a good indication: the code was looking for the glew dll.
Bypassed by adding GLEW_STATIC to the definitions.
2011-11-08 18:58:29 +00:00
Brecht Van Lommel
8cfc17c7cd Cycles Merge:
* It seems we have a problem compiling the CUDA kernel at runtime on Windows,
  will need to investigate more how to solve this best, CPU render should go
  fine though.
* Change OPENIMAGEIO to OPENIMAGEIO_ROOT_DIR on linux for consistency.
2011-11-08 17:53:49 +00:00
Brecht Van Lommel
5fd67a3ba5 Cycles: enable multi closure sampling and transparent shadows only on CPU and
CUDA cards with shader model >= 2 for now (GTX 4xx, 5xx, ..). The CUDA compiler
can't handle the increased kernel size currently.
2011-10-16 18:54:27 +00:00
Brecht Van Lommel
60bc63c7b8 Cycles: enable improved closure sampling, this should give less noise for mix, add
and glass shaders. How well this will work on non-fermi GPU's is unclear still, it's
a bit heavy on register usage.
2011-10-16 17:40:47 +00:00
Brecht Van Lommel
da8f71bffb Cycles: some tweaks to silence msvc assertions in debug mode. 2011-10-03 15:31:45 +00:00
Brecht Van Lommel
e9b967d05b Cycles: remove deprecated strict aliasing flag for opencl, fix missing update
modifying object layer in properties editor, and add memarena utility.
2011-09-19 11:57:31 +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
28cb4cb957 Cycles: reenable opencl binary caching on mac, it's not the cause of the problem. 2011-09-16 10:29:30 +00:00
Brecht Van Lommel
089abdecf7 Cycles: attempted fixes for OS X preview render problem, and disable
kernel cache there now as well since it seems to give issues there.
2011-09-14 22:26:55 +00:00
Brecht Van Lommel
ebc653463d Cycles:
* Fix missing update when editing objects with emission materials.
* Fix preview pass rendering set to 1 not showing full resolution.
* Fix CUDA runtime compiling failing due to missing cache directory.
* Use settings from first render layer for visibility and material override.

And a bunch of incomplete and still disabled code mostly related to closure
sampling.
2011-09-12 13:13:56 +00:00
Brecht Van Lommel
cfbd6cf154 Cycles:
* OpenCL now only uses GPU/Accelerator devices, it's only confusing if CPU
  device is used, easy to enable in the code for debugging.
* OpenCL kernel binaries are now cached for faster startup after the first
  time compiling.
* CUDA kernels can now be compiled and cached at runtime if the CUDA toolkit
  is installed. This means that even if the build does not have CUDA enabled,
  it's still possible to use it as long as you install the toolkit.
2011-09-09 12:04:39 +00:00
Brecht Van Lommel
9b31cba74e Cycles: some warning fixes, cpu device task tweaks, avoid unnecessary
tonemap in non-viewport render, and some utility functions.
2011-09-08 18:58:07 +00:00
Brecht Van Lommel
7d9d9fa976 Cycles: use workgroup size from opencl, attempt to fix issue with apple opencl. 2011-09-05 12:24:28 +00:00
Brecht Van Lommel
f3ee10ce5c Cycles: remove -Werror from opencl compile options, apple opencl on lion
seems to give "no previous prototype for function" warning, but it doens't
make much sense in opencl, seems like a compiler bug?
2011-09-05 08:23:01 +00:00
Brecht Van Lommel
db1664ed4c Cycles:
* Compute MD5 hash to deal with nvidia opencl compiler cache not recognizing
  changes in #included files, makes it possible to do kernel compile only
  once and remember it for the next time blender is started.
* Kernel tweak to compile with ATI/linux. Enabling any more functionality than
  simple clay render still chokes the compiler though, without a specific error
  message ..
2011-09-03 10:49:54 +00:00
Brecht Van Lommel
67030aaf84 Cycles: optimizations for instances in scene updates before render starts,
should load a non-trivial mesh instanced many times quite a bit faster now.
2011-09-02 16:15:18 +00:00
Brecht Van Lommel
1135875ab1 Cycles:
* Fix crash in light path node
* Fix struct alignment issue for cuda
* Fix issue with instances taking up too much memory
* Fix issue with ray visibility working incorrect on some objects
* Enable OpenCL always and remove option, it has no dependencies so may as well
* Refuse to load kernel if OpenCL version < 1.1, recent drivers are needed
* Better error handling for OpenCL device
* 3D views with rendered draw mode will now revert to wireframe on file load
2011-09-02 14:55:06 +00:00
Brecht Van Lommel
3c7dcd7a47 Cycles: compile opencl kernels in non-blocking thread, and don't crash on
build failure but show error message in status text.
2011-09-02 00:10:03 +00:00
Brecht Van Lommel
1f7ac51c36 Cycles: fix opencl device bug that crashed on windows. Now shows diffuse
meshes here on windows/nvidia.
2011-09-01 22:40:52 +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
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
18d709022e Cycles: clang build fixes. 2011-08-10 19:45:08 +00:00
Brecht Van Lommel
63d4bafff5 Cycles: some steps to getting OpenCL backend to compile. 2011-05-20 12:26:01 +00:00
Brecht Van Lommel
2996f08f84 Cycles: first batch of windows build fixes, not quite there yet. 2011-05-03 18:29:11 +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
Brecht Van Lommel
4e235c184b Blender modifications for Cycles integration.
Some notes about code status:

* The Blender modifications were fairly quickly put together, much more code
  polish and work is needed to get this to a state where it can be committed
  to trunk. Files created with this version may not work in future versions.

* Only simple path tracing is supported currently, but we intend to provide
  finer control, and more options where it makes sense.

* For GPU rendering, only CUDA works currently. The intention is to have the
  same kernel code compile for C++/OpenCL/CUDA, some more work is needed to
  get OpenCL functional.

* There are two shading backends: GPU compatible and Open Shading Language.
  Unfortunately, OSL only runs on the CPU currently, getting this to run on
  the GPU would be a major undertaking, and is unlikely to be supported soon.
  Additionally, it's not possible yet to write custom OSL shaders.

* There is some code for adaptive subdivision and displacement, but it's far
  from finished. The intention is to eventually have a nice unified bump and
  displacement system.

* The code currently has a number of fairly heavy dependencies: Boost,
  OpenImageIO, GLEW, GLUT, and optionally OSL, Partio. This makes it difficult
  to compile, we'll try to eliminate some, it may take a while before it
  becomes easy to compile this.
2011-04-27 14:36:02 +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