|
Slim templates - output varying variables
Cutter now declares varying output variables properly when it converts
RenderMan Shading Language source files to Slim templates. For example,
Cutter will convert the following shader,
displacement test( float Km = 0.1;
output varying float hump = 0)
{
normal n = normalize(N);
hump = noise(P);
P = P - n * hump * Km;
N = calculatenormal(P);
}
to the Slim template shown on the right. For more information about Cutter's
ability to convert RSL to Slim templates refer to
converting RSL to a SLIM template.
Information popups
Many of the items found in the Preferences window now have popup help
buttons. In previous versions three preferences had to be set for the
RenderMan documentation. In this version only one path is required.
Quick link to RSL Documentation
The help menu on the Rman Tools menu bar now points to a slightly
different selection of quick links. Some documents are nolonger available
in release 6.5 of RAT. A link to "Subsurface Scattering" has been added
as well as a link to Pixars index page of RSL functions.
|
|
## MTOR SLIM template file generated by Cutter version 4.4.6
## on 9.30.20050:13:28. Cutter software by Malcolm Kesson
## (all rights reserved).
slim 1 extensions Cutterdb {
extensions Cutter cutr {
# A template is an appearance that is used to generate functions and
# is fundamental to Slim's shader creation features. Templates are
# containers of properties.
template displacement Test {
description {No shader description available}
# These items have been copied from Pixar's displacement.slim
# document. I have omitted their "DoDisplacement" parameter
ribattribute float displacementbound {
label "Displacement Bound"
description "This number represents the maximum displacement
in shaderspace that your surface will undergo. Be very
careful with this parameter as it can dramatically influence
rendering times. In particular, make SURE to set this to
0 (zero) if you aren't performing any displacement."
default 0
range {0 100 .001}
subtype vslider
}
parameter float UseShadingNormals {
label {UseShadingNormals}
description "Directly using the normal returned from calculatenormal()
causes polygons to appear faceted. This parameter adds the offset
of the original shading normal to the calculated normal. This
re-smooths the polygons. For more information refer to,
http://accad.osu.edu/~smay/RManNotes/WritingShaders/disp.html#smooth
by Steve May."
default 0
subtype switch
}
# Parameters are used to collect all information associated
# with a single parameter of an appearance.
parameter float Km {
description {No description}
label {Km}
detail varying
default 0.1
subtype slider
range {0 1}
}
parameter float hump {
display hidden
access output
detail varying
default 0
provider primitive
}
RSLMain {
generate
output "float Km = [getvar Km];"
output "normal n = normalize(N);"
output "hump = noise(P);"
output "P = P - n * hump * Km;"
output "N = calculatenormal(P);"
output "if([getvar UseShadingNormals] != 0) { "
output " normal _dnormal = normalize(N) - normalize(Ng);"
output " N = calculatenormal(P) - _dnormal;"
output " }"
} } } }
|
|