Brecht Van Lommel
54729df020
Cycles OSL: diffuse_toon and specular_toon closures. These are toon shaders with
...
a size parameter between 0.0 and 1.0 that gives a angle of reflection between
0° and 90°, and a smooth parameter that gives and angle over which a smooth
transition from full to no reflection happens.
These work with global illumination and do importance sampling of the area within
the angle. Note that unlike most other BSDF's these are not energy conserving in
general, in particular if their weight is 1.0 and size > 2/3 (or 60°) they will
add more energy in each bounce.
Diffuse: http://www.pasteall.org/pic/show.php?id=42119
Specular: http://www.pasteall.org/pic/show.php?id=42120
2012-12-19 21:17:16 +00:00
Brecht Van Lommel
06888b7beb
Cycles OSL minor optimizations: recycle shading context, don't do memory
...
allocations for trace data, avoid some virtual function calls. Only helps
a few percentages.
2012-12-15 10:18:42 +00:00
Brecht Van Lommel
8d4bd2cf3b
Cycles OSL: add diffuse_ramp closure in addition to phong_ramp.
2012-12-11 14:39:41 +00:00
Sergey Sharybin
cdcab16d12
Style cleanup: mixed tabs/spaces were used for indentation in osl_closures.h
2012-11-21 13:45:37 +00:00
Sergey Sharybin
b118512448
Cycles: solve -Wmissing-declarations for osl kernel
2012-11-21 13:41:47 +00:00
Brecht Van Lommel
209cd25745
Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like
...
a specular ramp shader. Note this is OSL only still, for experimenting.
Patch by Thomas.
2012-11-06 19:59:07 +00:00
Brecht Van Lommel
27d647dcf8
Cycles: 4 new nodes.
...
* Tangent: generate a tangent direction for anisotropic shading. Can be either
radial around X/Y/Z axis, or from a UV map. The default tangent for the
anisotropic BSDF and geometry node is now always radial Z, for UV tangent use
this node now.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Tangent
* Normal Map: generate a perturbed normal from an RGB normal map image. This
is usually chained with an Image Texture node in the color input, to specify
the normal map image. For tangent space normal maps, the UV coordinates for
the image must match, and the image texture should be set to Non-Color mode
to give correct results.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Normal_Map
* Refraction BSDF: for best results this node should be considered as a building
block and not be used on its own, but rather mixed with a glossy node using a
fresnel type factor. Otherwise it will give quite dark results at the edges for
glossy refraction.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Refraction
* Ambient Occlusion: controls the amount of AO a surface receives, rather than
having just a global factor in the world. Note that this outputs a shader and
not a color, that's for another time.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Ambient_Occlusion
2012-11-06 19:59:02 +00:00
Lukas Toenne
285947318f
Fix for OSL closure base class. The 'blur' method is not implemented and must be declared pure virtual ('= 0') to avoid compiler error (on Ubuntu 12.04, gcc 4.6.3).
2012-10-21 09:10:47 +00:00
Brecht Van Lommel
9a1c1f132d
Cycles OSL: most closure code is now shared between OSL and SVM. Also fix
...
transmission pass and filter glossy option.
The BSDF closure class is now more similar to the SVM closures, and includes
some flags and labels that are needed to properly categorize the BSDF's for
render passes. Phong closure is gone for the moment, needs to be adapated to
the new structure still.
2012-10-20 12:18:00 +00:00
Lukas Toenne
78978dcd80
Fix for a case of 'static initialization fiasco' with OSL closure variables. The parameter lists are using OIIO::TypeDesc static standards, which are also static variables. With static OSL libraries these are not initialized when the closure parameter lists are initialized, so OSL rejects the closure types.
...
Putting static initialization into functions works just as well, but ensures the OIIO::TypeDesc access is delayed until initialization is complete.
2012-10-06 16:28:02 +00:00
Thomas Dinges
3f7b4916e9
OSL Backend:
...
* Added the Phong BRDF from the inbuilt OSL shader library.
This can be used in OSL shaders only for now:
* phong(normal N, float exponent)
* phong_ramp(normal N, float exponent, color colors[8]
2012-09-05 23:22:36 +00:00
Brecht Van Lommel
e731ffb648
Cycles: Oren-Nayar BSDF support. This is not a separate shader node, rather it
...
is available through the Roughness input on the Diffuse BSDF.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Diffuse
Patch by Yasuhiro Fujii, thanks!
2011-11-14 17:31:47 +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