Caffeine Abuse - The Blog

Frame number as 3D text

From the Create > Text menu choose Solid Mesh. Unlike most other parameters in Softimage, the editing pane does not come with an animation icon and as such it does not offer a direct way to animate or control via expression. However, this certainly does not mean it can’t be done. You’ll return to the PPG in a second, but close it for now. There’s a slight difference between the standard primitives in Softimage and the text object. While the standard primitives creates a single object the text operator instantly renders your input text as curves which are then converted to a 3d object using the convert curves to mesh command.

As such, it automatically creates two new objects; the text object which is the converted curves and the polymsh object which in turn is the 3d conversion of the curves. If you haven’t done so already, press [8] to open an Explorer. Click on the (+) sign next to the Text node and expand the NURBS Curve List > Text To Curve Converter. Right-click on the Text node and choose Set Scripted Operator… from the popup menu. Scripted operators are a bit like expressions on steroids and enable you to bring scripting into play to control parameters in your scene.In order to print the current frame you first need to extract that particular information from the scene. This is done with the In_UpdateContext.CurrentFrame property. The next step is to apply this value to a parameter, namely the input used to create the curves of the text object.

In the top editing pane, enter
oCurrFrame = In_UpdateContext.CurrentFrame
Out.Value.Parameters(“text”).Value =oCurrFrame

Press the Apply button to apply the operator and then close the PPG. Your text object will now display your current frame as 3d object. If you scrub the timeline you’ll notice a slight inaccuracy. The current frame does not get updated. By default the scripted operator will only update if the input or parameter is changed. In the Explorer, expand the Text tree to display the Script Op node and click on the S icon to open the PPG. Check the AlwaysEvaluate checkbox and close the PPG.

Select the polymsh object and press [Ctrl] + [End] to open the last operator in the stack (the Curve To Mesh PPG). By default the size of the text is set to an absolute size in Softimage units which will cause a slight jitter when you playback the animation. In the Text To Curve_Converter section, change the Text vs Font Size Method to Ratio: Points per Softimage Unit. Close the PPG and you’re done.

The project files used in this tutorial can be found at:

Quick tip
If you’re using an earlier version of Softimage the In_UpdateContext.CurrentFrame property may not function. If so simply replace it with GetValue(“PlayControl.Current”)