Saturday, December 01, 2007

Day 433: Flexi Skirts Part 2 (Self-Adjustment with AttachmentSet)

Once upon a time, a little mermaid put on her legs and a little black flexi skirt to visit some friends...

At her friend's house, she sat on a pretty little chair and...

*Eeeek* What happened to my skirt?

Unfortunately, this is a common problem with flexi skirts (and other prim attachments). Some attachments work well in one position (like when you are standing), and look funny in other positions (like when you are sitting or walking).

Wouldnt it be nice if the flexi skirt can adjust itself when you are in different positions?

Well, you can! Thanks to Carricre Wind and Virrginia Tombola's wonderful AttachmentSet :)

AttachmentSet Overview

AttachmentSet is a script that will adjust a prim attachment's position/rotation, depending what the avatar is doing. You can have different positions/rotations for standing, sitting, ground sit, walking, and running.

AttachmentSet is simple to use. And best of all, its FREE! :)

You can pick up the free AttachmentSet script at Sirena Hair & Fashion (Search/Places for "sirena", the SLURL is Sirena Hair (116,217,22)).

My longtime friend Virrginia Tombola has written an excellent and detailed AttachmentSet Tutorial on her blog. She has tips on how to deal with lag when using AttachmentSet. She goes into stuff thats way over my head :P

If you find AttachmentSet useful, be sure you drop Carricre Wind and Virrginia Tombola a note to thank them for creating such a wonderful and Free tool! :)

A Little Black Dress with AttachmentSet

Virrginia's Tutorial covers AttachmentSet in detail.

So Im going to show you how to create a little black dress that uses AttachmentSet. It's a step-by-step tutorial, but it will not go into details on how AttachmentSet works.

You will need both the AttachmentSet script and Ged Larsen's LoopRez to complete this tutorial. You can pick them both up for free from Sirena Hair & Fashion (Search/Places for "sirena", the SLURL is Sirena Hair (116,217,22)). You can find the free "Ged Larsen's LoopRez Generator" package in the Tutorial Supplies area under the giant mermaid sign.

If you have never created a flexi skirt using Ged Larsen's LoopRez, you should try the Flexi Prim Skirt tutorial first before doing this tutorial. You will need to know how to generate a flexi skirt with a specific skirt panel.

First, the top: Right-click on your avatar and select "Appearance...". Select the "Shirt" tab. If you are already wearing a shirt, select the "Take Off" button.

Click the "Create New Shirt" button.

Click on the square above "Color/Tint". Select the Black square.

Enter the follow settings:

Sleeve Length: 27
Shirt Bottom: 100
Collar Front: 78
Collar Back: 78
Shirt Fit: 0
Shirt Looseness: 0
Shirt Wrinkles: 0

Click the "Save As" button and enter "Tutorial Shirt" as the Name.

(Optionally, you could use the top from the Creating Clothes with GIMP or Creating Clothes with Photoshop tutorials.)

Next are the "Glitch Pants". These pants provide the background for the flexi skirts (and provide some...umm...essential coverage :P).

In the Appearance window, select the "Pants" tab. If you are already wearing pants, select the "Take Off" button.

Click the "Create New Pants" button.

Click on the square above "Color/Tint". Select the Black square.

Enter the follow settings:

Pants Length: 20
Waist Height: 100
Pants Fit: 0
Cuff Flare: 0
Pants Crotch: 0
Pants Wrinkles: 0

Click the "Save As" button and enter "Tutorial Pants" as the Name.

Flexi Skirt for AttachmentSet

Now comes the fun part: we will make a flexi skirt designed for AttachmentSet :)

You can use just about any flexi skirt with AttachmentSet. But since the skirt is rotated upward when you sit down, the skirt panels tend to open up. If the skirt panels are narrow, they will leave a large gap...

We need to create a flexi skirt with wider and more curved (less Path Cut) panels.

Go ahead and rez a cylinder on the ground...

In the "Object" tab, enter the following settings:

Size X: 0.158
Size Y: 0.300
Size Z: 0.440

Path Cut B: 0.150
Path Cut E: 0.850

Hollow: 0.95

Taper X: -0.75
Taper Y: -0.75

In the "Features" tab, enter the following settings:

Softness: 2.000
Gravity: 4.000
Drag: 4.000
Wind: 1.000
Tension: 1.000

In the "Texture" tab, click on the square above "Texture". In the Pick:Texture window, click on "Blank" and then "Select".

