1 / 16

CS590VC – Tutorial 8

CS590VC – Tutorial 8. Animations in SL through external application. What is animation?. Technique of using frames (or steps) to give the illusion of smooth movement. Can be applied to avatar, texture, particles & prims/objects Default animations in LSL (go to LSL wiki)

johnna
Télécharger la présentation

CS590VC – Tutorial 8

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. CS590VC – Tutorial 8 Animations in SL through external application

  2. What is animation? • Technique of using frames (or steps) to give the illusion of smooth movement. • Can be applied to avatar, texture, particles & prims/objects • Default animations in LSL (go to LSL wiki) • Custom animations can also be created using programs such as Poser, Blender, Posemaker, Avimator (FREE!!!) etc.

  3. To upload custom animations • Import from any ‘animation builder’ program into Second Life by storing them as Biovision Hierarchy files, which have a file extension of BVH • main menu File > Upload Animation command • There is a L$10 fee for uploading an animation - very few things come without price folks!!!

  4. BVH files …. ??? • Developed by Biovision, a motion capture services company, as a way to provide motion capture data to their customers. • Has two parts: a header section which describes the hierarchy and initial pose of the skeleton; and a data section which contains the motion data • Text data that describes each figure part's rotation and position along a timeline. • Lack of a full definition of the basis pose - has only translational offsets of children segments from their parent, no rotational offset is defined • Lacks explicit information for how to draw the segments but that has no bearing on the definition of the motion.

  5. Avatar animation methods - 1 • llGetAnimation - returns the current basic animation state for avatarid. (for basic animation states refer - http://lslwiki.net/lslwiki/wakka.php?wakka=llGetAnimation) • llGetAnimationList - returns a list of keys of all playing animations for avatar id.

  6. Avatar animation methods - 2 • llStartAnimation - triggers the animation anim. NT 1: In order for this to work, the script must have the PERMISSION_TRIGGER_ANIMATION permission on an avatar. See llRequestPermissions and llGetPermissions for more information on permissions. NT 2: Built-in animations always work, but if anim is a custom animation, it must be contained in the inventory of the scripted prim. • llStopAnimation - stops the animation anim. NT 1: In order for this to work, the script must have the PERMISSION_TRIGGER_ANIMATIONpermission on an avatar.

  7. Prim/Object animation methods • Dynamics (or physics) is concerned with moving or rotating objects and prims. • They are broken into two categories: Kinematic & Kinetic • Kinematic functions operate on non-physical tasks and generate motions without consideration of forces and torques. • Kinetic functions generate forces and torques on physical tasks, and the resulting motion is determined by the mass (inertia) of the object or prim. Note that an object's energy modulates the force that is actually applied.

  8. Kinematic methods • llSetPos • llSetRot • llSetLocalRot • llSetScale

  9. Kinetic methods • llApplyImpulse • llApplyRotationalImpulse • llGetAccel • llGetForce • llGetTorque - Equivalent to llGetAccel for rotational movement. • llGetOmega - equivalent to llGetVel for rotational movement. • llGetVel • llGroundRepel • llMoveToTarget • llPushObject • llSetBuoyancy • llSetForce • llSetForceAndTorque • llSetHoverHeight • llSetTorque • llTargetOmega

  10. Texture animation method • llSetTextureAnim : animates the texture on side of a prim. • Only one animation can be run per prim, although all sides of a prim can be animated at the same time by setting side to ALL_SIDES. • ANIM_ON - enable texture animation (0x01) • LOOP - loop when animating textures (0x02) • REVERSE - animate in reverse direction (0x04) • PING_PONG - animate forward then reverse (0x08) • SMOOTH - slide texture smoothly instead of frame-stepping (0x10) • ROTATE - rotate texture instead of using frames (0x20) • SCALE - scale texture instead of using frames (0x40)

  11. Particles animation method • llParticleSystem(list parameters): makes a particle system based on the parameter list. The parameters are specified as an ordered list of parameters and values. • Each particle system is specified with a list consisting of the flags ORed together ([PSYS_PART_FLAGS, flag | anotherflag]) followed by the pattern ([PSYS_SRC_PATTERN, pattern]) and then pairs of parameters and their values. • For parameters refer: http://lslwiki.net/lslwiki/wakka.php?wakka=llParticleSystem

  12. Things to do today • Animate an avatar from an external C# client application through XML-RPC. • Animate a group of objects from the same external application using XML-RPC.

  13. Client Application • Create a C# Windows Console Application • Download the client codes: “client_code.txt” (the .cs file) & “client_class-code.txt” (the additional .class file) from blackboard • Paste the code in the editor and build

  14. Animating your avatar • Download the script file “avatar_anim.txt” (server) from backboard • Create an object as a server (anim) • Paste the script behind this object NT: the llRequestPermission() connects the anim with the avatar and hence should be set suing PERMISSION_TRIGGER_ANIMATION

  15. Animating a group of objects • Create an object and make a copy of it. Then link them • Download the server scripts: “parent_prim.txt” (for object 1) & “child_prim.txt” (for object 2) from blackboard • Select “Edit link parts” for each object and paste the corresponding scripts behind them

  16. References • http://lslwiki.net/lslwiki/wakka.php?wakka=animation

More Related