Presentation on theme: "ES305 Virtual Tools in Engineering Design Cameras, Action... 11-11-2009 Prof. Searleman"— Presentation transcript:
ES305 Virtual Tools in Engineering Design Cameras, Action... 11-11-2009 Prof. Searleman email@example.com
Overview ■ Virtools ■ Cameras ■ Action: understanding building blocks ■ Trace mode ■ Parameter selector Homework: ■ Virtools Exercise 3, due today ■ Virtools Exercise 4: □Work on the Virtools Tutorial for Monday (nothing to turn in) □The final version is due on Wednesday, 11/18
Recap: Level Scripts ■ Level scripts ■ used to create behaviors that are not bound to a particular object, but exist in the level (e.g. background, setup) ■ useful place to put a comment describing the composition Example: Set Background Image BB
Rendering ■ View Frustrum (view volume) defined by the current camera & its near & far clipping planes
Rendering a Frame Process Loop repeat forever } 1 frame Process Behaviors Render
BB Operating Cycle Some BBs have one behavioral in and one behavioral out activate the bIn execute the BB: some use parameter inputs (pIn) and some produce parameter outputs (pOut) deactivate the BB activate the bOut Some BBs have a bIn/bOut and a loopIn/loopOut Some BBs are switches – once activated they stay active until explicitly turned off
BIn/BOut: Building Blocks Some building blocks have one In and one Out. The BB starts out as inactive. When you activate the In, the BB performs its operation, activates the Out, and becomes inactive. To repeat a behavior, you must explicitly have a link back to the behavior In in order to reactivate the BB. Examples: Delayer BB (above), Rotate BB, Translate BB.
Example: Timer one Behavior In (BIn) / one Behavior Out (BOut) one Loop In / one Loop Out
Loop In/Loop Out Building Blocks Some building blocks have an In, a Loop In, an Out, and a Loop Out. The BB starts out as inactive. When you activate the In, the BB performs its operation and then activates the Loop Out. To repeat a script, connect from Loop Out to the looping script’s In, and have a link from the looping script’s Out back to the BB’s Loop In. When the loop is finished, the BB’s Out is activated. Example: Timer BB.
Loop In/ Loop Out details 1.BB is inactive 2.In is activated; the BB activates Loop Out following the pink link; BB is still inactive 3.We link Loop Out to the script we want to execute during 3s. To have the timer active again, My Looping Script needs to reactivate Loop In. Then, during 3s, the timer will work following the violet link: Inactive -> Loop In -> Active -> Loop Out -> Inactive 4.Finally, when Loop In is activated but the time elapsed > 3s, the timer will work according to the orange link and activates Out. The BB is inactive. Back to 1.
Example: Chrono also note: can use trace mode to display a parameter value (such as elapsed time) On / Exit On Off / Exit Off
Activate/Deactivate Building Blocks Some building blocks, once you activate their On, the BB stays active until they are explicitly turned off by activated their Off Examples: Switch On Key BB & Chrono BB (above).
On/Off Details 1.BB is inactive. 2.The user presses the 1 key. On is activated, the BB performs an action and activates the Out On output (violet link). The BB is now active and will call itself every frame and perform an action until the Off input is activated. 3.The user presses the 2 key. Off is activated, the BB performs an action and activates the Out Off output (pink link). The BB is now inactive. Go back to 1.
Graphical Flags FlagMeaningDescription Settingscan specify additional info to BB Variablecan create additional pIn, pOut, bIn, bOut Custom Dialogfor parameter input and settings Send Message Wait Messages
Construct ■ v flag – variable number of inputs/outputs ■ To add a bIn/bOut or pIn/pOut, right- click in the BB and select Construct Example: Switch On Key BB