nPose is an open source tool for placing and controlling animations in furniture, or other prims which avatars can sit on. The tool has been around since at least 2010. (reference) I need such a tool for a sofa I am making. In my search I found nPose and thought it might be the answer. This tutorial is the outcome of my research. I am writing it in the early stages of my use of nPose, so expect this tutorial to get updates as I learn more. But, it should get you started.
The older nPose v0.028, also labeled as version 1.27, can be found here: User:Nandana Singh/nPose. nPose has had considerable work done on it since then. So, I do not recommend using this version, but it works.
A newer version is discussed here: User:Rev Eponym/nPose. The page does not include a download link. You can get the latest version of nPose at Builder’s Brewery. This SURL should pop you right in front of the vendor for nPose (free), at least as of October 2014.
The in world SL Group for nPose is named: nPose. There seem to be more people online in the SL morning than afternoon. I had better luck getting answers in the morning than afternoon. But, I haven’t been in the group long, so that may not be accurate.
Several people have been involved in advancing nPose. The latest work I found was done in June 2014. So, this is a script I consider under active development.
Rev Epony, explains how to use the scripts in the following steps. The wording in [ ] I have added.
- Rez the object you’re going to set up with nPose.
Ideally, the object’s root prim should be empty.
- Copy the animation files you want to use into the object [its root prim]
- Create and copy in notecardsthat define poses for the animations (see that section below) [this refers to additional instructions on the wiki page]
- Copy the nPose core scripts into the object: Core, Menu, Dialog, Slave
- Copy the nPose Adjuster Prim into the object
- Reset scripts in the object [SL Viewer: Build->Scripts->Reset]
- Set up positions:
- Sit on the nPose object to access the menu [You can access the menu by left-clicking. But, you need to sit first to make ‘Seat 1’ active for the following steps.]
- Click the Admin button
- Choose Adjust from the submenu
- The Adjuster object will appear [in the current version ALL Adjuster objects for ALL seats listed in the note card appear. You may have to work your way through them to find the one currently attached to your avatar. More below – see image.]
- Edit the Adjuster and position [This is standard prim right-click and edit] it where you want your avatar to be sitting, relative to the object [there is a delay between moving the Adjuster and the avatar moving.]
- The Adjuster will say its position in local chat each time it moves
- Copy the appropriate line of text from the chat window
- Edit the note card for the animation pose, and replace the existing text with the Adjuster’s location info [if you have more than one ANIM line in the card, you have to know which line should be edited. More below.]
- Save the position note card
- Click Stop Adjust from the Admin menu [or… change seat or animation and adjust another.]
- Repeat this process for each animation pose
- This will enable animations on an object that will seat one avatar only. Read on for deeper detail. [True until I modified it a bit.]
I took these steps from Epony,’s page. I had some trouble figuring out what they meant and how to add seats for multiple avatars from the other instructions on the page. So, I’ll explain some things another way and hope it helps some people with a mindset similar to mine.
I think most of us are used to furniture with menus for selecting animations. Of course nPose has such a menu system. The challenge here is understanding how to build the menu structure in the pop up dialog that you want.
Note Card Names
The menu system is built using note card names. It is not what is in the note card, but the NAME of the note card that is used to create the dialog buttons and menu tree.
The basic concept of names is to specify the TYPE, Group-button name, Sub-Group-button name, [more sub-groups names],button name as the note card name.
Inside the cards are the instructions for the button action. Each button needs a card. Each animation needs a button.
Sounds simple. The first mistake I made was thinking I needed to specify an initial group. I didn’t. Example:
SET:Female Sits:Crossed Legs
A note card with this name will create a button entry on the top level menu labeled Female Sits. Clicking it will reveal a sub menu with a button labeled Crossed Legs. The note card will contain the instructions for the button Crossed Legs.
You could make more menus and move the Crossed Legs instructions/action deeper into the tree.
This would create a first level button labeled Sits, a second level button labeled Female, and a third level button labeled Crossed Legs. The colons tell nPose where to break things up.
You will need a card for each animation/pose or action you want to use.
You can get 12 items in a single dialog, minus the buttons for Previous, Forward, and Back. nPose will automatically add the buttons as needed.
You can make a DEFAULT note card. It behaves and contains the same information as a SET card, but nPose uses it as the default sit position for your item. So,
…will make the Crossed Legs the default sit for your furniture item.
The simplest SET card you can make contains only instructions for selecting an animation/pose. I make a card named SET:Template. This is a note card I use to make other cards. The only line in the card is:
ANIM|[exact animation name here]|<0.0, 0.0, 0.0>|<0.0, 0.0, 0.0>
Tip: It is important that SET and ANIM be all caps.
As I make cards for each animation I use this card as a copy-paste source and change [exact animation name here] to the actual animation file name, which has to be in the piece of furniture or whatever thing is being set up. The animation name placed in the card MUST be the exact name of the animation file.
If there is a question about the [ ] brackets, are used ONLY to represent text that will be replaced by you. The final edited line should look like this (in my case – see the image above… way above):
ANIM|sit crossed|<0.0, 0.0, 0.0>|<0.0, 0.0, 0.0>
The actual content of the ‘template’ card I use looks like:
ANIM||<0.0, 0.0, 0.0>|<0.0, 0.0, 0.0>
It is a little harder to see what needs to be replaced. But, in practice it is a little easier to use for building multiple cards.
Tip: The button name and animation do not have to be the same. Your button name can be anything you want. So, make it descriptive.
The basic work flow here is to make all the cards you need to play your animations. Add the animations and cards to the furniture. Then add the system buttons (12 buttons in Utilities set) and nPose objects to the item. This includes the Adjuster and Admin HUD. Once you think you have the furniture set up add the core scripts.
At this point if you sit on the furniture you’ll sit at the root prims 0,0,0 location. You’ll need to sit using each pose to set its pose/animation position. You sit, then click Utilities->Admin->Adjust. The Adjust tool appears. Right-click it and select EDIT and edit for position as you would any prim.
Each time you move the adjuster, it prints the new settings in chat. The avatar lags a second or two behind the Adjuster. When the avatar is positioned as you want, copy the settings from chat and paste them into the note card. When you next reset the scripts in the furniture your working on, the changes will take effect.