Digit's Widgets Animation Master Version 1.0 Lessons

I realize to anyone but me looking at this array of controls it might look rather daunting. In these lessons I will try to break up the Zscript into little bitty pieces and hopefully by following along with the examples you will get a good idea of what everything does. From that point you should be able to come up with your own techniques and ideas for animation.

Simply said this script will allow you to do the following things over the course of a series of animation frames.

  1. Control an Object's Position
  2. Control an Object's Size
  3. Control an Object's Rotation
  4. Place another object (line) between two selected objects
  5. Connect a Light Source to an object that will follow it at a set distance and direction (varying or steady)
  6. Allow you to edit the animation on a frame by frame basis and make changes to the objects in each frame

Keep these simple concepts in your mind as you try to figure out what you can do with the script.

Each lesson will hopefully build upon the last lesson so be sure to follow each example.

 

Lesson One - Position Movement and Size

Basic TwoPt Movement

  1. Select the TwoPt_ switch on a object.
  2. Draw the Object on the canvas (select Color, Material, Texture etc..)
  3. Enter "w" for Move
  4. Move the object to the desired starting position
  5. Enter "e" for Size
  6. Size the Object to its Starting Size
  7. Enter "r" for Rotate
  8. Rotate the object to its Starting Angle
  9. Press GetStart to record object Starting Data
  10. Repeat steps 3 to 8 for the Ending Position
  11. Press GetEnd to record object Ending Data
  12. Press LoadData to Load the Animation Data into Memory

Test the animation by

  1. In the Render and Export Area press the No Clear Switch
  2. Press Preview without Saving
  3. Watch the script render each frame in the animation. You should see the object move, size and rotate from its Starting Position to its Ending Position.

Now, if there were any changes we want to make with the object we should do it now. For example if we wanted to change the Starting Position we could. Press Recall Start to bring back the object at its start postion. We could then move the object, change its size or Rotation and then press GetStart again to record it. Then we MUST press LoadData again to load it into Memory.

I mentioned the Recall Start, there is also a Recall End button that will recall the object at its end Position. Pressing either one of these buttons when you don't have an active object (gyro visible) will recall that object. If you have a object currently active (gyro visible) then hit one of the Recall buttons, it will move, size and rotate that object without changing the Tool, material or color of it. This allows you to place another object at that object's position. You could then use it to create another object in the animation at that point.

To export this animation press "Execute and Export Images". It will then ask you for a filename. Navigate to the directory that you wish to place the series of animation frames and give it a filename with a 2digit number after it. Also either accept the default PSD format or use the combo box to select BMP format. The format you should pick is determined by the program that you will use to combine these frames into a viewable animation. Example: Flash wants BMP files but Gif Animator will use either the PSD or BMP files.

Example: MyAnimation01.bmp The script will increment this filename for each frame in the animation series. Frame 2 will be called MyAnimation02.bmp and so forth.

To Render each frame in Best Render select the "Best Render" switch. Things like lighting and some material properties will only exist in the image if Best Render is on.

Summary

We used the GetStart and GetEnd buttons in an Object Menu to record the Object's Starting and Ending Position, Size, Rotation. Also the Object's Color, Material and Texture (if any).

We pressed LoadData to move the Animation data to Memory.VERY IMPORTANT STEP! If this is not done, or if you have made any changes to the Object you will not see them in the Render until you press this switch.

We previewed the animation to see what it looked like by using the Preview without Saving button. By pressing the No Clear switch the script did not erase each successive frame so that we are able to see the progression of the object as it moved according to our instructions from Frame 0 to the ending frame.

After we previewed the Animation we could then change things like the Starting Position, Rotation etc.. and try it again until we get it to where we like it. Use the Recall buttons to bring back the object to make our changes. Don't forget that LoadData button after we have made the desired modifications :)

We then recorded the animation to disk. If we want to do this in Best Render we pressed the "Best Render" Switch and then "Execute and Export Images". We gave it a filename with a numerical ending "MyAnimation01" and selected a file format. At this point the script automatically rendered each frame (10 Frames default) and wrote them to disk (MyAnimation01.bmp, MyAnimation02.bmp .......... MyAnimation10.bmp)

 

Basic Curve Movement using Spline Point

  1. As in our previous lesson create an object and set the Start and End Point
  2. Press Curve to enable LoadPoint and Move Buttons for the Object.
  3. Move a object to a position in XYZ space to use as a Spline Point
  4. Press LoadPoint to record this postion for the Object. Properties such as size, Rotation and XYZ position will have effect on the resulting interpolation.

Note Any time you wish to recall an object to this position press the Move button.

Summary

In this example we altered the path of the object in the animation sequence to be affected by a 3rd point, I call a Spline point. Instead of following a straight line between the Start and End point the object is now pulled toward the spline point depending on its relationship in 3D space to the 2 end points. The Size and Rotation of the object recorded as the Spine point by pressing the LoadPoint button will have effect on the animation object as it progresses through the sequence. We can recall an object to the recorded Spline point by pressing the Move button, we could then adjust the curve by moving the object and pressing the LoadPoint button again. Just make sure you press the LoadData button again after any changes are made.

Stroke Movement to Recorded Stroke

In addition to either Straight TwoPt or Curve movement in which Movement is determined by the Starting and Ending Position values for the object, the Movement can be controlled by using a recorded brush stroke. Selecting the Stroke Switch enables the LoadStroke button for that object. Record a stroke by using any brush and recording on the canvas the path you wish to have the object to take (see gif below) then press the LoadStroke button to record the data. After your brush stroke is complete use "Cntrl Z" to erase the stroke from the canvas.

Example of cube following a brush stroke path. Note the object's Size, Rotation and ZDEPTH (if GetZdata is not used) is controlled by the Object's Start and End values.

