Interface to Alias render options.
#include <AlRender.h> class AlResolutionItem : public AlLinkItem AlResolutionItem* nextItem() AlResolutionItem* prevItem() char* name; int x, y; double aspect; class AlRender // general settings static Source render(); static statusCode setRender( Source ); static boolean animation(); static statusCode setAnimation( boolean ); static AnimationRange animationRange(); static statusCode setAnimationRange( AnimationRange ); static statusCode animationRange(double&start, double&end, double&by ); static statusCode setAnimationRange(double start, double end, double by); static Scope hiddenLineParms(); static statusCode setHiddenLineParams( Scope ); static Scope qualityScope( Quality ); static statusCode setQualityScope( Quality, Scope ); static Quality qualityType( Quality ); static statusCode setQualityType( Quality, Scope ); // Global Quality Parameters: Subdivision & AntiAlias for low,med,high class Subdivision { static Type type( Quality ); static statusCode setType( Quality, Type ); static int uniformU( Quality ); static statusCode setUniformU( Quality, int ); // 1..256 static int uniformV( Quality ); static statusCode setUniformV( Quality, int ); // 1..256 static int adaptiveMin( Quality ); static statusCode setAdaptiveMin( Quality, int ); // 1..128 static int adaptiveMax( Quality ); static statusCode setAdaptiveMax( Quality, int ); // 1..128 static double adaptiveThreshold( Quality ); static statusCode setAdaptiveThreshold( Quality, double ); // 0..1 }; class AntiAlias { static int min( Quality ); static statusCode setMin( Quality, int ); // 0..6 static int max( Quality ); static statusCode setMax( Quality, int ); // 0..6 static double threshold( Quality ); static statusCode setThreshold( Quality, double ); }; class Limits { static boolean createPreview( Quality ); static statusCode setCreatePreview( Quality, boolean ); static int maxReflections( Quality ); static statusCode setMaxReflections( Quality,int ); // 0..10 static int maxRefractions( Quality ); static statusCode setMaxRefractions( Quality,int ); // 0..10 static int maxShadowLevels( Quality ); static statusCode setMaxShadowLevels( Quality,int ); // 0..10 static int subdivideRecurse( void ); static statusCode setSubdivideRecurse( int ); // 1..3 }; class Composite { static boolean enabled(); static statusCode setEnabled( boolean ); static double coverageThreshold(); static statusCode setCoverageThreshold( double ); // 0..1 }; class Blur { static boolean postFilter(); static statusCode setPostFilter( boolean ); static int postCenter(); static statusCode setPostCenter( int ); // 0..20 static int postAdjacent(); static statusCode setPostAdjacent( int ); // 0..20 static int postDiagonal(); static statusCode setPostDiagonal( int ); // 0..20 static boolean motionBlur(); static statusCode setMotionBlur( boolean ); static double shutterAngle(); static statusCode setShutterAngle( double ); // 1..360 }; class Misc { static GeometrySource geometrySource(); static statusCode setGeometrySource( GeometrySource ); static boolean textures(); static statusCode setTextures( boolean ); static boolean skeletons(); static statusCode setSkeletons( boolean ); static boolean noTransparencyInDepth(); static statusCode setNoTransparencyInDepth( boolean ); static double transparency(); static statusCode setTransparency( double ); // 0..1 static boolean keepNonglowedImage(); static statusCode setKeepNonglowedImage( boolean ); static boolean spotLightDepthMaps(); static statusCode setSpotLightDepthMaps( boolean ); static boolean depthMapsInMemory(); static statusCode setDepthMapsInMemory( boolean ); static boolean attenuateTransparency(); static statusCode setAttenuateTransparency( boolean ); }; class Image { static Format format(); static statusCode setFormat( Format ); static DepthFormat depthFormat(); static statusCode setDepthFormat( DepthFormat ); static Fields fields(); static statusCode setFields( Fields ); static boolean oddFirst(); static statusCode setOddFirst( boolean ); static boolean ignoreFilmGate(); static statusCode setIgnoreFilmGate( boolean ); static double gammaCorrection(); static statusCode source( const char *, boolean &, boolean &, boolean & ); static statusCode setSource( const char *, boolean, boolean, boolean ); static statusCode setGammaCorrection( double ); // 0..2 static boolean XYRatioLock(); static statusCode setXYRatioLock( boolean ); static int resolutionX(); static statusCode setResolutionX( int ); // 0..2048 static int resolutionY(); static statusCode setResolutionY( int ); // 0..2048 static double aspectRatio(); static statusCode setAspectRatio( double ); // 0..1 static statusCode readResolutions( AlList* &list ); }; class HiddenLine { static boolean useFillColor(); static statusCode setUseFillColor( boolean ); static statusCode fillColor( double &, double &, double &); static statusCode setFillColor( double, double, double ); // 0..255 static statusCode lineColor( double &, double &, double &); static statusCode setLineColor( double, double, double ); // 0..255 static int patchLinesU(); static statusCode setPatchLinesU( int ); // 0..8 static int patchLinesV(); static statusCode setPatchLinesV( int ); // 0..8 }; class Particle { static boolean show(); static statusCode setShow( boolean ); static int simulationSubsteps(); static statusCode setSimulationSubsteps( int ); // 1..8 static int framesPerSecond(); static statusCode setFramesPerSecond( int ); // 1..30 };
This class encapsulates all access to the Alias render options. Every value in the window can be retrieved and set. Please see the Menu Book for additional information on these parameters and their functions.
Returns the source that is currently being rendered.
Sets the source to kAll or kActive. Note: this setting is overridden by the store_active flag in the AlUniverse::writeSDL() method.
< source - new value, kAll or kActive
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns TRUE if animation is currently being rendered.
Sets if animation should be rendered.
sSuccess - value was set
Returns the animation type range that is being used.
Sets the type of animation range to kGlobalRange, kMinMax or kTimeSlider.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Retrieves the animation range endpoints and step size. This is only valid for min/max and global.
start - start of the range
end - end of the range
by - step size
sSuccess - operation succeeded
sFailure - operation failed
sInvalidObject - the current animationRange is not MinMax or Global
Sets the animation range. This is only valid for kGlobalRange.
start - start of the range (must be >=0)
end - end of the range (must be >= start)
by - step size (must be >0 )
sSuccess - operation succeeded
sFailure - operation failed
sInvalidObject - the current animationRange is not Global
sInvalidArgument - by was negative, start was negative or end < start
Returns the current hidden line parameter setting.
Sets the hidden line parameter option in the rendering. Scope is either kPerObject or kGlobal.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the current rendering quality scope.
Sets the rendering quality scope. Scope is either kPerObject or kGlobal.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the rendering quality type.
Sets the rendering quality type. Quality is one of kLow, kMedium or kHigh.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the rendering subdivision type of the quality parameter.
Sets the rendering subdivision type. The type is either kAdaptive or kUniform and is applied to the quality parameter selected.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the uniform U value for quality parameter.
Sets the uniform U value for the quality parameter. The uniform U value is used to subdivide patches into triangles without taking the curvature into account.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..256
Returns the uniform V value for the quality parameter.
Sets the uniform V value for the quality parameter. The uniform Vvalue is used to subdivide patches into triangles without taking the curvature into account.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..256
Returns the adaptive minimum for the quality parameter.
Sets the adaptive minimum of the subdivision for the quality parameter. This value determines the minimum number of subdivisions between CVs in both U and V.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..128
Returns the adaptive maximum of the quality parameter.
Sets the adaptive maximum of the subdivision for the quality parameter. This value determines the maximum number of subdivisions between CVs in both U and V.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..128
Returns the adaptive threshold of the quality parameter.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..1
Returns the anti-alias minimum for the quality parameter.
Sets the anti-alias minimum for the quality parameter. The anti-alias minimum determines the minimum number of subdivisions per pixel.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..6
Returns the anti-alias maximum for the quality parameter.
Sets the adaptive maximum for the quality parameter. The adaptive maximum determines the maximum number of subdivisions per pixel.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..6
Returns the anti-alias threshold for the quality parameter.
Sets the anti-alias threshold for the quality parameter. If the samples of colors at each corner of a pixel is over threshold then subdivision is used to do a finer grain of anti-aliasing.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..1
Returns if the preview option is selected for the quality parameter.
Sets the preview option for the quality parameter. If preview is turned on, a postage stamp sized raytraced image is calculated.
sSuccess - value was set
Returns the maximum number of reflections allowed for the quality parameter.
Sets the maximum number of reflections for the quality parameter. This controls the number of levels that reflected rays will be raytraced.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..10
Returns the maximum number of refractions allowed for the quality parameter.
Sets the maximum number of refractions allowed for the quality parameter. This controls the number of levels of refracted rays that will be raytraced.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..10
Returns the maximum number of shadow levels allowed for the quality parameter.
Sets the maximum number of shadow levels allowed for the quality parameter. This controls the number of levels of shadows rays that will be raytraced.
sSuccess - the value was set
sInvalidArgument - the value was not in the range -1..10
Returns the current subdivide recurse setting.
Sets the subdivide recurse setting to num. This setting provides a limit on the number of times that spatial subdivision is recursively applied to the scene.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..3
Returns if composite rendering is enabled.
Sets composite rendering to on or off. If this option is on, then objects that are rendered are not anti-aliased against the background.
sSuccess - value was set
Returns the composite rendering coverage threshold.
Sets the composite rendering coverage threshold to cover. This setting determines the number of subsamples required for a pixel as a whole to be considered a part of an object and not a part of the background.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..1
Returns if motion blur post filter option is set.
Sets the motion blur post filter option to on or off. Setting this option to on provides additional anti-aliasing after the regular rendering process.
sSuccess - value was set
Returns the blur center pixel weight.
Sets the blurring center pixel weight.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..20
Returns the blur edge pixel weights.
Sets the blur edge pixel weights.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..20
Returns the blur corner pixel weights.
Sets the blur corner pixel weights.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..20
Returns TRUE if motion blur is on.
Sets the motion blur to be on or off. Turning this option on produces smoother animations.
sSuccess - value was set
Returns the current shutter angle.
Sets the current shutter angle if blur is on. The larger the shutter value the greater the blur.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..360
Returns the current geometry source.
Sets the current geometry source to either kModeler or kSDLFile.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns TRUE if textures will be used in the rendering.
Sets if textures will be used in the rendering.
sSuccess - value was set
Returns TRUE if skeletons are being displayed in the rendering.
Sets if skeletons are being used in the rendering.
sSuccess - value was set
Returns TRUE if the "no transparency in depth" option is on.
Sets the "no transparency in depth map" option. If this option is set, transparent objects appear in the depth map file.
sSuccess - value was set
Returns the transparency percentage.
Sets the transparency percentage. Objects with a transparency greater than or equal to the ’trans’ value will not appear in the depth file.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..1
Returns TRUE if the renderer will not keep the post processed non glowed image.
Sets the renderer to keep the non glowed image in the rendering post process if parameter on is TRUE.
sSuccess - value was set
Returns TRUE if shadow depth maps are being written to disk.
Sets if shadow depth maps should be written to disk based.
sSuccess - value was set
Returns TRUE if depth maps are kept in memory.
Sets if depth maps are to be kept in memory. If set to TRUE, then the depth map is not recomputed for subsequent frames.
sSuccess - value was set
Returns FALSE if attenuate transparency is on.
Sets attenuate transparency to off to make totally transparent objects appear opaque.
sSuccess - value was set
Returns the image format.
Sets the image format to one of kAlias, kSGI, kTIFF, kTIFF16, kRLA, kFIDO or kHARRY.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the depth format.
Sets the image depth format to either kDepthAlias or kDepthComposer.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns the images fields.
Sets the image fields to one of kOff, kEven, kOdd or kBoth.
sSuccess - value was set
sInvalidArgument - value was not a valid enum member
Returns TRUE if odd first ordering was chosen for field ordering.
Sets fields to be ordered by odd first if the parameter oddFirst is TRUE. If oddFirst if FALSE then field ordering will be even first.
sSuccess - value was set
Returns TRUE if the rendered image will ignore film gates.
Sets ignoreGate to TRUE if the region outside of the filmback should not be rendered.
sSuccess - value was set
Returns the current gamma correction value.
Sets the gamma correction value. Gamma correction is used to alter images by specified factors in each channel to correct the rendered color.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..2
Returns the Image File Output toggles in the camera named camName.
< camName - name of the camera
> image - Image toggle
> mask - Mask toggle
> depth - Depth toggle
sSuccess - the values were retrieved
sInvalidArgument - camName was NULL
sFailure - camera of the given name was not found
Sets the Image File Output toggles in the camera named camName.
< camName - name of the camera
< image - Image toggle
< mask - Mask toggle
< depth - Depth toggle
sSuccess - the values were set
sInvalidArgument - camName was NULL
sFailure - camera of the given name was not found
Returns TRUE if XY ratio lock is on.
Sets the lock on the X/Y pixel ratio. If the lock is on, then doubling the X resolution will also double the Y resolution. If the lock is off, X and Y resolutions are independent.
< ratioLock - new value of the lock
Returns the X resolution of the image.
Sets the X resolution of the image.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..32767
Returns the Y resolution of the image.
Sets the Y resolution of the image.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..32767
Returns the aspect ratio of the image.
Sets the aspect ratio of the image.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..1
Returns TRUE if all surfaces in the scene are to be filled with the fill color specified by the setFillColor() method.
Sets the usage of fill colors for surfaces within a scene.
sSuccess - value was set
Returns the current fill colors.
sSuccess - the method succeeded
Sets the fill color to r,g,b.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..255
Returns the line color.
sSuccess - the line color was returned
Sets the color of lines for all surfaces within a scene to r,g,b.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..255
Returns the U patch lines for a surface.
Sets the number of U patch lines for a surface in a scene. This controls the number of lines that are shown in the U direction of each surface in a scene. Setting this to 0 will cause only edges of a surface to be displayed.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..8
Returns the V patch lines for a surface.
Sets the number of V patch lines for a surface in a scene. This controls the number of lines that are shown in the V direction of each surface in a scene. Setting this to 0 will cause only edges of a surface to be displayed.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 0..8
Returns TRUE if particles will be shown in the scene.
Sets if particles should be rendered in the scene.
sSuccess - value was set
Returns the particle simulation substeps.
Sets the particle simulation substeps. A higher number produces a more accurate animation but also increases rendering time.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..8
Returns the particle frames for second setting.
Sets the particle frames per second value. This value is used to specify how fast images will be displayed from the final animation. This value is also used to calculate the correct amount of force and gravity to apply to particles during the simulation.
sSuccess - the value was set
sInvalidArgument - the value was not in the range 1..30
Returns a list of resolutions as name,x,y,aspect. These are the entries that are found in the ’predefined’ area of the render globals area.
> resolutions - list of resolutions
sSuccess - a list of resolutions was returned
sFailure - the list could not be allocated
A structure used to transfer render information.
#include <AlRenderInfo.h>
An AlRenderInfo structure is used to store render information for an object. Before setting the AlRenderInfo for an object, it is necessary to retrieve the current values from the object.
For example:
// No error checking is done here for brevity in the example. AlRenderInfo renderInfo; newSurface->renderInfo( renderInfo ); renderInfo.castsShadow = FALSE; newSurface->setRenderInfo( renderInfo );
See Render->globals in the Menu Book for a more detailed description of these fields.
Sets whether both sides of an object (inside and outside) or only the outside is to be rendered. For example, a closed object, such as a sphere doesn’t have to be double sided; only one side of the object is going to be seen when it is rendered. The default is TRUE.
Determines which side of a surface will be used for the render; the side that the normals point out of, or the opposite side. The default is FALSE, meaning the side the normals point out of will be used.
Indicates whether or not the object will cast shadows in the RayCaster and RayTracer. The default is TRUE.
Indicates whether adaptive or uniform subdivisions will be used. The default is TRUE, meaning adaptive subdivisions.
Indicates the minimum level of adaptive subdivision on the object. The level must be a power of 2 between 0 and 7; any other values will cause the next higher power of 2 to be used. The default it 2.
Indicates the maximum level of adaptive subdivision on the object. The level must be a power of 2 between 0 and 7; any other values will cause the next higher power of 2 to be used. The default it 4.
Controls the threshold for subdivision of the surface. Values must be between 0 and 1, with 0.96 being the default.
When "adaptive" is FALSE, this indicates the number of subdivisions in the U direction. Values must be between 1 and 256, with 4 being the default.
When "adaptive" is FALSE, this indicates the number of subdivisions in the V direction. Values must be between 1 and 256, with 4 being the default.
Indicates whether smooth or flat shading should be used. The default is TRUE, meaning that smooth shading will be used.
Indicates whether the object should be motion blurred. The default is TRUE.
Indicates the object is a reflection only object.
Parameters for motion blur.