ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman...

14
ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman [email protected]

Transcript of ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman...

Page 1: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

ES305Virtual Tools

in Engineering Design

Objects & Scripts

11-09-2009Prof. Searleman

[email protected]

Page 2: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Overview

■ Virtools■ 3D object – mesh – material■ Building Blocks

Homework:Exercise 1 due todayExercise 2 due todayExercise 3 due: Wednesday, 11/11(note that these are to be done individually)

Getting Help: Eric Bomyea

Page 3: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Recap: Basic Concepts in Virtools■ Level Manager: organizes the composition

■ Schematic: used to create, edit, and manage “scripts”; a script describes how an object behaves

■ Building Blocks (BBs): a library of behaviors, organized by the type of behavior and/or by the type of object to which the behavior can be applied

■ Data Resources (default: VirtoolsResources)

project management tools – you can create a new data resource for each project

■ Media objects (such as a model, sound, or image) are added to the composition by dragging it from a Data Resource into the 3D Layout or Level Manager or by importing it via data resources

Page 4: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

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

Page 5: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Virtools Exercises■ add a level script at the top and insert a

comment box containing your name, date & exercise#

■ schematics should be neat & easy to read■ make sure all pIns are labelled (at least

with the value)■ print the scripts (in landscape mode)■ turn in printouts & also copy your

composition to your folder on the course drive: \\fs2\JCarroll\ES305

■ Please make a subdirectory for your VR work (a working directory would also be useful)

Page 6: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Object – Mesh - Material■ 3D mesh is the “wireframe” shape for an

object■ A mesh is often shared by several different

objects to save space

■ A material is wrapped around the mesh■ materials can be shared■ can add a texture■ color parameters:

□ ambient: multiplies the scene’s ambient color□ diffuse: default surface color, depends on lights□ specular: shiny highlights□ emmisive: self-illumination

Page 7: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Shared Mesh and/or Material

Andy’s Mug Ken’s Mug

Mug Wireframe

Blue CeramicDependency:

if you delete Ken’s mug, you will be asked about dependencies. If you select “full”, Andy’s mug no longer has a shape!

Page 8: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Object, Mesh & Material

Andy’s Mug Jim’s Mug

Nelson’s Mesh

Ceramic

Objects can share a mesh. A mesh can share a material.

If you delete an object that is sharing a mesh or material, specify “no dependencies” (meaning that it will not delete the shared mesh or material).

Ken’s Mug Mike’s Mug

Ken’s Mesh Mike’s Mesh

Stainless Steel

Page 9: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Steps in creating a composition

1. Import objects (Resources|Import) or from VirtoolsResources

2. Use the Level Manager to set up your objects■ rename

■ double-click an object to get 3D Object Setup

■ adjust the world coordinates (0,0,0)

■ rotate and scale as desired

■ change the color (if desired)

3. Add lighting

4. Add a camera & adjust it to view the object

5. SET INITIAL CONDITIONS on your objects (but not on the scripts)

Page 10: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

LightsThere are 3 types of lights in Virtools:

directional light point light spot light

directional < point < spot (in terms of complexity)

Page 11: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Add Lighting

■ Add a spot 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)

Page 12: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

CamerasThere are 2 types of cameras in Virtools:

1. Target camera - always looking at a target defined by a frame - cannot specify orientation

2. Free camera - useful since you can change the orientation

the Create Camera button creates a camera

Page 13: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Camera

Page 14: ES305 Virtual Tools in Engineering Design Objects & Scripts 11-09-2009 Prof. Searleman jets@clarkson.edu.

Add a Camera

■ Add the camera■ 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)