A simple demonstration of the car rig I have built.
After researching different suspension set ups I decided on the formula 1 or buggy set up. What I ended up with probably doesn’t really exist but I feel it replicates it and functions just the same. The reason I picked this kind of set up was because of its external suspension and also it looks pretty cool I felt.
The steering was the easiest part so let’s quickly explain that. I started by building a very primitive wheel, tyre and the other bits that go into a wheel, I then parented them all together being parented by the tyre itself. Included was a pivot pin, something the wheel could rotate on along the Y axis. When parented I moved the pivot point so that it lined up with the pin I build and would always move in line with the pin. I then created a simple NURBs curve to control the steering, I placed it in front of the car so it was easy to see and easy to see its rotates. I orient constrained the wheel to the steering control and away it goes. Once the other wheel was created I did the same thing to the same control so both wheels steer together.
Then came the suspension, this was a little harder then I though. My idea was a simple joint system and a SDK controlling it just off to the side. As you can see there are two arms of geometry supporting the wheel, these are meant to move together when the wheel moves up and down. After creating the geometry and adding a simple joint and IK handle to them I thought all that was needed was a SDK, constrain the wheel to the IK handles and I was done. I created a NURBs circle to the side of the wheel to control the SDK, once I set it up to move only in the up and down directions (Y). I very quickly noticed that the joints and ‘arms’ moved on a curve but of course the wheel did not causing the wheel to come out of its sockets. To overcome this I simply added more SDKs into the original control so it appeared to move along the same curve, even though in face it doesn’t but appears so I felt was good enough.
Next came the piston and suspension spring. We did something like this in class so I thought it would be a sinch. Since I am not the brightest student I noticed I didn’t take good enough notes. My class file was helpful but still didn’t suit my needs. I had a problem. Getting the pistons to line up and move together was the easy part, with just a Aim Constraint on each side, it was the spring deformation I was having issues with. Trying to use blend shapes wasn’t doing the trick, even after my teacher Mick (you) helped me with it. It worked but not well enough for this I felt. A class mate Sam had showed me a spring set up he had done using curves, lattices and clusters. This worked great and was easy to slip into my rig with no trouble. I did later have trouble with the springs when trying to move the car. No idea why but they would be left behind when moving the car, I thought they were grouped correctly but no matter what I tried still had no luck. The only solution to this was to change the hierarchy around and parent everything to one control, this effected the wheels in a bad way so i didnt end up doing it.
I rebuilt each suspension set up four times, leaving out the steering on the back wheels. When I tried to duplicate with transforms I came into problems but I didn’t mind doing it four times because I felt it was good practice. I am happy with the final result, below are a list of the controls and how they work in order to animate my sexy car. I enjoyed building this more then I thought I would, it began kind of hard but it was fun to problem solve and get a result. The following post will be a short playblast of a example of the rig set up. The car is designed as a race car, built for a track so there was onlt need for steering on the front wheels and independent suspention was a must, as well as a way to tilt the whole car.
Front_steering_conrol =Moves both front wheels together along the Y axis to steer the car.
Car_tilt_control = Moves the car up and down keeping all four wheels in place.
Front_L_suspensionControl = Moves the front left wheel up and down in the Y direction.
Front_R_suspensionControl = Moves the front right wheel up and down in the Y direction.
Back_L_suspensionControl = Moves the back left wheel up and down in the Y direction.
Back_R_suspensionControl = Moves the back right wheel up and down in the Y direction.
For our final assessment we were given the task to create a rig. We were given the choice of a Mechanical rig (a vehicle), including independent suspension and steering or a organically based rig, a limb of some kind with stretchy characteristics and appropriate deformation solutions. I picked the mechanical rig and decided to build a car suspension rig. Although I had some idea of a stretchy limb rig I felt the car rig was better suited to my knowledge and interests in rigging. The following is what research was done to help me learn and come up with the type of car and suspension rig I ended up building. Although a lot of it is just google images, studying the pictures gave me a understanding on how everything works and a clear way to aproach things.
I went into this thinking it would be easy, just a piston and a few constraints and id be done. Not the case at all. When looking into how a wheel really does turn, bounce and how its places onto the axel I soon realised there was a lot more to this. There are many many different types of wheel suspensions out there, different cars need different set ups. I found myself looking at race cars mostly because a lot of their suspensions were on the outside and easier to see how they worked.
The pictures below and above are what I was trying to achieve with my own little spin on it. The Indy style car was something I thought would be simple and fun to build. It also justified the set up I felt I could create.
Here is a picture of my work in progress.
Over a number of weeks in class we covered different types of stretchy spine rigs using MEL scripts and expressions. The spine rigs are made to be animator friendly and easy to use. It’s a different kind of spine to the regular FK and IK spines we have had experience with.
The spine started off simply with 7 joints 2 grid spaces apart. Naming joints ‘back_joint01’ up to ‘back_joint07 ‘. We apply a ikSpline to the joints creating a IKhandle and curve (named back_curve_. We then create two independent joints, one at the top of the chain and one at the bottom. These will be the hip joint and the chest joint. These will be used to control the spine and either end by parenting our controls to them. We then select both the hip and the chest joints and smooth bind them to the back_curve. The smooth bind should be its default settings except the bind method is set to closes distance.
We next create some geometry such as cubes, make one for each joint except the top and bottom ones and parent them accordingly to the joints they will be sitting on top of. (see pictures below). Create another two cubes, make them larger or at least a different shape. These will be your controls and are snapped to the hip and chest joints. Name them accordingly and parent them to their joints. We now should have a very basic boring spine rig. Now to add a MEL script or two to make its stretch and squash!
We create a node by selecting the back_curve and typing into the MEL scrip line ‘arclen – ch 1’ This gives the curve a measurement and allows us to plug in a detailed MEL script into it.
The following stretchy expression is a cut and paste I will admit. MEL scripting or any scripting is very new to me and so far a little over my head. I can see how it saves time when you know what you’re doing and speak the language. It is a very specific tool and leaves no room for error, even the slightest comer out of place or forward slash (/) instead of a back slash (\) will cause great headaches. With that in mind I give you our Stretchy Expression.
//Original curve length is 12 (for reference later)
$scale = back_curveInfo.arcLength/12.00;
back_joint_1.scaleX = $scale;
back_joint_2.scaleX = $scale;
back_joint_3.scaleX = $scale;
back_joint_4.scaleX = $scale;
back_joint_6.scaleX = $scale;
$invscale = 1/sqrt ($scale);
back_joint_1.scaleY = pow($invscale, backCache1.varying);
back_joint_1.scaleZ = pow($invscale, backCache1.varying);
back_joint_2.scaleY = pow($invscale, backCache2.varying);
back_joint_2.scaleZ = pow($invscale, backCache2.varying);
back_joint_3.scaleY = pow($invscale, backCache3.varying);
back_joint_3.scaleZ = pow($invscale, backCache3.varying);
back_joint_4.scaleY = pow($invscale, backCache4.varying);
back_joint_4.scaleZ = pow($invscale, backCache4.varying);
back_joint_5.scaleY = pow($invscale, backCache5.varying);
back_joint_5.scaleZ = pow($invscale, backCache5.varying);
back_joint_6.scaleY = pow($invscale, backCache6.varying);
back_joint_6.scaleZ = pow($invscale, backCache6.varying);
By the end you should have a pretty stretchy spine just as I did in the example below and above.
In class we worded on a multiple skeleton rig, which included a normal set of joints with a switch to change between IK controls and FK controls. The benefits to this is simply more control and more versatility. FK rigs are great for arms because they follow the natural movements of arm joints so its very real and natural to animate. IK handles are very easy to use and are useful when the hand has to interact with a object or needs to stay still while the body moves. So a lot of pros and cons for both rigs and the need for a switch.
So first we need to start with a blank skeleton of the arm we are rigging. This is like a blank canvas that we can use as a base as well as be able to duplicate the joints from. This is also the joints that will bind to the geometry.
The FK joint is also created normally. Placing the control curves and point constraining them to the joints, and orient constraining the joints to the controls.
The IK joint chain is created as if it were a normal IK chain, pole vectors are placed in the correct positions behind the elbow in this case and the joints have their angles set to the preferred rotation. All controlled by some kind of controller at the end of the arm, a NURBs cube in this case.
After this process you constrain the original joint chain to the IK and FK joints chains. When moving the IK or FK you will notice that the original joint chain is offset and the other is left behind, this is normal. A control is then made to switch between the two joints chains. This control is made with a blend to give different weights to the movement of each system. This blend is done using a Set Driven Key.
This system is very useful and effective.
During the end of the term we spent a few lessons problem solving a range of piston rigs. It was a follow on from the ‘spring ring’ we had done earlier in the term. The objective was to create a piston that could expand and compress (spring included) and also pivot and swivel on both ends. This piston, if done correctly, would have a wide rang of uses so it needs to be user-friendly and versatile.
We first broke the piston down into little problems, trying to over come each hurdle as we go. The first was the spring and piston itself and how we could get it to compress and move the spring with it, while having the spring deform in a realistic way. My first thoughts on a solution was through blend shapes with the spring (like the spring exercise earlier) with a SDK to the top of the piston so they moved together. This does seem to work well, but is limited to the extent of your blend shape. Others used a joint system with IKs, that worked also and had other pros and cons. I was happy with the blend shapes. Next was the more confusing problem of the swivel and pivots at both ends. This was also something we set out to over come as a small group and later as a class. With a number of ideas it was later settled on a series of constrain set-ups, that worked well but were a little confusing I must admit. The different constrains was something I feel was the best solution but difficult to put into practice, this is something I need to work on.
Once compleated the rig worked well, I find it something that I could save and used on a lot of different works. From robots to all kinds of machinery you would be surprised how often a piston comes in handy!
After a few weeks into the first term we have been giving the task of rigging one of this Ants leg. Just one leg but there’s always a catch. The ‘foot’ of the ants legs is ment to work as a kind of suspension for the leg. Also the clavicle or shoulder of the ant leg is ment to move before the ‘foot’ to give the illusion that its controlling the leg. The leg is also needed to be controlled by a IK handle to make it easy to animate.
After looking at the leg and see how ants walk my first solution was to use a Spring IK Solver. This was very easy to do. I moved the ants leg into a natural standing pose, reset to joints and attached the Spring IK. The leg moved great, it was easy to animate and looked good. However it didn’t fit the brief, there was no ‘suspension’ on the foot and the shoulder moved in time with everything else and not before. After tinkering with other IKs and trying SDKs this seemed to beyond me to solve.
After taking it to class and realising everyone had the same problem. This was not an easy exercise. In class we discuss the problem at great length and there seemed to be a lot of ideas bouncing around the room. But nobody knew for sure, Mick gave this as homework for another week.
After the class chat the solution that i thought id try was going to be an inverse foot rig. Something we did last year with a normal human foot. Using my notes this i thought would be an easy fix, it didnt solve the shoulder problem but one thing at a time.
The inverse IK was a double IK handle ment to cushion the foot when it came down and rise a little for natural looking. After spending quite a lot of hours and attempts to do this from my notes and memory i realised it was not working very well. I feel this might not be the fault of the rig or the idea but just but lack of rigging talent. With a few saved versions this image to the right is a screen shot of the one that works best, bust still doesn’t work right.
The ant leg is something i enjoyed for a learning exercise but frustrating to fit the whole brief. Although two of my solutions work as a simple leg they do not work as well as id like in relation to the task we were given.