Click on the square above "Color". In the "Color Picker" window, click on the Black square and then "Select".

Go to the "General" tab. Change the Name to "Tutorial Panel".

Now Right-click on the "Tutorial Panel" object and select "Take" to take it into your Inventory.

Rez the "LoopRez v0.6 object, full perms" object on the ground.

Go ahead and follow the steps from the "Making Flexi Prim Skirts with Ged Larsen's LoopRez Script" tutorial. Create a flexi prim skirt using your newly created "Tutorial Panel".

Use the following settings for the LoopRez script (its the same settings as the "sample-short" skirt):

string objectName = "Tutorial Panel";
integer numObjects = 12;
float xRadius = .16;
float yRadius = .22;
float flareAngle = 45.0;
float bendCoefficient = 0.0;
vector rotOffset = <0.0,>;
vector posOffset = <0.0,>;

When you are done, you should have a little black skirt that looks something like this :)

Go ahead and attach the skirt to your Pelvis. Adjust the skirt as necessary.

For me, the skirt looks good with the following Rotation settings:

Rotation X: 180.00
Rotation Y: 74.00
Rotation Z: 180.00

Using the colored arrows to position the skirt. Using the numbers at the top middle of your screen as a guide, the following Position fits me well - X: 0.043, Y: 0.000, Z: 0.306.

You should now have a little black dress thats all ready for AttachmentSet :)

Adding AttachmentSet to the Skirt

While you are wearing the skirt, Right-click on the skirt and go to the "Content" tab.

Drap-and-drop the "AttachmentSet OSS" script from your Inventory into the "Content" tab of the skirt.

Right-click on the skirt and select "Detach". (This step is VERY important! The script wont work unless you Detach first!)

Look for the skirt in your Inventory and "Wear" it again.

Now, we are ready to setup the skirt with AttachmentSet :)

In your Chat window, type "/66 suspend" (without the quotes). You should see a reply from AttachmentSet that says, "[Your Skirt]: Skirt animations stopped."

Next type "/66 set stand". This sets up your standing position/rotation.

Find a comfortable chair nearby and sit in it :) You should use a chair without poseballs or poses installed. When in doubt, you can just rez a box and sit on it for now :P

You will notice that our skirt still looks bad...

Right-click on the skirt and select "Edit..."

Click on the "Rotate(Ctrl)" button at the top of the Edit window. Use the Green wheel to rotate the skirt up.

Alternatively, you can enter the following settings:

Rotation X: 0.00
Rotation Y: 38.00
Rotation Z: 0.00

Click on the "Position" button at the top of the Edit window. Use the Red arrow to slide the skirt forward and the Blue arrow to slide the skirt down.

Using the numbers at the top middle of your screen as a guide, the following Position fits me well - X: -0.052, Y: 0.000, Z: 0.191.

Once our sitting position/rotation looks good, we need to tell AdjustmentSet above it...

In your Chat window, type "/66 set sit".

Click the "Stand Up" button at the bottom of your screen. Notice that your skirt is in a weird position :P

OK, we are ready for AdjustmentSet to do its magic :)

In your Chat window, type "/66 resume".

Walk forward a little bit. You will notice your skirt now goes back to its "normal" standing position.

Go ahead and sit down again. Notice the magic :)

Congratulations! You just made a Self-Adjusting Flexi Skirt. Super cool, isnt it?

Adjusting for Other Actions

Most flexi skirts will go into your legs when you walk. This is typically hard for you to see yourself, but everyone around you can see it :P

You can fix this problem by rotating the skirt up a bit using the same steps as above. When you are done, just say "/66 set walk".

And you should be walking in style :)

AdjustmentSet can store adjustments for:

"/66 set stand": Standing
"/66 set sit": Sitting
"/66 set ground": Ground sit
"/66 set walk": Walking
"/66 set run": Running

Dont forget to check out Virrginia Tombola's AttachmentSet Tutorial for more details and information on AttachmentSet. And be sure you to thank Carricre Wind and Virrginia Tombola for creating AttachmentSet! :)

Im back for some more Dragon Tea.

And this time, no more looking up my skirt you guys! ;P

numly esn 11563-071201-327680-82

© 2007 All Rights Reserved.


Peter Stindberg said...

I'm not sure who came first, but for some 3 months now there are quite good "intelligent" skirts at Nyt'n'Day which use an almost identical technology. They were the first in SL I saw using different adjustments depending on the action the avatar performs.

