Friday, September 25, 2015

Snowy Fence Posts

There are 4 number values for where the snow lies on your fence: SnowThickness(Post/Rail)ScaleFactor and SnowThickness(Post/Rail)VerticalOffset.

To find out what your numbers should be you are going to need to know the height and width of the tops of the posts and rails of your fence mesh, as well as of the mesh you're cloning. The width is as seen when viewing along the X axis. I used Blender for my measurements.

For these equations: x=the measurement of your mesh
                                       y=the measurement of EA's mesh
                                       z=EA's original value for this parameter
You need to use the height when calculating VerticalOffset and the width when calculating ScaleFactor.

Railing-
For the railing, there are two straight forward equations to get this number. (In my testing, these equations worked 100% of the time. Score!)

For the Railing: SnowThicknessRailScaleFactor= (x/y)*z
                               SnowThicknessRailVerticalOffset= (x-y)+z


Posts-
This is a load of fun. I had to play with these a lot, so take these numbers with a grain of salt. Test, Test and Test again.

For the Posts: SnowThicknessPostScaleFactor= (x/y)*[0.6]
                           SnowThicknessPostVerticalOffset=(x-y)-[0.09]

The 0.6 and 0.09 are totally, completely VARIABLE. It is the result of tinkering until I liked how it looked. The larger you make the ScaleFactor the more you'll have to lower the number in brackets for the VerticalOffset. It appears to be a proportional, not a direct, connection.

I used an OMSP with EA's magazines sculpture on it to help me measure in game while testing these values. For instance, it allowed me to see that I needed to take off an additional 5 centimeters (.05) on the snow post height.


Example-

Sunny's Mesh- Post Top Height- 2.57
                             Post Width- 0.21
                             Rail Top Height- 2.09
                             Rail Width- 0.059

EA's Mullet Fencing- Post Top Height- 1.08
                                          Post Width- 0.14
                                          Rail Top Height- 0.955
                                          Rail Width- 0.095

Original Input- SnowThicknessPostScaleFactor: 0.4
                               SnowThicknessRailScaleFactor: 0.6
                               SnowThicknessPostVerticalOffset: -0.04
                               SnowThicknessRailVerticalOffset: -0.08

New Input-
SnowThicknessPostScaleFactor=(0.21/0.14)*[0.6]= 0.9
SnowThicknessRailScaleFactor= (0.059/0.095)*0.6= 0.372
SnowThicknessPostVerticalOffset=(2.57-1.08)-[0.09]= 1.4
SnowThicknessRailVerticalOffset= (2.09-0.955)+-0.08= 1.115

 The Result:

The Waffle- (Feel Free to Skip this Bit)
I could find quite a few instances where EA's Vertical Offset was 0, or the Scale Factor was 1. However, each of the fences I tested this on had different rail and post thickness and height. So it appears EA made a guesstimate and set a value of 1 per fence later tweaking the results until they looked correct. This is why you need EA's original numbers.

I say the connection between the Post ScaleFactor and Vertical Offset is most likely proportional, not direct. This is because as I moved up in Scale, my Vertical Offset changed differently.

