Commit Graph

40 Commits

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