Saturday, November 03, 2007

Day 405: Creating Poses Part 2 (Animations in Objects)

In Creating Poses Part 1, we used QAvimator to create a simple pose animation and uploaded it to Second Life.



Whats the one thing that we cant live without in Real Life, but rarely use in Second Life?

Our purses, of course :)

Like most accessories, purses/handbags are prim attachments. They are typically attached to the shoulders or hands.

If we attached a purse to our shoulder, it would just magically hang there (and never slip off no matter what we are doing). Also, it would move around oddly while we go thru different stand poses.



Wouldnt it be nice if our arm is positioned properly whenever we Wear the purse?

In this Part 2 of the tutorial series, we will do just that! We create a pose animation and put it into a purse. So whenever you Wear the purse, your arms will automatically hold the purse :)

We are going to create a pose animation that positions our avatar's shoulder, arm, and hands to hold the purse. This will keep the purse in place and stop our shoulder from moving because of the built-in stand poses.

We will put this animation into the purse, along with a script, so that the animation will automatically Play whenever we Wear the purse.



To complete this part of the tutorial, you will need a free box from Yadni's Junkyard (Search/Places for "yadni"). The box is on the 2nd floor of the freebie wall. Its labeled "111 FREE CLOTHES ACCESSORIES AND JEWELS -03/07-". Just Buy it for L$0 :)


Ready to create the animation? :)


Create the Animation



Important Note: This animation may look slightly different on your avatar! This is because each avatar has a slightly different shape (height, arm length, etc.). But if this pose doesnt look perfect on your avatar, you can always adjust the purse or the pose :)

Go ahead and start the QAvimator program. The steps for setting it up are in Part 1 of this tutorial series.



Make sure that the "Figure" setting is set to "female" (sorry guys, you have to figure out your own purses ;P).

Change the number of frames from 30 to 2 at the bottom of the window. It should read "Frame 2 of 2" when you are done.



Click on the avatar's Left Collar (or "lCollar"). This is the small area between the avatar's upper arm and neck.

Change the "Y Rotation" to "6".

Change the "Z Rotation to "-10".



Now do the same thing for the Left Shoulder, Left Forearm, and Left Hand. Here are the settings:

   lShldr X:3 Y:36 Z:-60

   lForeArm X:0 Y:-123 Z:-2

   lHand X:23 Y:-5 Z:-9



Make sure that the ONLY body parts you move are the lCollar, lShldr, lForeArm, and lHand! This is because we dont want to override any other avatar animations (like walking or breathing).

Only these 4 body parts should have a little bump in the lower left window.



Click on "File" from the top menu bar. Select the "Save As..." option.

At the "Save Animation File" window, type in "Hold Purse.bvh" in the File name box. Note that you HAVE to type in the ".bvh" part of the name!





Upload and Testing the Pose

Its time to try out our new pose :)



Start the Second Life program.

Select the "File" option from the SL top menu bar. Select the "Upload Animation (L$10)..." option.

At the Preview window, change the "Priority" to 2. We will talk more about Animation Priority in the next Part of this tutorial series.

Click on the "Loop" checkbox (because we want to play our pose indefinitely).

Change the "Hand Pose" to "Left Fist". This will turn our left hand into a fist most of the time (unfortunately, this doesnt work very reliably).

Finally, press the "Play" button to see a preview of the pose.

If everything looks good, click on the "Upload (L$10)" button to upload the animation! (Note: this will cost L$10!)



Next, look in your Inventory for the "111 Free Clothes Accessories and Jewels-02/07-" folder you picked up from Yadni's Junkyard.



Pick one of the "Side Purse". You can get a quick list by typing "purse" into the Inventory Search bar.

Right-click on the "Side Purse" and select "Wear".

Optional: Type "bling off" in the Chat window before you go blind from the bling ;P

Extra Credit: Hunt down the prim with the "bling" script and remove it to reduce lag from the listener :) Just make sure you do "bling off" before removing the script!



Look for the "Hold Purse" animation in your Animation folder. Right-click on it and select "Play in World".

You should now be holding your new designer purse in style ;P





Create the Hold Purse Script