Post Waffle- Originally, I followed the same equations for Post ScaleFactor/VerticalOffset. This gave me original values of 0.6 ScaleFactor and 1.45 VerticalOffset. This result was a snowball buried in the post that would have fit on the top of the post cap, but not on the entire width (which is what I'd measured.)

The more I increased the Scale Factor, the more I had to decrease my Vertical Offset. At one point I thought it was an increase of .01 Vertical Offset per 0.1 increase to ScaleFactor. Once I had added .15 to the Scale Factor, it was more like no increase to Vertical Offset. By the time I had mine pinned down I had to decrease the VerticalOffset by 0.05/0.3 (or approximately 0.167) per 0.1 I'd increased the ScaleFactor. So, to me, it appears proportional. I could get all ticky and graph it and come up with the equation, but by this point I was kind of done and I'm not that good at math. Also, it's quite possible this is an asymptote which would make my brain essplode to attempt.

Post ScaleFactor MulletFence Waffle- Thanks to This Calculator once I knew my ScaleFactor I did have an equation I could use should I ever want to clone the Mullet Fencing again.
New PostScaleFactor=7.143x-0.6 .
This equation will most likely NOT WORK if you use any other fence to clone from (and I can see Lots of reasons you wouldn't want to clone from this fence.)
~Sunny

Tuesday, October 28, 2014

Positioning the Baby rig

Strange stuff. Making poses for babies and I kept having the worst time getting the babies to stay rotated the way I put them. Finally, I opened an in game pose and found something that made me realize what had happened. You don't position the baby rig the same way you position any of the other rigs. Take a look:

Working on this pose set I had to constantly test and retest, repositioning the baby rig time and time and time again. I'd position the baby, a,a,locrot, save, reset, import pose and the above is what it would look like each and every time. I could not figure out why. Since I know of no tipsy omsp of random degrees I was really in a quandry. Why wouldn't the baby save in it's pose?

So I imported an animation from the game to see if I could spot the problem. Shockingly, I could. There was one particular from the above picture that was the same in both poses. The crosshairs of the b_root_bind.


 See right there? They're highlighted, the joint inside is not. Notice something about them? It's lined up perfectly with the global axes.

Here you can see all three axes. What's happening is it will save the location of the b_root_bind, but it won't save a rotation of it. It will stay oriented with the axes no matter what you do or where in space you put it. So how do you rotate the rig and get it to stay?


Using either (or both if you prefer) of these joints. The joint on top in the picture (not in the center of the crosshairs) is actually about 4 different joints. In my testing so far, using any of them will save baby's rotation just fine.


In this picture, I've moved the baby into position (again! UGH!) using those joints. Notice that I even moved the location of the joint that was originally in the center of the crosshairs and it saved fine.


So rotate those babies! Just don't drop them. ;)

Wednesday, August 13, 2014

Using The Local Axis to Rotate

In particular we're going to use the local axis to rotate the eyes after the rig has been positioned. We'll also be rotating them identically so the eyes are pointing in the same direction.

To start with we're going to open the joint tree to make selecting the eye joints easier. If you prefer just to click on the eyes until you get the joint, that's just fine too. If you do, skip this part.
Locate the afrig branch on the tree on the right of the screen. Your screen probably won't look just like mine, and that's okay.

Click on the plus signs next to the joints until you come to HeadNew, then look for the EyeArea branch.
Click on the plus signs to expand those. You'll probably need to scroll up down/left right to get there.

I'm going to put my rig in a really quick pose, please excuse it, I did it in like 3 minutes. So it's pretty unpolished.
As you can see her head is tilted and rotated and she's not looking at whatever it is that's in her hand. If I wanted to move the eyes here, I certainly could but it would be kind of sloppy and there's a possibility I'd make her cross eyed.

(Now there's something in her hand for her to look at,) I'm going to show how to move the eyes left/right first. Select whichever eye you'd like to begin with either by selecting the joint on the tree, or by clicking the joint on the rig.

Usually for left/right rotations you want to rotate your joints along the Z axis. But if I go to top down view to make sure I do that I can't see her face to know if I've rotated enough/overmuch etc. Also, since her head is tilted I wouldn't be able to get both eyes to rotate the same direction. However, I am going to start by hitting 'R' and then the 'Z' keys on the keyboard. You will know that axis is selected because the blue line will appear and it will also tell you you are rotating along the z in the lower left. Notice it says global. We don't want global. So hit the 'Z' key one more time.

You will see that the blue line moved to line up with where the eyeball is now. Viola. You can change the orientation of the axes to Local, Normal or Gimbal in one of the menus, but this works just as well.
Again, you'll see in the lower left that the Z axis is local instead of global. You'd rotate the eyeball however much you'd like, making note of the degree of rotation (if you want the right eye to be the same, it's in the lower left) and then rotate the right eye in the same way.


To rotate the eyes up/down it's basically the same, except for this one you can select both eyes at the same time and do it only once. Select the eyes, hit r, hit x and then hit x again.

Your axis will change and you can rotate the eyes up or down.

At 8 degrees (I typed it in instead of free handing it) she's looking at the envelope.

You can check your work if you'd like. I left her eyes looking a little bit over the envelope on purpose since I'd be posing for a story and so want the viewer to see her face and eyes from a shot that's not so low to the ground.

I hope that's a little bit useful! It's also an incredibly easy method to use for hands (select all the knuckles in a line, r,z,z, rotate, alt+g and then move to the next row) and a great way to make changes in a way that allows you to better see what you are doing and to make sure you're not over/under rotating.

Sunny's Amendment: Working in Blender tonight and I notice that when I hit z,z it's doing what it usually does when I hit y,y. So experiment and watch your axes to find the right one to move the joint in the direction you'd like.

Sunday, March 23, 2014

OrangeMitten's Choose the Outfit You Want To Pose the Rig In from -A-'s ClipTools Blog

Choose the Outfit You Want To Pose the Rig In

First and foremost, I did NOT write this tutorial. I take NO CREDIT for this. If the author/host of the original tutorial requests I take it down, I will do so gladly.


You can find the original tutorial HERE. All I'm doing is adding the pics that are missing from the other site. These are not the original pics, these are MY photos of the individual steps from my copy and set up of Blender.


I skipped the first part about cloning your CAS item from s3oc, because there are other pics on that site the describes and shows how to do that. So do that before you begin with this set.




Changing the Rig’s Clothing
In the Outliner over on the right hand side find the line that has
the rig in it.  For the female rig this line will say afRig.
Click the + next to it to expand it.


Right click on the part that you want to replace and select Delete
from the Outliner Object Operation dropdown menu which appears.


You will notice that part of the mesh disappears from the 3D view window leaving only the rig (bones & joints) behind.


The Scene tab should be selected by default when you import the rig.  If it is not you will need to click it.


The S3PY Rig Tools should be expanded by default but if they aren’t
click the black triangle next to the title to expand that area.
Scroll down if you cannot see this area or if you cannot see the Load
CAS button in this area.   Click the Load CAS button.


Navigate to where you saved the clothing item.  Click on the
item and then click the Import Sims 3 Prop in the upper right hand
corner.  Remember to remove both top and bottom garments from the
rig before opening your item if you’re planning on loading a 1 piece
garment.
You will see your new clothing item(s) appear on the rig in the 3d
view and you are ready to create your pose or animation.  Note that
some changes of clothing may cause the hands and other exposed skin to
turn white or black.  This will not affect your pose or animation
but if you would like to fix it so it shows skin texture there continue
to the next steps.  If you choose instead to begin making your pose
right away select a joint on the rig and switch to Pose mode first.


Click the Texture button on the right hand side.  It looks like a
red and white checkered box.  A new box will open below.
Scroll down to the first empty line and right click on it.


After you click on the empty line it will turn blue and a bar that
says New will show up below.  Click the checkered box next to the
bar.  Do not click where it says New click the checkered box.
     ~Sunny's note- I did NOT have to right click the empty line. Clicking it with the left mouse button worked. Right clicking it did nothing.


A menu will pop up.  Select afBody_m.


The empty line you selected will now show the afBody_m.  Use the
up arrow on the right to move it above the Multiplier for your garment.


In the Outliner box above you will notice two lines that start with
afBody.  One is selected and this is the one you have added the
skin texture to.  Click the other to select it so that it turns
white.  Again click the first empty line and when the bar that says
New in it shows up click the checkered box next to it.  Select
afBody_m from the menu.


Move afBody_m above the Multiplier as before and you will see you now have skin showing on the appropriate parts of your rig.


The skin will not be completely correct yet so scroll down to the Mapping section and change Generated to UV:
     ~Sunny's note- do this for both of the afBody rig files you changed.


If you’re in Object mode after adding the clothes and skin texture
just click a joint on the rig and switch back over to Pose mode to begin
creating your pose.
     ~Sunny's final note-Be sure to select the Scene tab again to be able to use your Clip Tools!
-------------------------------------------------------------------------------------------------------------------------


Personal notes from Sunny- Hair works the same way as CAS items. But! in my testing I was only able to get hair to work if it had been cloned using S3oc. I couldn't get a, oh let's say a PeggyZone (FOR EXAMPLE only) hair to show up on my rig. This is in my testing only. It might work for you.
Another note- depending on the outfit you have imported there may only be One afbody_m (or ambody_m, or whatever depending on your rig) to add the skin texture to. It's quite alright if you don't have two.

Monday, March 10, 2014

Quick Hands in Blender, OR What Clear Transform Location means


Today, I'm going to show you my quick cheaty way to do hands when hands aren't the focal point of the pose. I'm also going to show you how you can rotate a pose so that the joint is dislocated, and how to put that joint back in place without losing the rotation- aka: Clear Transform-Location.

We're going to start off with Harriet as our rig of choice, and to begin we will make her left hand into a quick fist.

For starters, select ALL the base knuckle joints on the Left hand. Then hit R, and type in 70 on the keypad and then hit enter.

See how the back of the hand gets all lumpy? We're going to fix that by hitting Alt+G. I'll get into WHY we do that in a moment.

Next, you will select all the middle knuckles on the hand and hit R on the keyboard, and then type in 90 on the keypad and then enter.

From the side (view 3 on the keypad) you can see the fingers are rotating slightly to the front of our Rig (The pointer finger shows it best.) So I want to rotate those fingers straight. This is always just a guessed number. Just do it until you feel they are straight.

Here's a very over rotated edition of that rotation. Notice the pinky is much longer, the pointer much shorter. That's because in this over rotation you've 'dislocated' the joint. You've stretched the bone. And that's something we don't want because it looks awful and painful in game. Hitting Alt+G keeps the rotation, but it puts the joints back into position.

After hitting Alt+G you'll see how nice your fingers look. There is no sideways bending and everything is properly rotated.

To finish the Quick Fist, select all the final knuckles and rotate them by 90*. Now you just need to adjust the thumb to your liking, and make minor tweaks to the hand, wrist, and individual fingers to make sure your fist looks like a fist.

Now, We'll do a Quick Relaxed Hand
We'll do this on the rig's right hand. Again, begin by selecting all the base knuckles.


Then you'll hit R on your keyboard, and then type in -15 on the keypad and then hit enter. (We're doing a negative value on the right hand. We would use a positive value on the left hand.)


This time we're going to go to the Pose Menu at the bottom of our screen.

You'll see the words Clear Transform as a submenu, go ahead and select this menu.

Now we see the word Location (With Alt G next to it. That's your hotkeys to do it without the menu.) Go ahead and select it to get the joints back in proper position.



You'll see the first knuckles look less lined up, and more spread out. That's perfect.
Now select all the middle knuckles.


For the Middle Knuckles you'll hit R on your keyboard, and then type in -10 on the keypad and then hit enter. Then, either using the menu, or by hitting Alt+G clear the location of the joints.

Finally, select the end most knuckles and repeat the same steps as you did for the middle knuckles (R, -10, Enter, Alt+G or menu Clear Transform-Location.)


Now, you still need to tweak individual fingers, and you'll still need to pose the thumb, but this will quickly get you to a point where it's a lot easier to finish your hands. Make sure you do this very early on in posing, or else using the straight on angles (x, y or z hit twice so the axes will align with the joint in it's current position,) or you'll get some really wonky results. This is just a way to get your hands in a roughly acceptable manner quickly without fiddling around and posing each individual joint on the hands. These hands are NOT beautiful. They are quick.
Also- in the Clear Transform submenu you will have noticed the word All. This option will completely reset the selected joint(s) back to the original position. Very handy when you think you've boogered up only a few joints, but the rest looks fine.