Rolig said...

I have been looking for this script since I first spotted the intelligent skirts at Nyt'n Day. Thank you SO much, Natalia! This is particularly good with short skirts (not quite as effective with long ones, I have just discovered). I still don't have the hang of setting it for walking, but with a little practice ..... ;-)

Jacks said...

Oh gravey... my partner is a HUGE fan of Nyt'n'Day clothing... me thinks I know what I will be practicing tonight for her. Thanks for the info. :D

SLNatalia said...

Peter, there have been "intelligent" skirts and scripts for some time now, probably almost a year. They have usually been for gowns. Unfortunately, these skirts or scripts were exclusive to particular businesses like Nyt'n Day.

AttachmentSet is an effort by Carricre and Virrginia to create a free, open script that anyone could use to make or modify their own skirts :)

Rolig, heehee have fun with your skirts. With longer skirts, you may need to widen the panels considerably (and tweak the flexi settings). Its definitely a lot trickier with longer skirts!

Jacks, Nyt'n Day makes really nices clothes, so Im sure your partner will continue to visit :) This script makes it possible to do the same things with other skirts!

Ekio Locatiare said...

Neat script! I have heard about the ones being sold. (skirts not scripts) just hadn't done my shopping yet.

This is perfect for pictures!

Virrginia Tombola said...

Miss Zelmanov, is, as always, Mistress of the Understandable Tutorial! Thank you very much for writing this--I'm afraid my prose can be a bit impenetrable at times.

Credit goes where credit is due. While I was involved in the creation of this script, Mrs. Carricre Wind who wrote it.

Mr. Stindberg is correct--there are other scripts like this out there. They are not open source, but I imagine they must work on the same principles (i.e. use a timer to poll avatar state and call llSetPrimitiveParams in response to said state). However, by leaving AttachmentSet full mod/copy, the new owner of a dress can easily modify it for her needs as well. Originally, AttachmentSet had "tweaking" functions, but frankly, it's MUCH easier to simply give the dress owner the full ability to modify the skirt positions.

Long dresses are doable, but as Miss Zelmanov notes, might require some adjustment of the flexi parameters so they don't droop too awfully much. My tutorial uses a long skirt, if you wish to take a peek at that to see what the positions would look like (I must admit, I haven't the self confidence to wear short skirts like Miss Z does, not even in SL!)

Final note for all the experimentally minded out there: AttachmentSet will work for ANY attachment, not just skirts. For example, one could make a parasol that points down at the ground when standing, but is placed jauntily over the shoulder when walking. I'm sure there are other applications possible, but my tiny brain hasn't really put itself to the task of thinking of them yet.

Rolig said...

OK, so I've been experimenting wih the Attachment Set script for the past day, and I've run up against two problems: (1) Rotating a skirt up to adjust for sitting automatically drags the waistband down in the back -- OK if you're in a seat with a back, but really UGLY if you're sitting out in the open -- and (2) When you stand on a pose stand, the script thinks you're sitting, so it flips the skirt up. I haven't figured out how to beat either problem. Otherwise, it's a cool script!

Virrginia Tombola said...

Hullo Rolig, I hope Miss Z doesn't mind me answering questions on her blog, but here goes:

Getting the skirt to look right when sitting can take a bit of a fiddle,depending on the skit. A few things may help. For one, you can try moving the skirt up and down a tad, so the waistband embeds in the avatar, instead of hanging out and looking ugly. Remember that AttachmentSet doesn't just rotate the attachment, it also can move its position. You will undoubtedly need to make at least a short glitch pant as Miss Z describes, so that one's fundament does not show O_O! Finally, if you still have trouble, you can reduce the flex of the skirt, which will translate into less rotation needed in order to clear the knees (and therefore, less rotation DOWN in back).

Before getting on a posestand (or dance ball, for that matter), type "/66 suspend" in chat. This will freeze the skirt in its current position. When done, turn the AttachmentSet back on by typing "/66 resume"

Hope this helps!

SLNatalia said...

Ekio, heehee yes, its great for pix :) We can finally take pictures sitting down! :P

Virrginia, thank you so much for making this script happen! We would never have had this wonderful script without your efforts. Now, all flexi skirt wearers can sit a bit more comfortably :)

And thats a wonderful suggestion about parasols! I cant wait to make one :)

