Text Function You can use any TrueType (.ttf) and Type 1 (Postscript, .pfa for ASCII and .pfb for binary) fonts. If an Adobe Font Metrics (.afm) file is present for the font (i.e., you have both MyFont.pfa and MyFont.afm), it is supported and provides kerning for the font. Shake will first look for fonts in its distribution directory, under fonts. You can also place them in a direct path by setting the environment variable NR_FONT_PATH. Finally, Shake will also detect fonts placed in the standard directories for your OS: NT: [SystemDrive]:\Windows\Fonts SGI: /usr/lib/X11/fonts/Type1 This function uses the Shake implementation of the GL Render. It allows you to not only manipulate the characters in 3D space (including X,Y,Z position, rotation, and scaling), but also a camera field of view. Because of this, if you are animating the fonts, it is better to do it within the Text (or AddText) function, as this will ensure crisp, clean edges. When selecting a font in the interface, remember that right-clicking on the font name in pop-up menu allows you to quickly test the font without closing the pop-up menu. Click with the left button to open the menu, drag to a blank space at the end of the list, and right-click. Now test your fonts with right-click. To validate your selection, use the left button. You can also use these shortcuts at any time without any special formating:
Examples 1:
: stringf( "Red = %4.2f at Frame %03d", Grad1.red1, time ) To append strings from another parameter, use something like this: in Text1.text: Hello in Text2.text: : Text1.text + " World"
Synopsis image Text( image, int width, int height, int bytes, const char * text, const char * font, float xFontScale, float yFontScale, float leading, float xPos, float yPos, float zPos, int xAlign, int yAlign, float red, float green, float blue, float alpha, float xAngle, float yAngle, float zAngle, float fieldOfView, float kerning, float fontQuality ); Script image Text( image, width, height, bytes, "text", "font", xFontScale, yFontScale, leading, xPos, yPos, zPos, xAlign, yAlign, red, green, blue, alpha, xAngle, yAngle, zAngle, fieldOfView, kerning, fontQuality ); Command Line -text text font xScale yScale etc... Example 2 This macro is to set a FileOut, and inserts a slate at the frame before the first frame, i.e. if your frame range is 1-100, frame 0 gets a printed slate. Load the script up in the interface to see what it does, moving the time slider from frame 1 to 0. There are 3 text generators. One (AText1) provides the headers (ie, "Shot:", "Show:", "Frame Range", etc. The second one (AddText2) gets the information either from the script, or as inputs to the macro that are provided by the user. A last text generator (AddText1) will print the frame number in the corner if markFrame is set to 1. Open up the macro in the interface by putting the cursor over mySlate and hitting enter. Then go ahead an view the parameters for each sub-node. Or, of course, just open the script in a text editor. See Also |