Monday, August 08, 2005

Are you Bored Yet?

Yeah, the updates have not been all that exciting lately, but don’t go away yet, things are just getting started. Besides I will hunt you down and feed you to Zak if you leave now! This weekend was another busy weekend, working on assignments and the big one getting my little girl ready for school. Wow, third grade… Damn I’m getting old. Anyway back to what you are here to read (it’s so hard to not talk about my family).

Finished project 2 Friday and turned it in Saturday Morning. All in all I am very happy with it seeing that it is easily the largest project I have ever completed. It came in at just under 3 min long including the credits (Still my favorite part). I am trying to find some web space to host it so that I can put it up here and will do so as soon as I can…

Now is where this blog starts to get educational and interesting. You see this weekend I found out that all the VB programming that I have done really paid off because MEL came to me almost as naturally as, uhh, well we won’t go there… we’ll just say that I haven’t gone blind yet! I spent quite a few hours watching the MEL VTMs and pausing and playing in the help a lot; all day Saturday to be exact. Then I dove right in.

First I went for the challenge of setting up an aim constraint and a way to blend between it and the manual controls for pitch and yaw. It only took me about 15 minutes and was a lot easier than I though It would be thanks to the constraint vids. Basically all I did was add two constraints to the cockpit, one only affecting the rotation of x and the other affecting the rotation of z. The tricky part was first trying to figure out the whole parenting thing, because at first it wouldn’t work. But once I un-parented the cockpit from its base and added the constraints I was able to then parent it back in and all worked well. I simply added in a single control and connected it up to both of the blend controls and can now use the aim or the pitch and yaw controls to move my cannon.

Next I wanted to be able to use the interface to select my mech’s feet and root as well as have a quick and easy way to do so in the view port, but I wanted to be able to easily see these controls as well as hide them if needed. After a little research I created NURBS circles and parent constrained them to the root and feet and in turn parented them into the global positioning object. To hide them I found it sloppy to write code that had to select them then hide them, I don’t know why I jut like short and simple commands in my code. I guess working in VB I have been bitten in the ass too many times with things like this. So in figuring out how to change the circle colors (I wanted to give a little added color to make it easier to see the right between the left foot in a busy scene) I found the drawing override section in the attribute editor. Here I was able to change the color of the NURBS circles as well as toggle visability with a simple MEL command linked directly to each object. It was as easy as toggeling them all off an on and cutting and pasting the code.

Next I had to take care of the huge area of my view ports taken up by my interface. For this I created a Contract button at the very top on the window that simply changed the window size and the label name when clicked to Expand. This one was easy (Especially because buzz already had a VTM created for 3D World Mag showing me how to do it :) and is great for cleaning up the clutter, I also put in controls from that video to change default key tangents to speed up animation as this is another thing I really wanted when animating my Alien.

Finally I really did not want to create individual buttons for my selection controls, instead I wanted a single image I could create in Photoshop. That way I could make it look cool and have it more organized. So I set off to research a way to do this. I quickly found that you could imbed a web page into your window that would allow you to link to MEL commands. Perfect. Rendered it out, adjusted the image added controls, imported into Image Ready and added the commands. Now I have all the selections, including the aims, global, and a reset root and feel locations (Which just sets their translate and rotational values to 0). And it look damn cool as well. I will post a screen shot of it tonight.

But wait there’s more. I also added the ball joint to the hip area so that I could rotate the legs for turning and the such and added some SDKs for their X translations as well as their z rotation so that the pelvis 2 joint would rotate to accommodate their movement. Looks really cool.

Act now And I’ll throw in a complete rig for the small turret I added to my mech. Yup tonight I will begin the hardest part of my UI. The Turret automation. I am going through the motions of figuring it all out in my head, but basically I want to be able to click a button and have it create a control curve and a laser object. Align the curve to the turret for that frame and set the laser object up to animate along that curve. This should make the whole process of firing the turret very easy. But I am not stopping there. I am going to have each one named based on the frame it is created on and a second tab created that lists all the lasers in the scene so that various attributes can be adjusted or it can just plain be deleted. I have most of it figured out in my head and will go over it in more detail (Might even post the code) when it is finished.

Damn this is just so much fun. :)

No comments: