PhotoRealistic RenderMan 10.0 |
||
Release NotesDecember, 2001 |
These release notes describe significant changes and enhancements to the RenderMan® Toolkit for the 10.0 release over the 3.9 release.
PRMan now supports a new class specifier for PointsPolygons, PointsGeneralPolygons, and SubdivisionMesh primitives: facevarying. The purpose of this new class specifier is to easily allow a vertex shared by two faces to have different values for variables such as N, s, or t. More information on this class specifier is detailed in the RI Spec.
Several important limitations have been removed from the arbitrary output variable functionality:
Display "+aov2.tif" "tiff" "Nn" "filter" ["gaussian"] "filterwidth" [3 3]
In addition, three special filters ("min", "max", "average") may be specified for arbitrary outputs. These filters are useful when dealing with variables which cannot be composited in the normal manner.
As well, bugs which prevented the use of multiple frames, each with arbitrary output variables, in a single RIB file have been fixed.
Finally, inline declarations now work in arbitrary output displays, so you may now use:
Display "+image.tif" "tiff" "varying float myvar"
More information on the new AOV functionality may be found in User Manual.
In addition to the proprietary Pixar texture file format, PRMan now accepts TIFF images as a source of texture data for texture, shadow and environment calls. These are tiled, mip-mapped TIFFs with special tags; thus, they are usually prepared by txmake or the RiMakeTexture call.
The choice of default texture format created in this way is controlled by the /prman/textureformat setting in rendermn.ini, which defaults to "tiff" (the now deprecated Pixar format can still be chosen by setting this to "pixar"). The output format used can be overridden on a per texture basis using the -format flag to txmake, or the "format" parameter passed to RiMakeTexture or the shadow display driver.
Light and object handle representations in RIB have been changed from integers to strings. This allows applications to guarantee that light and object handles do not conflict between multiple RIB files which reference each other (i.e. via ReadArchive). For backwards compatibility with older RIB files, integers are still supported and will be converted to their string representation. Therefore, the following RIB statements are equivalent:
LightSource 57 "spotlight" LightSource "57" "spotlight"
If your application uses the RIB client library, instead of incrementing an integer counter for each light, the RIB library will now use an algorithm that generates a unique ID, which is guaranteed to be unique across all RIB files and all machines. Applications which wish to override this automatic assignment of handles may pass the __handleid parameter to the LightSource call:
RtString id = "mylight"; RiLightSource("spotlight", "__handleid", &id);
It is recommended that application writers who override the automatic assignment use a facility which also generates unique identifiers.
catrib now no longer discards light or object handle IDs which it does not recognize. Thus, you may now catrib a RIB file which contains an Illuminate statement which refers to a light which has not already been defined.
In prior releases, the renderer ignored token-value pairs for options and attributes which it did not know about. In PRMan 10.0, you may now define arbitrary token-value pairs for the user attribute and option. All token-value pairs associated with this attribute and option will be pushed and popped on the graphics stack, like all other attributes that PRMan recognizes.
Example:
RtFloat myattribute = 3.0f; RtString myoption = "foo"; RiOption("user", "uniform string myoption", (RtPointer)&myoption, RI_NULL); RiAttribute("user", "uniform float myattribute", (RtPointer)&myattribute, RI_NULL);
In RIB form:
Option "user" "uniform string myoption" [ "foo" ] Attribute "user" "uniform float myattribute" [ 3.0 ]
In the shading language, the attribute and option shadeops have been extended to allow these arbitrary token-value pairs to be queried. To query the user defined attribute defined above, you may use:
float myattribute; string myoption; option("user:myoption", myoption); attribute("user:myattribute", myattribute);
The renderer now has four new Interface calls to support conditional evaluation of RIB: RiIfBegin, RiElseIf, RiElse and RiIfEnd. This functionality allows for a single RIB archive to be written once, and then reused but with certain aspects changed based on the current context in which it has been instantiated.
The RI calls themselves, as well as the syntax of the conditions recognized by the RiIfBegin and RiElseIf statements, are described in the RI Spec.
The new RiScopedCoordinateSystem interface call allows the bindings of named coordinate systems to be pushed and popped along with the attribute stack. This is different behaviour from RiCoordinateSystem, which maintained the coordinate systems in an unscoped global list.
The RiBlobby primitive now recognizes a new special parameter: __threshold, which is a constant float (one value for the entire RiBlobby call). The value specified for __threshold will be added to the threshold value used by the field function.
In addition to disk based RIB archives, the renderer now supports the use of inline archives of RI calls. An inline archive is created via the RiArchiveBegin call, which returns a RtArchiveHandle:
RtArchiveHandle handle = RiArchiveBegin(RI_NULL, RI_NULL); ... RiArchiveEnd();
In RIB form:
ArchiveBegin id ... ArchiveEnd
An inline archive can be referenced using ReadArchive, which has been extended to support both inline and disk based RIB archives:
ArchiveBegin "uid" ... ArchiveEnd ReadArchive "uid"
In RIB form, inline archives use unique handles as described above.
A new command line parameter allows the renderer to pick up where it left off when a render fails:
prman -recover 1 ...
In conjunction with a display driver which supports the checkpointing facility, this parameter causes the renderer to check for a partially completed image and attempt to render only the remainder of that image.
The display driver interface has been extended to allow the use of custom drivers which support this new checkpointing functionality. Note that of the drivers currently shipped with PRMan, only the TIFF driver supports checkpointing.
PRMan now supports the new RiContext call, as described in the RenderMan Interface Specification 3.2. Implementation specific notes about the Context call may be found in the RI Spec.
PRMan 10.0 supports a new mode of dicing on NURBs, which computes micropolygon sizes using an unoriented raster space metric rather than the standard screen aligned raster metric. This is useful in situations where it is important that the dicing rate on an object doesn't change due to camera orientation. For example, it can help in situations where objects which are viewed edge on result in large micropolygons (but small in screen space), which are then displaced leading to micropolygons which are large in screen space.
The default dicing criteria is the screen-oriented raster space. This can be turned off to use the new unoriented metric as follows:
Attribute "dice" "rasterorient" [0]
The ability to turn off the oriented dicing metric is only implemented on NURB primitives.
This new feature, added to the 3.2 Specification, makes it easy to cull portions of a scene by specifying a series of arbitrarily oriented clipping planes:
RtVoid RiClippingPlane(RtFloat Nx, RtFloat Ny, RtFloat Nz, RtFloat Px, RtFloat Py, RtFloat Pz); ClippingPlane Nx Ny Nz Px Py Pz
The provided normal and position describe a plane cutting the scene in half, and the half opposite the normal is culled entirely. If you specify multiple clipping planes, they are applied one after the other.
Like RiClipping, RiClippingPlane must appear before RiWorldBegin. Clipping planes interact properly with camera motion blur, but RiClippingPlane itself may not appear within a motion block.
Soft shadows have been sped up by 2 to 3 times.
In prior releases, the minmax shadow files required for soft shadows could only be created by rendering with the zfile driver, and then converting the result to a shadow texture. In 10.0, the shadow display driver now supports the direct creation of minmax maps. This is enabled by passing the minmax argument to the RiDisplay call with the value 1.0:
RiInt minmax = 1; RiDisplay("shadow.tex", "shadow", RI_Z, "minmax", &minmax, RI_NULL);
The netrender client will now handle TxMakeShadow in the minmax case correctly.
The Rx library, introduced in 3.9, allows your shader and primitive procedural DSOs access to renderer internals. It has now been extended with new functions, declared in rx.h:
int RxAttribute (const char *name, void *result, int resultlen, RxInfoType_t *resulttype, int *resultcount);
This Rx call duplicates the functionality of the attribute() shadeop.
int RxEnvironment(RtString filename, RtInt firstchannel, RtInt nchannels, RtPoint dir0, RtPoint dir1, RtPoint dir2, RtPoint dir3, RtFloat *result, ...); int RxShadow(RtString filename, RtInt firstchannel, RtPoint P0, RtPoint P1, RtPoint P2, RtPoint P3, RtFloat *result, ...); int RxSourceShadow(RtString filename, RtInt firstchannel, RtPoint P0, RtPoint P1, RtPoint P2, RtPoint P3, RtPoint sourceP0, RtPoint sourceP1, RtPoint sourceP2, RtPoint sourceP3, RtFloat *result, ...); int RxTexture(RtString filename, RtInt firstchannel, RtInt nchannels, RtFloat s0, RtFloat t0, RtFloat s1, RtFloat t1, RtFloat s2, RtFloat t2, RtFloat s3, RtFloat t3, RtFloat *result, ...);
PRMan's texture map functions are now available to DSOs in four point versions of the corresponding shading language shadeops.
int RxOption (const char *name, void *result, int resultlen, RxInfoType_t *resulttype, int *resultcount);
This Rx call duplicates the functionality of the option() shadeop.
int RxRendererInfo (const char *name, void *result, int resultlen, RxInfoType_t *resulttype, int *resultcount);
This Rx call duplicates the functionality of the rendererinfo() shadeop.
More information on the Rx library may be found in Section 8 of the User Manual.
A new Option has been added which specifies an offset to be added to motion blur times:
Option "shutter" "offset" [float frameoffset]
The specified offset is added to all time values specified in subsequent RiShutter and RiMotionBegin calls. This is a useful Option to use when using a sequence of RIB files which change the shutter times, while repeatedly referring to the same RIB archive containing motion blurred geometry. Without the new Option this would be difficult because the MotionBegin times in the archive would need to match the Shutter times: either the archive would have to be regenerated with each frame, or the Shutter and MotionBegin would always need to be locked at the same range for all frames (which would mean that the time shading variable is identical for each frame as well).
With the new Option, you may now keep a single RIB archive with the MotionBegin times starting at zero, and then from each referring RIB define an offset, prior to ReadArchive:
# # produces RIB with time = 0 -> 0.5 # Shutter 0 0.5 Option "shutter" "offset" [0] FrameBegin 0 ReadArchive "geometry.rib" FrameEnd # # produces RIB with time = 1 -> 1.5 # Shutter 0 0.5 Option "shutter" "offset" [1] FrameBegin 2 ReadArchive "geometry.rib" FrameEnd
Previous versions of netrender used a default bucketstride of "2 2", meaning that each processor would render a 2-bucket by 2-bucket portion of the screen. Because bucket sizes tend to be small, there was typically a great deal of redundant shading being done by each netrender process, and an undue amount of per-stride overhead. PRMan now attempts to use a larger bucket stride in general, and to adjust the stride to match the number of processors being used. This results in much better netrender efficiency.
In addition, the reliability of netrender has been generally improved.
New built-in pixel filters have been added to PRMan:
The recommended filter from Don Mitchell and Arun Netravali's 1988 Siggraph paper on reconstruction filters - the separable version of the (1/3, 1/3) filter.
A separable version of the catmull-rom filter.
A separable 4 term (-92 dB) Blackman-Harris filter.
Light shaders are now classified at compile-time whether they will contain ambient contributions or not, thus permitting the renderer to refrain from executing certain lights when only the ambient contribution is being computed. This classification is made based on the presence of illuminate or solar blocks. In order to better control this automatic classification, a new ambience() keyword has been added, as described in the RI Spec.
The textureinfo shadeop now supports an additional data name "exists", used to determine the existence of a texture map, as described in the RI Spec.
As described in the 3.2 specification, the shadername shadeop has been made more general - it can now return the names of all shaders attached to the geometry:
shadername() | Returns the name of the shader currently executing. This is compatible with the previous behavior. |
shadername("surface") | Returns the name of the surface shader that is currently bound to the object. |
shadername("atmosphere") | Returns the name of the atmosphere shader that is currently bound to the object. |
shadername("displacement") | Returns the name of the displacement shader that is currently bound to the object. |
shadername("lightsource") | Returns the name of the light shader that is currently bound to the object. This function must be called from within an illuminance() loop, and returns the corresponding light source as it loops over each light. If it is called this way from outside an illuminance loop, it generates a runtime error. |
If there is no shader of that type, the string "null" is returned.
The option() shadeop now gives access to three new values:
option("Frame", result) | Requires a scalar float result, and returns the current frame number as specified in RiFrameBegin. |
option("FrameAspectRatio", result) | Requires a scalar float result, and returns the frame aspect ratio. |
option("CropWindow", result) | Requires result to be an array of four floats, and returns the boundaries of the crop window. |
option("DeviceResolution", result) | Requires result to be an array of three floats, and returns the resolution in x and y and the pixel aspect ratio. These are usually the three numbers passed to Format, but may be different when FrameAspectRatio or ScreenWindow are non-square. |
Texture calls accessing shadow maps now interpret the meaning of clamp-mode 'black' differently. They now return 'infinity' (a very large number) when accessed off the boundary of the map. Regular (non-shadow) files should behave as normal.
The new ignoreabove option allows texture filtering to ignore values over a user specified threshold. The option specifies a single float as an argument. All values which exceed the specified value are not averaged into any filtering that is done. This is mostly useful for non-mipped map floating point shadow or zfile textures. Often infinite values cause strange shadow behavior along silhouette edges, this may help alleviate some of this.
Division of a matrix by a matrix or a float now works correctly.
String constant concatenation (using C syntax) is now supported:
string s = "Hello" "world";
As specified in the 3.2 specification, shader functions may now be polymorphic on return type. This means you can define functions with the same name that differ only in the return type, and the compiler will choose the appropriate function based on calling context:
color func(float c;) { return color (c, c, c); } float func(float c;) { return c*0.5; } vector func(float c;) { return vector(c, 0, c); } surface test(float c = 0.0;) { float j = func(5); Ci = func(c); Ci += color func(j); Ci += float func(j); }
The shader compiler now correctly distinguishes the point, vector, and normal types when choosing a polymorphic user function.
The renderer is now able to check whether displacement shaders displace an object by more than the displacement bound, and will warn accordingly (with R56004 or R56005) on a per primitive basis as needed.
As well, if a primitive displaces by less than half the displacement bound it declares, a warning will be generated into the statistics output.
RiBegin("|catrib")sends the RIB output to the catrib program.
RiArchiveRecord (RI_VERBATIM, ...)In this mode, the resulting string is inserted into the RIB stream as-is (i.e. without any leading '#' characters, as is the case for the other modes). A trailing newline will be added if the string does not already end with one.
Pixar Animation Studios
|