brush lesson

Upload: breeder-breederer

Post on 06-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Brush Lesson

    1/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 1

    1 PAINTING ON CANVAS

    This animation is part of a video that was created for us by a team of 5 students at Centennial College,

    Bell Centre for Creative Communications here in Toronto. The video was dubbed the Team Canada

    project and was produced for a presentation by the Canadian Trade Commission in Tokyo Japan in 1999.

    The video ran 120 seconds and was also chosen to open the Screening of Work at the Toronto Interna-

    tional Digital Animation Festival here in Toronto later that year. This clip is in my opinion, a particularly

    impressive piece of work well worth looking at.

    The importance of this tutorial is in demonstrating how some relatively simple geometry comes to life

    through the very creative use of texture maps and simple animation techniques. A number of different ani-

    mation techniques will be used in the exercise simply to introduce you the various ways that you can han-

    dle animation and keyframing in Houdini.

    The effect relies heavily on the use of Houdinis Carve SOP functionality to make the paint appear to flow

    onto the canvas. Of course the final effect really came to life with the use of some very traditional Cana-

    dian music with the sounds of loons on an early summer morning in cottage country.

    This screen shot will do the scene little justice. For this reason I highly recommend that you use Houdinis

    iplay utility to view a rendered frame of this image and better yet to play back a flip book of this short ani-

    mation. Your instructor will tell you where to rendered image sequences for this exercise are located.

  • 8/3/2019 Brush Lesson

    2/26

    Painting on Canvas

    2 Side Effects Software 2000 Houdini Training 4.0

    A NOTE ON FILE MANAGEMENT:

    There are a number of files used in this tutorial which include a number of images for textures and

    some channel data. It is important to note where you have installed this directory of files, i.e: on a

    local hard drive or on a network drive. To make your life easier, before beginning this exercise you

    should set a Houdini Variable to point to the directory where these files have been installed. That way

    the Hip file will know where to look for all the various elements needed without your having to sup-ply new paths each time. For illustration purposes only I am using the path name given below, you of

    course will use the path to where you have installed the directory called Brush_tutorial.

    /usr/staff/rayc/Brush_tutorial

    For the $HIPDIR variable to work properly is it important that you launch Houdini from that direc-

    tory. So at this point, cd to the location where these training files have been installed and launch Hou-

    dini from there.

    1. From the main menu at the top of the Houdini interface window, select the option DialogsAlias/Variables.

    2. Move into the Variables folder and select the menu item HIPDIR.

    Key the path name to your Brush_tutorial directory here

    and then click on the Close button.

    The $HIPDIR variable now points to that location

    Brush_tutorial

  • 8/3/2019 Brush Lesson

    3/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 3

    1.1 GETTING STARTED

    1. Load the Training Desktop. You did launch Houdini from the directory where these fileswere stored right?

    2. Delete the Ground, Logo and Sky objects.

    3. Squash the global length of this animation down to 85 frames.

    4. Place two new Geometry objects in the Object Tile layout window and:

    name one of the objects canvas (do not use an upper case letter here)

    name the other object brush (do not use an upper case letter here)

    1.2 CREATING THE CANVAS

    1. Toggle the display of the Brush object Off for now.

    1. Pass the canvas object into the SOP editor and delete the default File SOP.

    2. Place a Grid SOP in the layout window and:

    set the Primitive Type option to NURBS

    increase the size parameters to 4.8 and 4.8 respectively

    3. Of course the canvas will have a texture applied to it to represent the painting so planningahead, append a Texture SOP and then a Material SOP to the network chain.

    4. Ensure the Material SOPs render and display flags are toggled on.

    5. Display and home all 4 viewport windows.

    Normally as the scene comes together you would adjust the position of the grid and the camera to suityour artistic representation but those values will be given to you now just to keep things on track.

    6. Working with the Translation parameters for the canvas object:

    rotate the canvas on the X axis by -15 degrees

    rotate the canvas on the Y axis by -10 degrees

    adjust the X translation parameter to 1.05

    adjust the Y translation parameter to -0.3

    adjust the Z translation parameter to -1.5

    If you tumble the perspective viewport about the Y axis about 90 degrees you will see the relative

    position of the canvas slightly angled toward the camera.

    7. Ensure that you are currently viewing through Cam1 and working with the Cam1 object

    parameters:

    set the translate parameters to -2 -0.2 0.4 respectively

    rotate the camera about the Y axis only by -40 degrees

    ensure the camera is set to Look At no object

  • 8/3/2019 Brush Lesson

    4/26

    Painting on Canvas

    4 Side Effects Software 2000 Houdini Training 4.0

    1.3 CREATING THE BRUSH

    1. Toggle the display of the brush object On once again and pass it into the SOP Editor.

    2. Working with the current File SOP parameters:

    load in the file $HIPDIR/geo/sleeve.bgeo

    toggle the File SOPs lock flag On

    rename this SOP Sleeve

    3. Append a Revolve SOP to the File SOP and:

    set the Direction parameters to 0 0 1 so the revolve happens about the z axis

    toggle the Display flag On at this point

    4. Place a new File SOP to the immediate right of the SOP called Sleeve starting a new net-work chain, toggle its display flag On and:

    load in the file $HIPDIR/geo/handle.bgeo

    toggle the File SOPs lock flag On

    rename this SOP Handle

    5. Append a Revolve SOP to the File SOP called Handle and:

    set the Direction parameters to 0 0 1

    toggle the Display flag On at this point

    6. Place yet another File SOPto the immediate right of the SOP called Handle, starting a new

    network chain, toggle its display flag On and:

    load in the file $HIPDIR/geo/bristle.bgeo

    toggle the File SOPs lock flag On

    rename this SOP Bristle

    7. Append a Revolve SOP to the File SOP called Bristle and: set the Direction parameters to 0 0 1

    toggle the Display flag On at this point

    8. A texture map will be use later on to create the look of actual bristles, so once again plan-ning ahead, append a Texture SOP to the network chain. Materials will come later on.

    Two groups will be used later on to animate the shape of the bristles as they touch the canvas and

    lay down the paint. You will set those point groups up now. To do so:

    9. Display only the Top viewport window and home the window at this point.

    10. Append a Group SOP to the Material SOP you just laid down and toggle its display flag

    on. Rename this SOP to be bend_spread

    11. Working with the Group SOP parameters:

    set the Entity option to Points

    toggle the number enable option on

    delete the asterisk from the pattern field

  • 8/3/2019 Brush Lesson

    5/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 5

    Note: You can either use the banding box technique and the Transfer Pattern to Selection option in the

    Group SOP parameters to create the group or you can cheat and simply key the numbers given

    here into the Pattern field however:

    if you choose to use the banding box technique to interactively select the points you

    will need to toggle into select/transform state, choose the select points option and

    drag a banding box around the top of the geometry to select the points along the topfour isoparms. You will see four rows of active points

    if you choose the easier route you can simply key the string 60-119 into the pattern

    field. These are the numbers of the points that you would have selected.

    12. Append another Group SOP to the current Group SOP and toggle its display flag on.Rename this SOP to be flatten_twist

    13. Working with the Group SOP parameters:

    set the Entity option to Points

    toggle the number enable option on

    delete the asterisk from the pattern field

    this time select the top five isoparms to that you have five active rows of points or

    simply use the string 50-119 in the pattern field.

    14. Once the groups have been created, ensure you toggle back inot View Mode, do not leave

    yourself in the Select/Transform mode

    15. Pipe each of these network chains into a Merge SOP for a final display of the completedbrush.

  • 8/3/2019 Brush Lesson

    6/26

    Painting on Canvas

    6 Side Effects Software 2000 Houdini Training 4.0

    16. Append a Material SOP to the Merge SOP so that materials can be applied later on andensure that the Material SOPs display and render flags are both toggled on.

    17. Return to the Object level interface, display only the Perspective viewport window

    (remember the2 key) and ensure that you are currently viewing through Cam1.

    18. Working with the Translation parameters for the brush object: set the Z translation parameter to a value of 1 simply to move the brush tip further

    away from the canvas and out of camera view.

    You have saved this file right?

    That is all there is in terms of geometry. The rest is texture mapping and a lot of keyframing to get the

    motion of the brush strokes correct. The motion on the brush is the most difficult and time consuming part

    of this project. But getting realistic movement generally always is. It goes without saying that how the

    brush moves and lays down the paint is open to your interpretation. The initial animation was roughed in

    and the refined over and over again to get the final result.

    Now having said that, when keyframing the brush strokes you would not be keying in the values I am

    about to give you. You would be interactively positioning the brush through a number of key frames, play-

    ing it back and refining it as go.

    However in the interest of time you will be given a set of keyframes that we eventually came up with.

  • 8/3/2019 Brush Lesson

    7/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 7

    1.4 THE FIRST KEYFRAMING PASS

    1. Ensure that the brush object is the currently active object as you will be working with theassociated Translate parameters at this point.

    2. Ensure the frame pointer is currently set to frame 1.

    3. Right click and hold directly on the parameter field labelled Translate and select theoption Set Keyframe from the associated pull-down menu. This will open a set of anima-

    tion channels for all three translate parameters.

    The three translate parameter fields are now green indicating that an animation channel is associ-

    ated with each of them.

    4. Advance the frame pointer to frame 15

    5. Decrease only the TZ parameter to a value of-0.7

    The TZ parameter field now turns pale yellow in color. Houdini is alerting you to the fact that a

    parameter value has been changed but that there is currently no keyframe at this position in timeto record that change to.

    You will also note the circular keyframe button located in the lower right hand area of the screen,

    which is normally green has turned red.

    6. Commit this keyframe by clicking on the circular keyframe button that is currently red.

    When the keyframe has been committed all is good again, the value has been recorded in

    time and the keyframe button returns to the green state.

    7. To set the rest of the keyframes, refer to the following keyframe chart. For each set of key-frames:

    advance to the keyframe location indicated

    make the parameter changes as noted

    commit the keyframe by clicking on the keyframe button that will turn red each

    time you make a change

  • 8/3/2019 Brush Lesson

    8/26

    Painting on Canvas

    8 Side Effects Software 2000 Houdini Training 4.0

    Keyframe # Parameters Changes Commit Frame

    20 -0.2 -0.3 __ yes

    25 0.05 -0.1 -0.3 yes

    29 __ __ -0.56 yes

    32 __ -0.4 __ yes

    33 -0.15 __ __ yes

    42 __ __ -0.1 yes

    43 __ -0.2 __ yes

    50 0.1 __ __ yes

    58 __ __ -0.51 yes

    59 __ -0.34 __ yes

    61 -0.1 __ __ yes

    70 0.2 0 __ yes

    73 __ __ -0.09 yes

    80 0 0 0 yes

    85 0 0 0 n/a

  • 8/3/2019 Brush Lesson

    9/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 9

    8. S left click directly on the Translate label field to open the floating channel editor. Compare yourchannels to the following illustration for any misplaced keyframes or incorrect values. Turn the display of

    Slope Handles off since you will not be using them anyway. This is the fifth icon down the list of icons

    along the left side of the editor window as shown by the arrow in the illustration below.

    9. Using the left mouse button, click on the curve segment following time mark 70 on the TXchannel to select it.

    10. Now hold down the shift key and select the segment following time mark 70 on the TY

    channel as well and then the segment following time mark 80 on the Tz channel.

    11. With all three segments selected, click on the N icon at the end of the function field and

    select the liniar() option to set all these curve segments to liniar interpolation.

    12. Ensure that all segments between time 80 and 85 are set to linear() interpolation as well.

    13. Close the floating channel editor window at this point.

    14. Play back the animation at this point to get an idea of how the brush is striking and strok-ing against the canvas. You may want to home, tumble and dolly somewhat in the viewport

    window to get a better perspective.

    15. Switch to the Cam1 view and play the animation as viewed through the camera as well..

    Slope handles

  • 8/3/2019 Brush Lesson

    10/26

    Painting on Canvas

    10 Side Effects Software 2000 Houdini Training 4.0

    1.5 THE SECOND KEYFRAMING PASS

    There are a number of ways to set keyframes in Houdini. You are now about to animate some rotational

    parameters for the brush in a different manner simply to illustrate a point. This approach is generally used

    more for interactively editing keyframes or for inserting additional keyframes on an existing channel once

    the basic animation has been roughed in.

    1. Ensure you are currently viewing frame 1 of the animation once again.

    2. Working with the Rotational parameters this time:

    set the rotational parameter for the X axis only to a value of -17 degrees

    3. This time be careful that you right click and hold directly in the X Rotational parameterfield and select the Set Keyframe option from the associated pull-down menu.

    In this case you have only opened up an animation channel for the X rotational parameter as

    opposed to opening a channel for all 3 rotational parameters. Only the X rotational parameter is

    green.

    4. Right click and hold directly in the X Rotational parameter field once again and this timeselect the Scope Channels option from the associated pull-down menu.

    This will open the floating channel editor window once again but this time only the channel that

    you scoped will be displayed in the editor. If the channel does not appear then place your cursor

    anywhere within the editor window and press the h key to home the window.

    Before you begin, keep the following points in mind:

    a keyframe can be set anywhere on the channel curve simply by holding down the

    A key and left clicking on the curve

    a keyframe consists of two parts, a time mark and a value mark

    the time mark is the vertical bar

    the value marker is the small square located in the middle of the time mark

    to delete a keyframe you must select the time marker and press theD key

    you can not delete a keyframe by selecting the a value marker, you must delete the

    time mark associated with that value marker

    you can select a time marker and interactively drag it left or right to adjust time or

    input a specific time into the parameter field that will become active one the marker

    is selected

    you can select a value marker and interactively drag it up or down to adjust the cur-

    rent value or input a specific time into the parameter field that will become active

    one the marker is selected

  • 8/3/2019 Brush Lesson

    11/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 11

    5. A left click on the rx channel curve to insert a keyframe on the curve. You can now:

    click on the time marker (the vertical line) and drag it left or right until you reach

    time 15 (the marker will snap to the closest integer value) or once selected you can

    input a value of 15 directly into the associated parameter field located along the bot-

    tom of the editor window.

    6. Once you have the time mark positioned at frame 15, click on the value marker to select itand key in the parameter value 20 or interactively adjust the parameter and you will see

    the brush update in the viewport window at the same time.

    7. Using whichever technique you prefer, refer to the following list to set another seven rota-

    tional keyframes.

    Time Value

    Remember you have already set time 15 to a value of 20

    22 -20

    27 10

    34 -18

    41 4

    55 13

    62 -19

    70 13

    You want to hold the last rotational value constant from frame 70 thru 85, therefore:

    8. Click on the curve segment between time 70 and the end of the animation to select it.

    9. Click on the N icon at the end of the function parameter field and select the constanct()option from the resulting pop up menu.

  • 8/3/2019 Brush Lesson

    12/26

    Painting on Canvas

    12 Side Effects Software 2000 Houdini Training 4.0

    1.6 ANIMATING THE BRUSH SPREAD

    You now need to add some spread to the bristles to add some realism to the effect and to more closely

    match the shape of the paint that about to be laid down on the canvas.

    Again all of this can be keyframed as you have been doing. However as this is a training exercise the

    intent here is to introduce you to a wide range of approaches and techniques. In this case you will learnto sure the chread command.

    The chreadcommand allows you to read channel information from other files. In this case the anima-

    tion channels to create the brush spread werer created for you in a file that I set up. I then wrote these

    channels out so that you could read then into your file.

    I wrote these channels out using the the chwritecommand.

    1. Enter into the SOP network for the brush object and ensure you are currently at frame 1 of

    the animation.

    2. Use the show one/all icon at the bottom of the viewport window to display all objects, andhome the viewport window.

    3. You will likely want to tumble and dolly the view so that you can better visualize the bris-tles that you will be deforming.

    Remember those brush tip groups you created earlier, you will be using them here.

    4. Using the Right mouse button, click on the output connector of the Group SOP you namedflatten_twist earlier on, and insert a Twist SOP into the network chain.

    5. Toggle the Final Merge SOPs template flag On and toggle the Twist SOPs display flag On.

    6. Rename this SOP to be brush_spread, and: set the Group parameter field to bend_spread

    change the Operation option to be Taper

    change the Secondary Axis option to be the Z axis

    set the Pivot parameter for the Z axis only to a value of -0.94 positioning the pivot

    point in the centre of the bristle object geometry

  • 8/3/2019 Brush Lesson

    13/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 13

    7. Open an animation channel for the Strength parameter. Remember, to do so you, rightclick, hold and choose the set keyframe option.

    8. Scope this channel and display the channel editor window. Remember, right click, hold

    and choose the scope channel option.

    9. Change the current function in the channel editor from cubic() to raw(). Remember, clickon the N icon at the end of the function parameter field.

    Note: This is necessary for the chread command to work. If you are reading in animation channels from

    a file the function type for that channel must be pre-set to raw() interpolation.

    10. Close the channel editor at this point.

    11. Advance to frame 18 of the animation.

    12. Use theAc keyboard command to copy thisTwist SOP and then paste it twice using the

    Av keyboard command so that you have a total of three Twist SOPs.

    13. Reconnect the SOPs so that they flow in a sequential order rather then branching off as

    new network chains, and replace the input brush_spreadinto the Merge SOP with the out-put of the brush_spread2 SOP. (The last Twist SOP)

    14. Rename:

    brush_spread1 to be brush_flatten

    brush_spread2 to be brush_bend

  • 8/3/2019 Brush Lesson

    14/26

    Painting on Canvas

    14 Side Effects Software 2000 Houdini Training 4.0

    THE BRISTLE SPREAD

    1. Ensure the SOP called brush_spread is still the currently active SOP. (The first Twist SOP)

    2. Place your cursor in the tile layout window and use theASt keyboard command toopen the Textport window.

    To read the channel data file in:

    1. Issue the following command into the Textport window:

    chread /obj/brush/brush_spread/strength $HIP/chan/brush_spread.chan

    If the channel load is successful, the textport will return the message:

    85 samples loaded from /usr/staff/rayc/Brush_tutorial/chan/brush_spread.chan

    You have just read in .chan file that was saved out from another hip file. The data was read into

    the strength parameter of the brush_spread SOP.

    3. If you would like to see what this channel looks like, Scope the Channel that you just readin.

    THE BRISTLE FLATTENING

    1. Ensure the SOP called brush_flatten is the currently active SOP and toggle its display flag

    On.

    2. Delete the current Group Specification, select the new group specification calledfatten_twist and:

    set the primary axis of the taper to be the Y axis

    reposition the Pivot on the Z axis only to -0.74

    To read the channel data file in:

    1. Open a textport window once again if you have closed it and enter the command:

    chread /obj/brush/brush_flatten/strength $HIP/chan/brush_flatten.chan

    If the channel load is successful, the textport will return the message:

    85 samples loaded from /usr/staff/rayc/Brush_tutorial/chan/brush_flatten.chan

  • 8/3/2019 Brush Lesson

    15/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 15

    THE BRISTLE BEND

    1. Ensure the SOP called brush_bend is the currently active SOP and toggle its display flag

    On.

    2. The Group Specification here is the bend_spread_Group:

    change the Operation option to Shear

    set the primary axis to be the Z axis

    set the secondary to be the Y axis

    reposition the Pivot on the Z axis only to a -1

    To read the channel data file in:

    1. Open a textport window once again if you have closed it and enter the command:

    chread /obj/brush/brush_bend/strength $HIP/chan/brush_bend.chan

    If the channel load is successful, the textport will return the message:

    85 samples loaded from /usr/staff/rayc/Brush_tutorial/chan/brush_bend.chan

    3. Toggle the Merge SOPs template flag Off and ensure both the display and render flags aretoggled On.

    4. Return theObject level interface, ensureyouarecurrentlyviewing through Cam1 andplayback the animation this point.

    5. Ensure this file is saved once again.

  • 8/3/2019 Brush Lesson

    16/26

    Painting on Canvas

    16 Side Effects Software 2000 Houdini Training 4.0

    1.7 CREATING THE FIRST PAINT SURFACE

    1. Place a new geometry object in the layout window and rename it Paint1

    2. Pass this object into the SOP editor for modeling.

    3. Working with the current File SOP parameters: load in the file $HIPDIR/geo/paint1.bgeo

    toggle the File SOPs lock flag On

    4. Append a Skin SOP to the File SOP and toggle its display flag On.

    5. Append a Texture SOP and then a Material SOP as well.

    6. Append a Carve SOP to the Material SOP, toggle the display and render flags on and:

    ensure you are currently at frame 1 of the animation

    toggle the First U option Off

    toggle the Second V option On and set the parameter value to 0

    right click directly in the Second V parameter field, holding the mouse button downand select the Set Keyframe option from the associated pull-down menu.

    7. Advance to frame 16.

    The brush first contacts the canvas and begins to spread at frame 16 and this continues through

    frame 21. Therefore you want the Carve value to hold constant at a value of 0 from frame 1

    through frame 16. Because you are not changing the parameter value here at 16, the keyframe

    button does not become active. To set a new keyframe here without changing a parameter value:

    8. Right click directly in the Second V parameter field, holding the mouse button down and

    select the Set Keyframe option from the associated pull-down menu once again.

    9. Advance to frame 21 and:

    set the Second V parameter value to 1

    commit the keyframe by clicking on the keyframe button

    10. Right click directly in theparameterfield once again, holding down themouse button andselect the Scope Channels option from the associated pull-down menu. You may have to

    home the channel editor window.

    11. Click directly on the curve segment that follows frame 21, click on the N icon at the end

    of the parameter field and select Constant form the associated pop-up menu.

    12. Close the channel editor window, return to the object level and ensure your are currently

    viewing through Cam1.

    13. Advance to frame 21, the point where the brush finishes its stroke. Hey where is thepaint?

    14. Tumble and dolly the viewport as necessary so that you can clearly see the relationshipbetween the paint surface, the brush and the canvas.

    At this point it is pretty obvious that the paint will need to be relocated to lie on the canvas.

  • 8/3/2019 Brush Lesson

    17/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 17

    15. Working with the Paint1 object parameters:

    adjust the Z translation parameter to a value of -1.641

    This moves the paint surface forward onto the canvas which resides at -1.5 leaving a

    slight offset to prevent blade through of the underlying surface.

    The paint surface now needs to be rotated into the same orientation as you used for the

    canvas so:

    rotate the paint surface on the X axis by -15 degrees

    rotate it on the Y axis -10 degrees

    The paint surface now needs to be moved down as well so:

    adjust the Y translation parameter to a value of -.5

    adjust the X translation parameter to a value of - .12

    16. Ensure you are currently viewing through Cam1.

    17. Play back the animation you will see that the first sweep of paint is laid down from

    frames 16 thru 21 as the brush passes over it.

    1.8 CREATING TWO ADDITIONAL PAINT SURFACES

    1. Ensure that the Paint1 object tile is the only currently selected object tile and then copy it

    using theAc keyboard command

    2. Paste this tile twice using theAv keyboard command so that you have a Paint2 and

    Paint3 object node.

    3. Toggle the display of the Paint3 object Off for now.

    4. Move into the Paint2 Sop Network which is an identical copy of Paint1 at this point.

    5. Toggle the Skin SOPs display flag On but select the File SOP so that you are working with

    the File SOPs associated parameters.

    This Paint Surface is a slightly different shape then Paint1. However, unless you unlock this SOP

    the new set of curves that represent the Paint2 surface will not be read in. Therefore:

    6. Toggle the File SOPs lock flag Off at this point choosing Unlock from the associated menu

    that will appear.

    7. Load in the file $HIPDIR/geo/paint2.bgeo

    8. Ensure that you toggle the File SOPs lock flag On once again.

    The next brush stroke occurs between frames 29 and 33. This is twelve keyframes later than the

    first stroke which occurs between frames 16 and 21. So this paint should be laid down 12 frames

    later. You could keyframe this paint the same way as you did the first. But there is yet another

    way to handle this through channel referencing if you remember that from previous lessons. You

    could handle this either way, but channel referencing will be used here.

  • 8/3/2019 Brush Lesson

    18/26

    Painting on Canvas

    18 Side Effects Software 2000 Houdini Training 4.0

    9. Ensure you are viewing frame 1 and toggle the Carve SOPs display flag On at this point.

    10. Right click and hold directly on the Second V parameter field and choose the, Delete

    Channels option from the associated pull-down menu to delete the current channel infor-

    mation.

    11. Return to the SOP network of the Paint1 object for a moment.

    12. Display the Carve SOP parameters

    13. Right click and hold directly on the Second V parameter field and choose the option,Yank Parameter option from the associated pull-down menu.

    14. Return to the SOP network of the Paint2 object once again.

    15. Display the Carve SOP parameters

    16. Right click and hold directly on the Second V parameter field and choose the option, Put

    Yanked Reference option from the associated pull-down menu.

    That reference will now read:

    ch(/obj/paint1/carve1/domainev2)

    However some editing will be necessary. This reference will apply the same animation to the

    Paint2 object as currently exists for the Paint1 object. You want to offset or delay this animation

    by 12 frames. Therefore you will edit this reference to become a channel offset function, offset-

    ting this animation by 12 frames. Therefore:

    17. Edit the current reference to read:

    chf(/obj/paint1/carve1/domainev2,$F-12)

    18. Return to the Object level interface once again, ensure you are viewing through Cam1

    and play back the animation once again.

    The second layer of paint is laid down 12 frames after the first when the brush contacts the canvasfor the second time.

    With a project like this a lot of the final positioning of the elements is actually done as you fine

    tune the effect. Point in case is the final positioning and sizing of the paint surfaces, fine tuning

    the keyframes and that sort of thing. You wouldnt know the exact values that you are being given

    here.

    However, keep in mind that the way the brush strokes are keyframed the brush strikes the canvas

    at a lower position each time and the stroke is not as long. So it is pretty obvious that the position

    of the each successive paint layer will shift down the Y axis.

    Also each paint surface must be slightly offset from the previous one on the Z axis as well if you

    want them to appear to layer on top of each other.

    With this in mind:

    19. Adjust the translation parameters for Paint2 object to where:

    X = -.12

    Y = -.5

    Z = -1.639

  • 8/3/2019 Brush Lesson

    19/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 19

    NOW THE THIRD PAINT SURFACE

    The reference is still in the copy buffer so:

    1. Toggle the display of the Paint3 object On once again.

    2. Enter into the Paint3 SOP network and:

    unlock the File SOP

    load in the file $HIPDIR/geo/paint3.bgeo

    lock the File SOP again

    ensure you are currently viewing frame 1 and delete the current channel for the Sec-

    ond V parameter of the Carve SOP

    put the Yank Reference in the Second V parameter of the Carve SOP

    edit this reference to read:

    chf(/obj/paint1/carve1/domainev2,$F-39)

    3. Return to the Object level interface once again, ensure you are viewing through Cam1 andplay back the animation once again.

    The third layer of paint is laid down 39 frames after the first when the brush contacts the canvas

    for the third time.

    4. Adjust the translation parameters for Paint3 object to where:

    X = -.12

    Y = -55

    Z = -1.631

    5. View through Cam1 and advance to frame 45 of the animation. Now step through the ani-

    mation one frame a time and you will see there is a major timing problem with the third

    paint surface.

    Channel referencing can be a very useful and very powerful tool. However it is not always theanswer. The problem here is that the last brush stroke is a very short stroke occurring quickly

    over about 2 frames of animation. The animation on the carve of the paint surface is 4 frames so

    the paint seems to lag behind the brush in this case. Therefore:

    6. Return to the SOP network for the Paint3 object and delete the animation channel cur-rently associated with the Carve SOP.

    7. View frame 50 of the animation and set the SecondV parameter of a value of 0.

    8. Open a new animation channel for the SecondV parameter.

    9. Advance to frame 58, ensure the carve value is still set to 0 and set a keyframe.

    10. Advance to frame 60, set the carve value to 1 and set a keyframe here as well.

    11. Scope this channel and set the last segment of the animmation curve to constanct() inter-polation.

    That fixes up the timing problem

  • 8/3/2019 Brush Lesson

    20/26

    Painting on Canvas

    20 Side Effects Software 2000 Houdini Training 4.0

    1.9 CREATING THE TEXTURES

    The Textures are really the key to this presentation and consist of five components:

    the brush handle material

    the brush sleeve material

    the brush tip which really create the illusion of bristles

    the painting on the canvas

    the paint that is laid down on the canvas

    1. To begin the creation of these materials and textures load the Materials Desktop at this

    time and delete the default materials.

    THE HANDLE MATERIAL

    1. Place a Phong Shading Model in the Material Layout pane and rename it brush_ handle

    2. Working the associated parameters:

    set the diffuse color parameters to .668 .631 .222 decrease the Rough parameter to a value of 0.012 to decrease the size of the specu-

    lar highlight on the surface

    THE SLEEVE MATERIAL

    1. Place a Phong Shading Model in the Material Layout pane and rename it brush_ sleeve

    2. Working the associated parameters:

    set the diffuse color parameters to .164 .165 .172

    set the specular color parameters to .662 .73 1

    increase the Rough parameter to .06

    set the Reflect parameters to .42 .433 .82

    set the Ambient parameters to .03 .054 .15

    THE CANVAS TEXTURE

    3. Place a Phong Shading Model in the Material Layout window and rename it canvas

    4. Place a Texture Map TOP in the TOP layout window and:

    load the disk image $HIPDIR/mat/painting.rat

    5. Append a Bump Map TOP to the Texture Map TOP, toggle its display flag On and:

    load the disk image $HIPDIR/mat/painting.rat (yes the same map)

    set the Compute Map option to Use Alpha

    increase the Bump Height parameter to a value of 10

    6. Append a Dent TOP to the Bump Map TOP, toggle its display flag On and:

    increase the Amplitude parameters to 0.7 0.7 0.7

    7. Decrease the Specular component color parameters on the shading model to .5 .5 .5This simply tones down the brightness of the specular highlight

  • 8/3/2019 Brush Lesson

    21/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 21

    THE PAINT TEXTURE

    1. Place a Phong Shading Model in the Material Layout window and rename it paint

    set the diffuse color parameters to .1 0 0

    2. Place a Bump Map TOP in the TOP layout window and:

    load the disk image $HIPDIR/mat/painting.rat

    set the Compute Map option to Use Alpha

    increase the Bump Height parameter to a value of 5

    3. Append a Dent TOP to the Bump Map TOP, toggle its display flag On and:

    increase the Frequency parameters to 2.8 2.8 2.8

    increase the Amplitude parameters to 0.5 0.5 0.5

    THE BRISTLE TEXTURE

    1. Place a Phong Shading Model in the Material Layout window and rename it bristles

    set the diffuse color parameters to .95 .95 .95

    2. To better visualize this texture change the view window representation from the defaultsphere to a tube.

    3. Place a Texture Map TOP in the TOP layout window and:

    load the disk image $HIPDIR/mat/brush.rat

    4. Append a Bump Map TOP to the second Texture Map TOP, toggle its display flag on and:

    load the disk image $HIPDIR/mat/brush.rat

    set the Compute Map option to Use Alpha

    increase the Bump Height parameter to a value of 10

    5. Append a Dent TOP to the Bump Map TOP, toggle its display flag On and:

    increase the Amplitude parameters to 0.4 0.4 0.4

  • 8/3/2019 Brush Lesson

    22/26

    Painting on Canvas

    22 Side Effects Software 2000 Houdini Training 4.0

    1.10 APPLYING THE TEXTURES

    1. Load the Training Desktop once again.

    THE CANVAS

    2. Enter into the Canvas objects SOP network.

    3. Working with the Texture SOP:

    Set the Texture Type option to Uniform Spline

    4. Working with the Material SOP parameters:

    Apply the Material called canvas

    THE BRUSH

    5. Switch to the brush SOP Network.

    At this point you will need to check the primitive numbers of each the 3 elements that make up

    the brush. They should be the same as though given here but that will depend on the order in

    which they were input into the Merge SOP. Therefore substitute the group numbers as necessary

    as you proceed.

    6. Working with the Material SOP parameters:

    set the first Group field to 0 (or the number for your sleeve primitive)

    apply the material brush_sleeve

    set the second Group field to 1 (or the number for your handle primitive)

    apply the material brush_handle

    set the third Group field to 2 (or the number for your bristles)

    apply the material bristles

    7. Toggle the viewport into Gouraud mode and check the results. You will find that there isan obvious problem with the texture on the bristles. The default orthographic projectionmethod is not applicable here. Therefore:

    8. Working with the Texture SOP parameters:

    change to Texture Type option to be Cylindrical

    Thats much better but the map is upside down. So...

    set the scale parameter on the Y axis to a value of -1

    THE PAINT

    9. Switch to the paint1 SOP Network.

    10. Working with the Texture SOP:

    Set the Texture Type option to Uniform Spline

    11. Working with the Material SOP parameters:

    Apply the Material called paint

    12. Repeat this for the Paint2 and Paint3 objects as well.

  • 8/3/2019 Brush Lesson

    23/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 23

    1.11 SETTING UP FOR A RENDER

    THE LIGHTS

    You should now position the lights for the scene. The lights have also been given a bit of color to

    soften the render as well.

    1. Working with the Light1 parameters set:

    Translate 6.9 15.2 5.9

    Lookat Canvas

    Color .63 .66 .95

    Dimmer 0.7

    Shading No shadows

    2. Working with the Light2 parameters set:

    Translate -1.3 -1.8 5.9

    Rotate -32 35 0 Lookat Canvas

    Color .63 .66 .95

    Dimmer 0.5

    Shading No shadows

    3. Working with the Light3 parameters set:

    Translate -6.5 10.2 8

    Rotate -15 -75 0

    Lookat Canvas

    Color .95 .95 .69

    Dimmer 1

    Shading Fast shadows

    A reflection map was also used in this scene to add some ambient reflection to the brush sleeve.

    To set this light up:

    1. Place a new light object in the layout window and rename it light_reflection

    Translate -5.6 -1.1 3.2

    Lookat Canvas

    Shading No shadows

    2. Working in the Shading folder:

    For the Reflection Map parameter load the file called $HIPDIR/mat/room.rat

  • 8/3/2019 Brush Lesson

    24/26

    Painting on Canvas

    24 Side Effects Software 2000 Houdini Training 4.0

    SETTING UP THE LIGHT AND REFLECTION MASKS

    Light and reflection masks allow you to dictate which lights will illuminate which objects and

    which reflection maps will be read by which objects.

    By default all objects have an * and both their Light Mask and Reflection Mask parameter fields.

    So by default, all lights effect all objects and all objects honour reflection maps. You will no dic-

    tate which lights illuminate which objects and which objects will read the reflection map.

    1. Delete the Ambient Light.

    2. Working with the Canvas parameters:

    move into the Shading folder and:

    in the Light Mask Parameter Field enter (single space between * and ^ is important)

    light* ^light_reflection

    This string says allow all lights with the exception of light_relection

    Delete the * from the Reflection Map parameter field and leave the field blank

    The Canvas will be unaffected by the reflection map.

    3. Working with the Brush parameters:

    move into the Shading folder and:

    in the Light Mask Parameter Field enter

    light*

    This string says allow all lights with the name lightfollowed by any other string

    of characters.

    leave the asterisk in the Reflection Mask field

    4. Working with the Paint1 parameters:

    move into the Shading folder and:

    in the Light Mask Parameter Field enter (single space between * and ^ is important)

    light* ^light_reflection

    This string says allow all lights with the exception of light_relection

    Delete the * from the Reflection Map parameter field and leave the field blank

    The Paint will be unaffected by the reflection map.

    5. Use the same setting as paint1 for the Paint2 and Paint3 objects as well.

  • 8/3/2019 Brush Lesson

    25/26

    Painting on Canvas

    Houdini Training 4.0 Side Effects Software 2000 25

    SETTING THE CAMERA RESOLUTION

    1. Select the Cam1 object node to display the associated camera parameters and:

    move into the View folder and:

    set the Resolution to 720 486

    This standard Abekas output resolution. Notice how the pixel aspect parameter automati-cally changed to 0.9

    2. Advance to frame 30

    3. Render a frame using the Mantra1 output driver.

    Resolution Notes:

    320 X 243 NTSC 50% default

    480 X 364 NTSC 75%

    640 X 486 NTSC 100%

    768 X 576 PAL 100%

    720 X 486 Abekas NTSC DI Aspect Ratio .9

    720 X 776 Abekas PAL DI Aspect Ratio 1.067

  • 8/3/2019 Brush Lesson

    26/26

    Painting on Canvas