Wednesday, October 5, 2011

Using the XPOSE for Dancing


Using the XPOSE for Dancing 111005


The XPOSE is a system for controlling one to fifteen avatars' animations and positions. It also can rezz stored objects. The XPOSE is best known as the system behind sex furniture, but it is also very useful for controlling dancing especially in shows. This notecard explains the use of the XPOSE for dancing.

=====

WHERE TO FIND THE XPOSE

The XPOSE was created by Miffy Fluffy and is found at XPOSE. You can get a free one with limited use or pay for versions that offer greater features.

=====

OVERVIEW OF THE XPOSE

There is a complete set of notecards inside the XPOSE that take you step-by-step through its operation. For dancing the XPOSE does three things
  1. ANIMATION SEQUENCE & TIMING - The XPOSE controls the dance animation timing for 1 to 15 avatars. For example, you can make and play dance sequences so 1 to 15 avatars can dance in sync or dance separate dance sequences.
  2. AVATAR POSITION - The XPOSE controls the x,y,z position of 1 to 15 avatars and let's you move to a different x,y,z position when you want.
  3. REZZ OBJECTS - The XPOSE can rezz objects up to 256 linked prims.
The XPOSE scripts are all contained in one prim that can be modified. To use your XPOSE you must have rezzing rights. In the contents of the XPOSE prim are several modifiable notecards, two of which are important for controlling the sequence of dances (.MENUITEMS) and positions of the dancers (.POSITIONS). You rarely use the other notecards. To create a dance sequence you modify the .MENUITEMS and .POSITIONS notecards.

=====

INSIDE THE .MENUITMES NOTECARD

The .MENUITEMS notecard is used for setting the sequence and timing for 1 to 15 dancers. The .MENUITEMS notecard also creates the menu that you use to control the dances. An example of the .MENUITEMS notecard is found in the DANCE QUEENS Free Stuff Box.

The first section of the example .MENUITEMS card shows the main menu.

-----
MENU: XPOSE Main Menu
TOMENU Holder1
TOMENU Alone
TOMENU F F
TOMENU FMF
STOP
GIVE Help | !XPOSE Help
TOMENU Options >>
-----

Each of the lines is important.

MENU: XPOSE Main Menu - This is the name of the main menu that shows up when u click on the xpose prim to activate the XPOSE.

TOMENU Holder1
TOMENU Alone
TOMENU F F
TOMENU FMF
These are links to submenus in the XPOSE. In this case there are four submenus.

STOP - This stops the action and should be on every menu and submenu that can be seen in the XPOSE.

GIVE Help | !XPOSE Help - This gives a help notecard to whoever is using the XPOSE. This is important only if others are using the XPOSE. If you are the ony one to use it, you can omit this line.

TOMENU Options >> - This is an essential line that is used to get to the options menu and is important when you are adjusting pose ball positions that is explained later.

Under the Main Menu is the listing of submenus. You can even have sub-submenus. I choose to separate the menus with a blank line to make it easier to see the sections. The format of the submenus for dancing is pretty much the same from submenu to submenu.

Here is the first submenu in the example .MENUITEMS notecard:

---
MENU: Holder1 | ALL | PINK
POSE •Dance 1 | My-SLOW Dance-04
POSE •Dance 2 | My-SLOW Dance-05
POSE •Dance 3 | My-SLOW Dance-06
POSE •Dance 4 | keep that tune
POSE •Dance 5 | keep that tune 2
POSE •Dance 6 | keep that tune 3
POSE •Dance 7 | AkaeshaDanceMisc10 - Mosh Pit
POSE •Dance 8 | AkaeshaDanceMisc11 - Mosh Pit
POSE •Dance 9 | AkaeshaDanceMisc12 - Pete Townshend
STOP
BACK
---

Every submenu starts with the title or name of the submenu which is Holder1 in this case. If the submenu is linked from the main menu this name must be exactly the same in the main menu and this line of the submenu. The XPOSE requires complete accuracy in names and spacing ... I mean complete.

TOMENU Holder1
MENU: Holder1 | ALL | PINK

On the name line for the submenu is the word ALL, which in this case means anyone can use this submenu. PINK completes the line and means that a pose ball colored pink is rezzed by starting this submenu. The position of the pose ball is determined by the .POSITIONS notecard discussed later.