To incorporate ZDepth from the canvas to your object press the GetZData switch. When this switch is enabled pressing the LoadStroke button will cause the script to record the Z values directly from the canvas to the object. This will make the object follow the contour of whatever is present on the canvas during the animation sequence. (NOTE you must draw your stroke in the same layer that contains the pixols that you wish to contour. Otherwise you won't get the results that you think you should)

There are a number of techiques that you can use with this feature. One I use alot for example: Say I wish to have a ball circle around a pole in the sequence.

 

  1. In one layer I create the pole in the center of the canvas.
  2. In another layer I create a 3D Ring that intersects the middle of the pole to give me a nice circle to go around the pole and provide the surface for my brush stroke
  3. I then hide the layer that has the pole and select the layer that has the 3D Ring. The reason I say to hide this layer is because when we read the canvas we won't want the pole to be visible so that the script will not read the pixols in the Pole that are in front of the 3D Ring.
  4. I create a ball on the canvas and set up it's color, material, and size.
  5. Since this objects position is going to be controlled by the brush stroke that I am going to make I just press the GetStart and GetEnd buttons with the object positioned anywhere.
  6. I then press the Stroke and GetZData switch
  7. I select a simple brush and reduce the drawsize to be fairly small
  8. I draw a circle on the 3D Ring using a constant rate and hopefully smoothly. I could use a stencil as a guide if I want to get fancy.
  9. Zbrush now has the brush stroke in memory, I can choose to erase the stroke from the canvas by pressing Cntrl Z this step is not necessary in this case because we are working on a throwaway layer which will not be in the scene and we are not using the Float feature (described below) Sometimes it is helpful to leave the stroke visible on the canvas if we are using multiple objects that interact in space with eachother. That way you can see everyone's path and perhaps you would make them different colors. If we are working on a layer that is to be visible in the scene for sure we want to erase it via Cntrl Z
  10. Press LoadStroke to read in the brush stroke and pick the Z values from the canvas.
  11. Press LoadData to put everything into memory.
  12. Hide the 3D Ring layer and make the Pole layer visible. Create a new layer for the animation and make sure it is the active one. Why you say? When you do the animation it will most times be clearing the layer that you have active. You don't want to accidentely erase any layers that you are usiing for backgrounds.
  13. Press the "Preview without Saving" button with No Clear selected. You should now observe your ball moving in a circle around your pole, passing behind it and then back in front of it in a circle.

Using this technique you can make your objects circle around a spiral, up and down inside of a bowl, around a sphere etc... what ever you come up with, travel over a hilly terrain. One thing you will notice, especially if you are using a canvas area that is to be in the scene is that your objects will appear to be imbedded in the canvas, that is because the object will be drawn with its centerpoint at the recorded position in the stroke. If you are working on a throwaway layer that is not an issue. You can deal with this in one of two ways.

  1. Edit the object frame by frame (this procedure is described later) and manually adjust the object so that it appears correctly in each frame of the animation.
  2. Use the Float Feature which I will descibe right now in fact!

When you select the GetZData switch you also have the option of selecting the Float Switch and entering a value in the FDepth slider. What this does is when the script is reading the canvas that your brush stroke went over it will look at each Pixol. Each Pixol has information in it that indicates what direction it is pointed. In the case of a flat plane the direction will be directly perpendicular to the plane. Using the Float feature the script will then offset the object by the FDepth amount in the direction indicated by the Pixol, thereby lifting the objects center by that amount. Example:

Redo the above GetZData steps and select Float and a value of 30 for FDepth. Create a blank layer to run the animation but leave the 3DPlane layer visible. When you run the Preview you should see the ball travel around the pole but suspended over the Plane and not imbedded in it. (you may have to adjust the value of FDepth) This feature can really come in handy when you are using layers that will be visible in the animation so that the objects float over them. Now, there maybe some cases where the direction of the Pixol is not what you had intended (uneven or sharp edges etc.) you can edit these instances by frame but overall this feature should save alot of work especially in a long animation.

IMPORTANT NOTE

One thing that you have to remember with Stroke Paths is that if you decide to change the Number of Frames in the animation you will have to use the LoadStroke button to re-read the canvas If you are not using GetZData and/or Float then it is just a matter of pressing the LoadStroke button to re-read the recorded stroke in memory. However if you are using GetZData and/or Float you will have to do one of two things because these features actually have to read the canvas to get information.

  1. Competely redo your stroke as above on the canvas
  2. If you have created a throwaway layer such as the one above or have the original layer that you created the stroke path available, select that layer making it active before pressing the LoadStroke button. This insures that all the original canvas is available like it was so the script will now re-read the canvas for the new number of frames.

And of course after any changes to an object you must then press the LoadData button to record it to memory

 

Summary

By using a brush stroke to define a path for your object instead of a Straight TwoPoint line or Curve you gain tremendous control over your object in the animation. Without GetZData selected the object will only gather XY data from the canvas defined by your stroke and the Z information will be determined by the Start and End values of your object. Selecting GetZData will allow the script to assign the Z data from the canvas defined by your stroke to the object and using Float and FDepth you can apply an offset to your object that moves its centerpoint in the direction that each Pixol in the canvas is facing. Care must be taken if you change the number of frames in your animation to re-read the stroke by pressing the LoadStroke button. Otherwise the animation will only use the original number of frames in the data and if the number of frames is greater than it used to be there will be undefined or invalid data in those frames.

 

End of Lesson One - Position Movement and Size

Still with me? Basically that is all there is to moving and sizing your object. If you have actually read this far and followed along you have also gained some other knowledge on how the script works. In the next lesson we will learn how to control Rotation of the object in the animation and in the final lesson we will discuss rendering and frame by frame manipulation of objects.

 

 

.