Rolig, for #1, its good to have a longer set of glitch pants. Then you can move the skirt forward and things will blend :)

Heehee for #2...umm...what Virrginia said ;P

Thanks Virrginia :)

Rolig said...

Thanks, Virrginia --
Yes, those are the steps you have to take, but they still lead to an unpleasing result. The problem is not with the script, but with the limtations of SL. When you sit down in RL, the waistband of your skirt deforms. In SL, though, your waistband is rigid, so the best you can make it do is rotate. That means it dives into your avatar on one side of your body and sticks out on the other side. (Imagine trying to sit in a really short hoop skirt in RL.) You can reposition front to back or down to up, but the best you can do is minimize the effect. Glitch pants only deal with the color of what shows, not the shape. And of course, changing the flxi parameters of the skirt can help a little, but then it's not the skirt you designed in the first place.

I guess I've decided that this is a nice tool, but what we really need is a way to make a skirt actually deform when you sit, not just reposition itself. :(

SLNatalia said...

Rolig, unfortunately, the best we can do is fake it ;P

BTW, if you use the normal SL skirt as a base, it does work a bit better around you avatar when you sit. Not much better...just a tad :)

Tori said...

I wanted to say thanks again, lol, and I love your store I'm hoping to buy some of your hairstyles soon... hope they fit, I'm a kid in SL lol.

SLNatalia said...

Tori, thank you so much! Please let me know if you have any problems with hair fitting!

Most hairstyles are quite adjustable (you can shrink them quite a bit...even for a Tiny :D). I have a Tiny mermaid avatar (just experimenting ;P) with a very small head :)

Fran said...

Thanks for this wonder tutorial Natalia. I've been a great fan ever since I found your site. Go back to Virrginia's comment. Great tip for the poseball problem. My question is however, I'm looking to sell my skirts eventually, I suppose it wouldn't be possible (and not so elegent) to ask the customers to switch off the script when they get on poseballs. Is there anyway to get around it? Is there any commercial products out there that can resolve this? Many thanks!

Natalia Zelmanov said...

Fran, I dont know of a product that does it (Im not sure it could be done, because I dont know if there is a way to tell between sitting on a poseball versus sitting on a chair). You might need to try the SL Forums for this one...

Lexia Ninetails said...

To note - I followed the SLURL and even looked up the Emptorium in game, but the freebie script isn't there anymore...the entire building looks different, and is empty with no cart outside.

Any other references I could find cost about 4000L$ for the script...

Lexia Ninetails said...

Update on that, they just moved it to the side of the building directly across from the Emptorium signed building.

Natalia Zelmanov said...

Lexia, thanks for the update! I will go check and update the SLURL :)

Anonymous said...

Hi, just a quick question, i couldnt help but notice that when ur explaining how to turn a prim into a skirt pannel it says to set the hollow to 0.95 but in the picture it's set to 95.0.

Natalia Zelmanov said...

Dear Anonymous, thats a fish-brianed mistake :P Hollow should be 95 :)

Anonymous said...

Natalja! You are great great great and wonderful wonderful wonderful! I love you!!!

Natalia Zelmanov said...

Dear Anonymous, heehee thank you so much ;)

Lane Luke said...

Has anyone come up with an updated slurl? I feel like I've been all over the map this morning trying to find this script, lolol. Much appreciated. :-)

Natalia Zelmanov said...

Lane, thank you so much for letting me know! I am working with Virrginia to get it put inworld somewhere so I can update this entry :)

Hailey said...

Hi Natalia!
Once again another superb blog entry but I was having a bit of trouble with the script.

Every time I stood up from sitting it was at my ankles, then when I went to edit it it went back to it's proper place.

I don't know if people read notecards nowadays so I'm stuck of what to do.

Maybe there's an error somewhere?

Natalia Zelmanov said...

Hailey, can always reset the script (press the Reset button) and setup the skirt again. It could just be lag when you were setting up the skirt position...

Anonymous said...

I FOUND THE SCRIPTS! lol sorry. too excited. after looking for it for a long time :-p It's in a building named Caveat Emptorium.


Natalia Zelmanov said...

Amy, heehee yes...unfortunately, it uses a telehub (not a direct TP). So you have to follow the red arrow.

Mauve Binder said...

OMG you just saved me so much money !!! I have been looking at the scripts and am so glad to have found this !! thank you so much !

Natalia Zelmanov said...

Mauva, heehee good luck on your project!