CS461561 Virtual Environments: Principles - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

CS461561 Virtual Environments: Principles

Description:

From 4:00 5:00, there is a talk by Xiaohua Sun on Digital Media ... positions & orients itself behind the teapot using BBs Set Position and Look At ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 29
Provided by: janicets
Category:

less

Transcript and Presenter's Notes

Title: CS461561 Virtual Environments: Principles


1
CS461/561Virtual Environments Principles
ApplicationsLights, Cameras, Action
  • 1-24-2007
  • Prof. Searleman
  • SC375
  • jets_at_clarkson.edu

2
Overview
  • Basic concepts in Virtools
  • File types
  • Using the life player
  • Basic Block flags v, s
  • Interaction response to keys
  • Lights
  • Cameras
  • Virtools Exercise 4, due Monday 1/29/07
  • Virtools Exercise 5, due Wednesday, 1/31/07

3
CLASS on Monday, 1/29/07
  • We will meet in the CEC at 400
  • From 400 500, there is a talk by Xiaohua Sun
    on Digital Media
  • From 500 515, we will work on Exercise 5

4
File Types
  • .cmo
  • - full composition with both objects scripts
  • - FileSave Composition
  • .vmo
  • - full composition without scripting
  • - cannot be loaded by Dev
  • - used by Web Player or standalone app
  • - FileExport to Virtools Player

5
File Types, cont.
  • .nmo
  • - 1 or more objects, with or without scripts
  • - can be imported into the current composition
  • - ResourcesImport File or Import File As
  • - Useful for dynamic loading
  • .nms
  • - contain either a graph or a script
  • - to save a script, select it, right click,
    select save as give directory name, in the
    Behavior Graph directory of your resources
    folder give description, version, author name to
    appear in the resource window

6
Elements of a Composition (CMO)
  • BeObject an object to which a behavior can be
    applied
  • RenderObject visible in play mode
  • Objects that may be visible, but usually are not
    Camera, Curve, Grid, Light
  • Objects that are not visible Array, Group,
    Level, Material, Mesh, Place, Scene, Sound,
    Texture

7
3D Entity
  • A 3D Entity defines a position, an orientation,
    and a scale
  • 3D Frame
  • - null object
  • - no geometry (invisible)
  • - used to provide a referential
  • 3D Object
  • - have a geometry (i.e. mesh)
  • - may have 1 mesh, but only 1 is active
  • - cannot be created within Virtools

8
Referential
  • point of reference for a 3D transformation (e.g.
    scale, rotate, translate)
  • used as a parameter input to a BB (pIn)
  • referential value --NULL--
  • means the world coordinate system
  • referential value name of the entity
  • means the local coordinate system

9
Graphical Flags
10
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

11
On/Off Details
  • BB is inactive.
  • 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.
  • 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.

12
Lights
  • There are 3 types of lights in Virtools
  • directional light point light spot
    light

directional complexity)
13
Add Lighting
  • Add a point light
  • use the level manager to rename it
  • use Setup to position it
  • Add directional lighting
  • use the level manager to rename it
  • use Setup, select Directional
  • Position it, say at (0,10,0)
  • Change its orientation to (90,0,0)

14
Cameras
  • There are 2 types of cameras in Virtools
  • Target camera
  • - always looking at a target defined by a
    frame
  • - cannot specify orientation
  • Free camera
  • - useful since you can change the
    orientation
  • Create Camera button creates a camera

15
Camera
16
Rendering
  • View Frustrum (view volume)
  • defined by the current camera its near far
    clipping planes

17
Add a Camera
  • Click on create camera icon
  • Use the Level Manager to rename it
  • Use Setup to change its coordinates (or position
    it using the toolbar to the left of the 3D Layout
    window)

18
Overview
  • Exercise 4 Virtools Tutorial plus a new feature
    of your choice
  • Exercise 5 cameras
  • Surveillance cam
  • First person cams
  • Hierarchy camera is child of avatar
  • Camera moves with avatar
  • 3D Frame is child of avatar, camera mimics 3D
    Frame

19
Example Exercise 5
  • Composition Moving Teapot 4 cameras
  • Surveillance Cam Looks at teapot from fixed
    point of view using BB Look At
  • Hierarchy Cam Child of the Teapot
  • Look at Cam not child, positions orients
    itself behind the teapot using BBs Set Position
    and Look At
  • Mimic Cam uses a 3D Frame which is a child of
    the teapot uses BB Mimic to mimic the 3D
    position orientation of the 3D Frame
  • Select cameras dynamically uses BB
  • Set as active Camera in Camera

20
ControllerMouse Waiter
  • detects mouse actions
  • note
  • Mouse Position is
    in screen coords
  • - delete unused
    pOuts, bOuts, 0

21
Interface2DPicking
  • returns the 3D entity, the normal and the exact
    position of the 2D mouse pick

22
Parameters
Parameter shortcuts (copy paste as shortcut)
  • Input parameters, in blue
  • Output parameters, in green
  • Local parameters, in red

23
ParamOp
  • ParamOp is part of the data flow (blue), not the
    behavior flow (red)
  • Parameter operations are used to perform a
    computation
  • ParamOps have 2 input parameters 1 output
    parameter (no target)

24
Create ParamOp
  • Right-click on script
  • Select Add Parameter Operation

25
Logics\CalculatorOp BB
  • Encapsulates a ParamOp in a BB
  • Use to perform an operation once at a given time

26
Interface/Text 2D Text
27
Logics/StreamingParameter Selector
  • If In k is activated, selected parameter will
    be pIn k
  • Variable number of inputs (v)

28
ControllersKeyboard
Maps keys to Joystick messages, as followsNum 8
- Joy_UpNum 2 - Joy_DownNum 4 - Joy_LeftNum
6 - Joy_RightInsert - Button 1Home - Button
2Prior - Button 3Delete - Button 4End -
Button 5Next - Button 6
  • Emulates a joystick
Write a Comment
User Comments (0)
About PowerShow.com