You can have 12 buttons on a submenu page. I recommend that two of these be BACK and STOP. Stop always stops the animations, while BACK takes you to the previous menu. The remaining 10 buttons can be for actions such as dancing or rezzing an object. In the example submenu nine dances are listed using the POSE command. The POSE command simply tells the XPOSE to run the animation associated with the command.

Now, Scroll to the bottom of the .MENUITEMS to the next to last submenu named

MENU: F F | ALL | PINK | PINK

This menu should begin to make sense. There are two pose balls and both are PINK. You have to use capital letters for the colors which are defined in the rarely used .SETTINGS notecard.

The second line is a POSE command but for two people.

The third line uses the PLAY command:
PLAY Slick | •Dance 26=26 | •Dance 32=20.9 | •Dance 33=24.7 | •Dance 27=25.9 | LOOP | NOCHAT

This sets a sequence of dances with the time defined for each dance.

=====


SETTING DANCE SEQUENCES AND TIMING

The PLAY command in the example is named Slick. It uses four dances in a sequence. This begins to look a lot like how the Huddes works,  but there are some significant differences.

Each dance must be defined for the XPOSE before it can be used in the XPOSE.  The first dance in the sequence is •Dance 26 which runs for 26 seconds. You can find •Dance 26 by scrolling up to Menu: Holder11. Here is what it looks like:

POSE •Dance 26 | JESSE1_DANCE_c_AKEYO | JESSE1_DANCE_c_AKEYO

This dance has both people dancing the same dance which is JESSE1_DANCE_c_AKEYO. This dance has to be in the contents of the XPOSE for the dance to work. Now look at the remaining dances in the PLAY Slick sequence. Aaaah, they are the remaining dances from the Akeyo JESSE series, so all that we have done is make a simple sequence of AKEYO dances using the PLAY command referring back to POSE commands.

The LOOP command does just what you expect. It repeats the sequence.
The XPOSE will tell you in a green colored chat when it changes POSEs in a dance sequence unless you add NOCHAT to the line. I find it annoying so I add NOCHAT almost always.

=====

DIFFERENT AVATARS AND DIFFERENT DANCES

One of the key things that one Huddles HUD cannot do is make different avatars dance different dances at the same time. In fact the XPOSE can control up to 15 avatars each doing a different dance at the same time.

With the .MENUITEMS card scroll to the very bottom to see the last submenu:

---
MENU: FMF | ALL | PINK | BLUE | PINK
PLAY Grind | •Dance 58=30 | LOOP | NOCHAT
PLAY Seated1 | •Dance 59=30 | •Dance 60=30 | •Dance 63=30 | LOOP | NOCHAT
PLAY Seated2 | •Dance 61=30 | •Dance 62=30 | •Dance 64=30 | LOOP | NOCHAT
PLAY Seated3 | •Dance 65=23 | •Dance 66=30 | •Dance 67=30.5 | •Dance 68=20 | •Dance 70=27 | •Dance 69=18 | LOOP | NOCHAT
STOP
BACK
---

The first line is easy to understand and shows the menu is for 3 dancers. Now, look at the second line:

PLAY Grind | •Dance 58=30 | LOOP | NOCHAT

When we find •Dance 58 we find it has three dances in it ... a different dance for each person:

POSE •Dance 58 | d7female | d7male | preening copy

What this does is sets up three pose balls with a different dance for each person
.

We can now make a dance sequence for three (or more) people with each person dancing a different dance. The next line in MENU: FMF does this:

PLAY Seated1 | •Dance 59=30 | •Dance 60=30 | •Dance 63=30 | LOOP | NOCHAT

Conceptually this is just like sequence we made for two people. The only diference is that each avatar dances a different dance. Here is •Dance 59:

POSE •Dance 59 | Bannana Split | AkaeshaMSit03 | f_dance_20 | REZ=Rez chair

I added an additional feature of the XPOSE to this PLAY sequence ... a chair. To do this I used the REZ command to rez an object I had defined as Dance Chair in MENU: Holder 21:

REZ Rez chair | Dance Chair | UNREZ-P

So, PLAY Seated 1 rezzes a chair and has each avatar dancing a different sequence ... WOW, you cannot easily do that with the Huddles.