OK...now that we have a pose that works, we need to put it in our purse.

We will need a script to "Play" our pose whenever we Wear it.



Open your Inventory window. Select "Create" from the top menu bar and select "New Script".

Change the name of the script to "Hold Purse Script".







Double-click on the "Hold Purse Script" to open the Script editing window.

Replace everything in the Script editing window with this new script below:












   //-------------------------------------------------------------

   default
   {
      state_entry()
      {
         llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
      }

      run_time_permissions(integer parm)
      {
         if(parm == PERMISSION_TRIGGER_ANIMATION)
         {
            llStartAnimation("Hold Purse");
         }
      }

      on_rez(integer st)
      {
         llResetScript();
      }

      attach(key id)
      {
         llStopAnimation("Hold Purse");
      }

   }

   //-------------------------------------------------------------



Click "Save" in the Script editing window to save the script and close it.


Put Animation in Purse

Now that we have all the components, lets put them in the purse!



Go ahead and Wear the purse.













Right-click on the purse and go to the "Contents" tab.

Drag-and-drop the "Hold Purse" animation from your Inventory into the Contents tab of the purse.

Drag-and-drop the "Hold Purse Script" from your Inventory into the Contents tab of the purse.

Right-click on the purse and select Detach.










The next time you Wear your purse, your arms will automatically be positioned to hold it :)

Thats it! You are now ready to do some serious shopping :)




numly esn 39966-071108-316795-10

© 2007 All Rights Reserved.

11 comments:

October Hush said...

That is such a cool idea. Genius, Natalia =)

Moran Singh said...

I do love your tutorials. I keep learning so much.

Jenyca Jewell said...

Dear Natalia. Thank you so much for these tutorials. You truly are one amazing mermaid (for all seasons). Now I can create my own cleaning animations. Where have I put that duster..

Krystina said...

I was wondering when you make things and post pictures for everyone to see I never see anyting in the background its always a solid color how do you get that cause I try making things in world n I always have a hard time seeing everything

SLNatalia said...

October, thanks! Have fun with your purse :)

Moran, thank you. I hope you enjoy this one as well :)

Jenyca, heehee thanks. Lol dont you wish you can have a cleaning anim in RL? ;P

Krystina, I have an area in my workshop for taking pictures. Its completely white and "Full Bright". This make it easier to remove the background in Photoshop :)

Krystina said...

Sorry if this is the wrong place to be askin everything I am new to SL so I don't know where to ask things but where do you get a workshope

Lunette Fouroux said...

Thanks for this tutorial! I was just thinking a couple days ago that I would be more likely to carry a purse if I could hold it like I do in RL. You must have read my mind. :)

Crunch Underwood said...

G'day nat! great post, i'll never use a purse haha! but it has given me some idea's on adding some poses to some logs i have around a camp fire at my home
cheers!

-Crunch

SLNatalia said...

Krystina, my workshop is a skybox that I built (http://slnatalia.blogspot.com/2007/02/day-155-home-and-miss-second-life.html). Its just a few hollow 10M prim cubes glued together :P

You do need some land in SL to build a permanent workshop. Alternatively, you can use something like a Workspace Buster (http://slnatalia.blogspot.com/2007/02/day-140-sunday-search-for-privacy.html) in a Sandbox as a temporary place.

I saw some classes on building a skybox a few weeks back. So try Search/Events, in the Education Category to see if theres a skybox or house building class. Good luck!

Lunette, I know what you mean! I miss my purse in SL (actually, its the only place I can have designer purses ;P)

Crunch, uh oh...what are you going to do with those fire logs? ;P

Jinxie Jaxxon said...

What can I say, Natalia...your diaries and tutorials have opened up a whole new world inside SL for me. Okay, shopping is great, clubbing is a blast, but understanding how it all works is key for me, and why I've stayed. I think most people, after a while, want to dig a little deeper and create rather than just consume, but getting to grips with the techie talk isn't always 'blonde' friendly. Thank you, I'm off to build!

Natalia Zelmanov said...

Jinxie, Im so glad you decided to make things in SL ;) Heehee thats def the funnest part of SL...good luck and have fun with all your projects!