rays from the OSL shader. The "shade" parameter is not supported currently, but
attributes can be retrieved from the object that was hit using the
getmessage("trace", ..) function.
As mentioned in the OSL specification, this function can't be used instead of
lighting, the main purpose is to allow shaders to "probe" nearby geometry, for
example to apply a projected texture that can be blocked by geometry, apply
more “wear” to exposed geometry, or make other ambient occlusion-like effects.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL#Trace
Example .blend and render:
http://www.pasteall.org/blend/17347http://www.pasteall.org/pic/show.php?id=40066
* Moved kernel/osl/nodes to kernel/shaders
* Renamed standard attributes to use geom:, particle:, object: prefixes
* Update stdosl.h to properly reflect the closures we support
* Fix the wrong stdosl.h being used for building shaders
* Add geom:numpolyvertices, geom:trianglevertices, geom:polyvertices attributes
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.
1) object_fetch_transform_motion omits the per-object motion blur test (r51394), must use object_fetch_transform_motion_test.
2) KernelCamera.ndctoworld has been removed (r51402), do transform invert directly.
Background attributes are used as fallback in two cases:
1) Non-object light samples (e.g. lamp shaders)
2) Fallback if no implicit object attribute can be found
* std::particle_index
* std::particle_age
* std::particle_lifetime
* std::particle_location
* std::particle_size
* std::particle_velocity
* std::particle_angular_velocity
Just as with SVM the rotation state attribute is currently disabled due to lack of a proper quaternion or matrix type in Cycles nodes.
* std::object_location
* std::object_index
* std::material_index
* std::object_random
Other object-based attributes can be added for particle info in the same way.
Fixes for API changes in OSL RendererServices:
* Added two new required get_matrix methods, from OSL RendererServices (otherwise the constructor fails). The two new matrix methods probably still need an implementation.
* Removed deprecated "get_pointcloud_attr_query" and "pointcloud". There are two new routines for pointclouds, function headers for those are there.
* Removed the (unused) PARTIO code parts from OSL. It was marked as not tested / not working, and due to the api changes here broken for sure. Code is still in svn history if needed.