1 / 32

Autonomous Characters

Dive into the connection between computer code and animation, focusing on action selection and emotional modeling. Learn about Finite State Machine, Behavior-Based AI, and more.

joneselena
Download Presentation

Autonomous Characters

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Autonomous Characters Professor: Bill Tomlinson Fall 2003 Tuesdays 3-5:50pm HIB 335 Meeting 3

  2. State of the Union • We’ve covered the two big topics that we’ll be addressing this semester. • Still lots of things to come, but we’ll be focusing throughout on the link between computer code and animation.

  3. Go Over Assignments • Any troubles getting things to compile? • Other questions?

  4. Go Over Readings • Lasseter – Other approaches to animation?

  5. Go Over Readings • Picard/Wilson – Emotional modeling. Too simplistic?

  6. Go Over Readings • Burke/Tomlinson – Any questions about the system?

  7. Go Over Readings • Stein – any code questions?

  8. Action Selection – Why? • Make a list of reasons that animate entities need to choose different actions

  9. Behavior • Connection between stimulus and response

  10. Learning • Connection between an action and consequences

  11. Behavioral change over time (over different time scales) • Action • Learning • Development • Learning

  12. Emotional change over time • Emotion • Mood • Personality

  13. The Craft of Acting • Making decisions appear meaningful. • Connecting actions and emotions.

  14. Drama • Action selection • Showcasing that action selection – staging, lighting, responses from other actors, etc.

  15. Action Selection – How? Once we decide what we want it to do, how do we code that? Finite State Machine: Make a graph Behavior-Based AI – layered behaviors – Make a tree

  16. Action Selection – An Example Vec3 myPos = new Vec3(); this.getPosition(myPos); if (myPos.mag() <20) { SoundSystem.play( "w:/sound/beep.wav"); }

  17. Perception • What can people sense?

  18. Perception • What can the characters sense?

  19. Perceivable things • Come up with a list of environmental things that might provoke emotional change.

  20. Some other things you’ll need to know about…

  21. Conditionals • if (something) { do this;}

  22. Vectors • Vec3, in particular • Similar to a point, but more active. • Represents what you have to do to one point in order to change it into another point. • Vec3.add(a, b, c); • Vec3.sub(a, b, c); • thisVec3.mag();

  23. Navigation • navSys.goTo(camPos); • Will walk emotively • sets “action” when .goTo is called, so be careful not to replace it with some other action later.

  24. Play a sound • SoundSystem.play("w:/sound/beep.wav");

  25. Rules on copying code • Cut and paste reuse is fine with me, as long as you understand what the code is doing. • Please put comments in your code to show me that you understand. • Black-box behavior

  26. Some code examples:Get position of camera • public Vec3 camPos = new Vec3(); • camPos.setValue(CameraSystem.getPosition()); • System.out.println(“CamPos is “+camPos);

  27. Some code examples:Get position of other character • Vec3friendsPos=newVec3(); • research.World.getWorld().getCreature( "PersonACE_01 number 0").getPosition(friendsPos); • System.out.println("PersonACE_01 number 0's pos = "+friendsPos);

  28. Some code examples:Get distance from me to other character • Vec3 distanceBetweenUsVec = new Vec3(); • Vec3.sub(myPos, friendsPos, distanceBetweenUsVec); • double distanceBetweenUsDouble = distanceBetweenUsVec.mag(); • System.out.println(“Distance between us is “ + distanceBetweenUsDouble);

  29. Assignment 3 • Program character to have an emotional response to its environment. Attach emotional change to some perceivable phenomenon.

  30. Emotional assignment happiness = .5; OR this.getPosition(myPos); happiness = myPos.x(); OR …

  31. Assignment 3 • Don’t forget comments, println.

  32. Readings for Oct 21 • Braitenberg (handout) • Acting - Cohen (handout) • Vectorpark (link) • Stein (Ch 4)

More Related