One of the things you will need to design into your sequence is that different dances have different loop times. So you may want to change the dance for person 1 but not for persons 2 and 3. You can do this by using a different POSE with the changed dance for person 1. The way the XPOSE works (and Huddles too) is that if the notecard changes the POSE but the dance a person is doing does not change, it does not restart the dance. The XPOSE continues the dance. This concept becomes important when you are making an animation sequence for a show and can get quite complicated.

The length of a line is also limited to 256 characters, but you can continue the sequence on a new line by starting the next line with the | symbol.

=====

SETTING POSITIONS

We have set up the dance sequences and timing, but we have not placed the dancers where we want them. This is the purpose of the second important notecard in the XPOSE called the .POSITIONS.

Look at the sample .POSITIONS notecard in the DANCE QUEENS Free Stuff Box. Take a look at line 3 of the .POSITIONS notecard:

{•Dance 1} <-1.227,0.195,0.881> <-2.1,2.2,45.1>

This line sets the position of •Dance 1 which we defined in the .MENUITEMS notecard. This was a single dancer so we are defining only the position of one pose ball. The pose balls are rezzed by the XPOSE when you select the POSE or a PLAY containing a POSE. The pose balls are rezzed relative to the position of the XPOSE. If you put the XPOSE upside down or orient it 90 degrees the pose balls will be rezzed relative to the current position of the XPOSE.

The format of the position is pretty simple. The first set of numbers inside the brackets <-1.227,0.195,0.881> are the position of the pose ball relative to the center of the XPOSE in x, y and z coordinates. The second set of numbers <-2.1,2.2,45.1> is the rotation in degrees on the x axis, y axis and z axis. Don't be afraid of all these numbers. There is a simple way of getting them.

Normally I set up one dance sequence at a time by defining the sequence in the .MENUITEMS card then defining the positions in the .POSITIONS card. I start out with the pose ball at almost any position, then use the adjusting feature of the XPOSE to move the pose ball to where I want it and print the position in chat. Then, I just cut and paste the information into the .POSITIONS notecard. The XPOSE instructions explain how to do this.

Now, scroll down the .POSITIONS notecard to find

{•Dance 26} <0.727,0.195,0.881> <-2.1,2.2,90> | <1.477,0.195,0.881> <-2.1,2.2,90>

This is an example of a two person dance. The concept is exactly the same for positioning each dancer and the two are separated by using the | symbol. You can set the positions of up to 15 dancers using the same method.

You can set the position of dancers for each POSE. The positions can change so in this way you move dancers around the floor.

The pose balls cannot be more than 10 M from the center of the XPOSE. For you math inclined this can be calculated by first determining the distance between the XPOSE and pose ball for the x, y and z coordinates, e.g. x1, y1 and z1. Square each distance and add them together, then take the square root. This gives you the distance of the pose ball from the XPOSE. Anything over 10 will not work in the XPOSE.

If you are not math inclined, rezz this DANCE QUEENS - XPOSE Distance Checker found in the DANCE QUEENS Free Stuff Box and place it at the exact x,y,z coordinates of the XPOSE center. Any pose ball outside the ball will not rezz.

=====


SETTING THE POSITIONS OF REZZED ITEMS

To rezz an object you have to have to do several things. First, the object must be 256 or fewer prims (linked). The object must be both copy and transfer. It must contain the script :XPOSE Rez Object which is available in the XPOSE. The object cannot be more than ten meters from the center of the XPOSE.

Like with the pose balls I start with the object at almost any position then adjust the position as described in the XPOSE instructions. Here is what the result looks like:

{Dance Chair}' <-1.588,-0.096,0.659> <180,0,45>

=====


PUTTING IT TOGETHER

Once you have the .MENUITEMS and the .POSITIONS card done, you put them in the XPOSE and reset it. After resetting click on the XPOSE and test it out.

If you want to try the exact XPOSE used as examples in this class, you can usually find it in a purple table at my club # TTOO BAR. It is in the long part of the table. It is set up for anyone to use.

It is not easy to learn the XPOSE. I think it's equivalent to learning the Huddles. But, once you have mastered it, you have capabilities that are not available with the Huddles.

=====

xxx
Nottoo Wise