Monday, August 29, 2005

Long time no post.

I know, I know… I haven’t updated my blog worth a shit lately, but I really have been busy.. Really :)

Anyway I figured I would jump on at lunch today and update anyone who is actually following along here and has been anxiously awaiting an update. Well I finished the Mech project, well at least what was in the videos and started on all my fancy-shmancy stuff that I am adding. This time around I am focusing on MEL, and let me tell you that it has been some ride, and MEL has made me love Maya even more. Well you have probably read how I added the turret to my mech and even added a section to my UI that allowed me to automate the creating of a laser beam on any given frame, well I didn’t stop there, I decided to automate the whole thing and have been diligently exploring Maya to find ways to make it possible.

So lastnight and today I tackled what I though was going to be the hardest part of the logic and that is how to tell where the laser intersects with the ground, wherever that may be. Well at first I thought I would have to create a whole particle system to accomplish it, and I could have, but I really wanted to stay as close to what I was taught so as to save time, that was the hard part, but easier in the end :)

So what I finally decided on was to create a single particle, and make the ground a collision object. Again I thought it was going to be harder than it was in that I was looking on how to return the UV cords where the particle collided with the ground so that I could convert it into world space and then add the effect to that location. Well it turns out that Maya has this nifty little Collision event that will run a procedure whenever a collision happens. So it was as easy as writing code in the procedure to create a locator, point constrain it to the particle, delete the point constraint, and walla, I have the location. Here is the code I used to prove that it all could work.

global proc test(string $particleObject, int $particleId, string $geometryObject) {
//$ptclLoc = (`xform -ws -q -t particle1`);
$loc = (`spaceLocator`);
$pntCon = (`pointConstraint -w 1 particle1 $loc`);
delete $pntCon;
delete particle1;
}

So tonight will be spent working on a way to automate the projection of a nurbs square onto the ground, and biraling it into geometry to create the blast opacity, that will simulate the laser impacting the snow. Damn I am loving this.

Friday, August 19, 2005

Out of my Mind, yet happy as hell!

I have been out of my mind busy lately, but I wanted to pop in and say Happy birthday to me! I got my very own copy of Maya for my Birthday!!! Woooooo Hooooo! Not in time to really use it for any of the Buzz Projects, but no more watermark after this assignment, and hardware Rendering, Wooo hooo, I am so damn excited!!!!

Tuesday, August 16, 2005

Woo Hooo, I got posted on the top submissions page!

Really busy lately so I haven’t had much time to update my Blog, but I wanted to drop in and put up a ling to my pseudo finished abduction project (I say pseudo finished, as I am going to go in and fix a few things after all of this is over). I was picked as one of the top student submissions so I will link to the page where you can read all about the DVD’s for sale and buy them… Yes you want to buy them… You have to have them… Even if your in the class you feel the need to purchase them again….

Anyway here it is, mine is the 5th one down, but check them all out as they are all great.

http://www.3dbuzz.com/vbforum/sv_mfcinfo.php

Tuesday, August 09, 2005

So I only worked for a few hours on the project last night before I passed out, I really need to catch up on my sleep. Got the logic and the basic code in creating the laser completed. Here is the procedure thus far…

proc turretFire () {
int $curTime = `currentTime -q`; //Get the current frame number
string $crvName = "TurAnim_Path_" + $curTime; //naming scheme
string $cylName = "TurAnim_Cylndr_" + $curTime;
// Will add an If statement here to determine if a beam already exists for this frame.
duplicate -n $crvName -rr beamAut_TemplCurve; //duplicate the template curve
$PCTemp = `pointConstraint LeftGunLaserBeamAimLocator $crvName`;
$OCTemp = `orientConstraint LeftGunLaserBeamAimLocator $crvName`;
//Orient and Point constrain the curve to the turret locator
delete $PCTemp;
delete $OCTemp; //delete the constraints
cylinder -ax 0 0 1 -r .125 -hr 9 -ch 1 -n $cylName; nurbsPrimitiveCap 3 1 0;
objectMoveCommand; // creates the laser beam geometry
pathAnimation -fractionMode true -follow true -followAxis z -upAxis y -startTimeU
$curTime -endTimeU ($curTime + 30) $crvName $cylName;
//sets up the animation of the beam along the curve
setAttr ($crvName + "Shape.overrideVisibility") 1; //Make the curve visasable
sets -e -forceElement LaserSG $cylName; //assign the Laser Shader to the beam geometry
}

Thats it for now. Tonight will be adding in the if statement and creating the tab layout as well as building all the code for the ability to gather all the laser beams in the scene and allowing the user to change global settings of animation duration as well as giving control to hide and delete setups.

Monday, August 08, 2005

My Mech Controls

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. :)

Thursday, August 04, 2005

IS any part of 3D production easy?

Well I got a crash course in sound over the past few days. Finally moved into the post production portion of the project and really found out how involved sound is. It has taken me two days to get the majority of the sound added and I should be finished tonight and ready to post and turn it in. YES!!!! Finally!

The funny thing is that I took a break last night and went out and sat on my back porch and just sat there and listened. I could hear cars driving by, wind rustling through the grass, kids playing in the background, birds chirping, crickets, and thunder in the distance. This just makes up the ambient sounds one might hear if I were to have turned it into a scene. Add in the primary sounds and it all really gets complicated especially when you consider different camera shots where the sound will be affected by your scene.

A good example is the face that my scene goes from a view of the ship to a view in the cockpit. This would affect the way the engines sound from shot to shot, but I ended up just ramping the volume up and down trying to keep it as simple as possible. Simple but still a pain in the ass.

Anyway, just wanted to update a bit and to prepare everone that this one should be done tonight or tomorrow. Woo Who (Yes I refuse to type w00t) .

Monday, August 01, 2005

So close, yet so far.

So I should be down one more nights rendering when I get home tonight, that is as long as I did not loose power at home today. Scene 1 is completing, scene 2 is done, Credit Animation is completed, and should just have Scene 3 and about 200 frames of character animation to render over night tonight. So lets get to the reason for this post.

Lessons Learned:

Lighting: WOW! Lighting is a big pain in the ass. Guess I just need more experience with it. I have had to re-render scene 2 like 3 times now because of lighting issues. There are still some issues with it, but I think I can live with them. The thing that really gets me is that I totally forgot that I wanted to add lightning to the engines, but oh well, I am not re-rendering all the ship scenes again. I could have done a lot better with more planning, but going into this I had no idea what I was doing, so next time I will be able to plan ahead and hopefully save myself some trouble.

Rendering: Take the time to do low res renders. I had so many issues creep up (A few I will fix in Post) that I wasted a lot of precious time. Live and learn. Another big pain in the ass has been the smooth proxy, I need to research it more because it is a hassle to smooth proxy the model and create the texture ref right before render.

Over all: I would have made a lot better time if I could reference in the models, lighting, etc because I found myself making changes along the way and having to go back into all 5 files and make these changes again was another time waster. I will learn to use references in Maya for any future multi scene projects.

That’s it for now. Hopefully I will be able to start putting in Sound tonight which should take another couple of days and I will finally be able to call this beast complete!