The below condition checks the value of the above variable and returns (produces a result) a message in the output window (accordingly).
//--------- Declare Variable --------------
$yourCharacter= "good";
//------------ Condition ------------------
if ($yourCharacter == "good") {
print "You are my friend";
} else {
print "You are not my friend";
}
Monday, February 22, 2010
Thursday, February 18, 2010
MEL Lesson 2 Variables
Execute the following 2 commands in the script editor.
$name = "ABC";
print $name;
Tip: If you dont know how to execute please see lesson 1.
Result:
ABC
Do you understand what is happening.
The print command is telling the output window to display "$name".
Since $name has the symbol $ as the first letter, the command understands it as a variable and looks for its value.
Since the value of "$name" is defined earlier as "ABC", the print command tells the output window to display "ABC".
$name = "ABC";
print $name;
Tip: If you dont know how to execute please see lesson 1.
Result:
ABC
Do you understand what is happening.
The print command is telling the output window to display "$name".
Since $name has the symbol $ as the first letter, the command understands it as a variable and looks for its value.
Since the value of "$name" is defined earlier as "ABC", the print command tells the output window to display "ABC".
MEL Lesson 1 Mel Basics
Print
Let us try a simple command to start with.Just type the following in the "script editor"
print ("My Name is ABC.");
Tip: Read Mel Script Editor Getting Started if requiredAnd execute this command by pressing "cntrl + Enter".
Alternatively you may press the "Enter" button in the num pad also.
Result:
My Name is ABC.
You have just told Maya to display the string "My Name is ABC." in the output window.
In this example "print" is called "command" and the string within the quotes is called "argument".
MEL Lesson 0 Script Editor Getting Started
Open script editor from Menu> Window> General Editors >Script Editor
Or by clicking on the script editor button on the right side bottom of the screen
Script Editor looks like this
Type the command you want in the Input panel (bottom)
And execute the command by pressing the "Enter" button in the num pad.
Results of your command would be displayed in History panel (Above) of the Script Editor.
Tip: If you select your command before executing, your command will remain in the Input pane after execution, so that you can do any modification to it if required, other wise you may have copy it from the History Pane and put it in the Input pane to execute it again.
Tip: If you select your command before executing, your command will remain in the Input pane after execution, so that you can do any modification to it if required, other wise you may have copy it from the History Pane and put it in the Input pane to execute it again.
3D Character Animation
TRAINEE TO ANIMATOR checklist
The following steps can help improvise your animation.
1. REMOVE JERKS
1.1 Path of object:

After animation is done check the path your object is moving. (When I mean object I also mean differnt parts of the body). Onion skinning is not available in Maya, you may use a water based marker on your monitor to register each frame (beware some companies won’t appreciate writing on monitors with a marker) . Rectify any unsmooth path. Even though going through frame by frame and observing can show you the problem, using a marker helps you identify clearly where problem occurs.
1.2 Irregular spacing

Irregular spacing can create a jerk. Check frame by frame and space it regularly.
2. SPACING
2.1 Ease-out/ Cushion

Similarly spacing of an object requires you to onion skin (with marker may be) and check. It is usual to see some frames close to each and some far. Space it more regular. Having a 3 frame ease (cushion) at the end of each pose usually works. Dont forget overlap. Read Hit effect.
2.2 HIT EFFECT

When you want to get a hit feel. You need to space it in such a way that frames before the hit are even spaced and not cushioning before it hits. Ensure you squash the hitting object a little at the frame of hit.
3. BLINK

A 6 frame blink usually works fine. Overlapping animation for each eye also makes your animation looks beautiful. Have you eyebrow come down a little when the eyes are closed for added effect. Never have a frame without iris during the blink, ensure it is partially visible.
Blinks add life to character.
You may add blinks:
1. when a character changes the place he looks
2. when he/she is idle for a long time.
3. When head squashes
4. HANDS
When it comes to hands many animators take it for granted. Dont forget to delay the wrist and fingers during movement.
5. POSES
Animation is done to convey a story, attitude of you character is a key to achieve effective story telling.
Poses play an important role or rather most part of the role in getting the attitude of the character across to the audience.
If a character is angry for example you need to pose properly the eyes, eyebrows, shape of the mouth, shoulders, hands, elbows and overall line of action of the body. Many budding animators take hands for granted. The book "Acting for animators" says that hands are the most expressive part of the body.
6. MOVING HOLDS
No animation can be complete without a moving hold. Moving hold should never be significant, you are only trying to making it look unstable.
7. CHECKLIST
Most of the time animators know what is wrong with his animation when a mistake is pointed out to him. Animators should have a checklist in paper or even in their minds ask themselves whether they have animated the hands properly, are the blinks working fine, is it cushioning fine in the poses, is it space correctly etc..
All experienced animators do that.
8. CONCENTRATION
Unlike many jobs, animation requires continuous concentration. Regular breaks during works drastically slows down animators.
The following steps can help improvise your animation.
1. REMOVE JERKS
1.1 Path of object:

After animation is done check the path your object is moving. (When I mean object I also mean differnt parts of the body). Onion skinning is not available in Maya, you may use a water based marker on your monitor to register each frame (beware some companies won’t appreciate writing on monitors with a marker) . Rectify any unsmooth path. Even though going through frame by frame and observing can show you the problem, using a marker helps you identify clearly where problem occurs.
1.2 Irregular spacing

Irregular spacing can create a jerk. Check frame by frame and space it regularly.
2. SPACING
2.1 Ease-out/ Cushion

Similarly spacing of an object requires you to onion skin (with marker may be) and check. It is usual to see some frames close to each and some far. Space it more regular. Having a 3 frame ease (cushion) at the end of each pose usually works. Dont forget overlap. Read Hit effect.
2.2 HIT EFFECT

When you want to get a hit feel. You need to space it in such a way that frames before the hit are even spaced and not cushioning before it hits. Ensure you squash the hitting object a little at the frame of hit.
3. BLINK

A 6 frame blink usually works fine. Overlapping animation for each eye also makes your animation looks beautiful. Have you eyebrow come down a little when the eyes are closed for added effect. Never have a frame without iris during the blink, ensure it is partially visible.
Blinks add life to character.
You may add blinks:
1. when a character changes the place he looks
2. when he/she is idle for a long time.
3. When head squashes
4. HANDS
When it comes to hands many animators take it for granted. Dont forget to delay the wrist and fingers during movement.
5. POSES
Animation is done to convey a story, attitude of you character is a key to achieve effective story telling.
Poses play an important role or rather most part of the role in getting the attitude of the character across to the audience.
If a character is angry for example you need to pose properly the eyes, eyebrows, shape of the mouth, shoulders, hands, elbows and overall line of action of the body. Many budding animators take hands for granted. The book "Acting for animators" says that hands are the most expressive part of the body.
6. MOVING HOLDS
No animation can be complete without a moving hold. Moving hold should never be significant, you are only trying to making it look unstable.
7. CHECKLIST
Most of the time animators know what is wrong with his animation when a mistake is pointed out to him. Animators should have a checklist in paper or even in their minds ask themselves whether they have animated the hands properly, are the blinks working fine, is it cushioning fine in the poses, is it space correctly etc..
All experienced animators do that.
8. CONCENTRATION
Unlike many jobs, animation requires continuous concentration. Regular breaks during works drastically slows down animators.
Pixel Aspect
Depth of Field in Animation

Depth of field is the region of focus of a camera.
The camera can focus only a particular distance from itself (which depends on the focus setting of the lens). The area ahead and beyond this focus zone gets blurred gradually. The range of this focus area can be longer or shorter depending on the setting (aperture) of the camera.
In 3D animation software such as Maya or Max, one can render a separate Z depth / L depth layer of the scene, which stores the distance information in greyscale (objects far from camera are rendered as black and closer in white or vice-versa). This z depth layer could be imported along with rendered images in compositing software such as Nuke or Fusion to produce the illusion of depth of field (A separate plugin may be required to tweak the level of blur and zone you want in focus).
Basics Photography
Exposure:
Three factors decide how your picture is exposed: A combination of Aperture, Shutter Speed & Film Speed.
Aperture:
Aperture setting determines the size of the opening of the lens or in other words, the amount of light that enters your lens. If you set a higher aperture (smaller F number eg: f4.5), your lens receives more light. Similarly if you set a lower aperture (higher F number eg: f22) you lens will receive less light.
Smaller Aperture:
If you have a small Aperture, less amount of light enters your camera, so you have to have a longer shutter speed to get enough exposure.
(Note: going lesser than shutter speed 1/40 secs will register your hand movement and result in a blurred picture)
Advantage of a small aperture is longer depth of field, which means range of focus will be more, which is usually preferred for landscape photography.
Bigger Aperture:
If you have a bigger aperture, more amount of light enters your camera. You may have to keep a faster shutter speed to avoid over exposure. Bigger aperture produces lesser depth of field, which means range of focus will be less (Only the object of focus will be clear). Good for portrait photography.
Shutter Speed:
This setting determines how long your lens is open. The longer the more light enters the lens.
Higher Shutter Speed:
High shutter speed is good to register fast action, sports etc.
Slow Shutter Speed:
Slow shutter speed is required during low light conditions. But it cant go lower than 1/40 of a sec as the camera will register camera shake.
Extreme slow shutter speed, with tripod, is good for registering the beauty of a night city.
Film Speed:
Faster films like ISO 400 or higher are more sensitive to lights and are good for shooting dim light situations, but grains will be more. ISO 100 produces clean photographs, but could be used in bright light conditions only. ISO 100 can be used in dim lighting condition by having long shutter speed using a tripod. But any objects which are moving in the view finder will get blurred.
Three factors decide how your picture is exposed: A combination of Aperture, Shutter Speed & Film Speed.
Aperture:
Aperture setting determines the size of the opening of the lens or in other words, the amount of light that enters your lens. If you set a higher aperture (smaller F number eg: f4.5), your lens receives more light. Similarly if you set a lower aperture (higher F number eg: f22) you lens will receive less light.
Smaller Aperture:
If you have a small Aperture, less amount of light enters your camera, so you have to have a longer shutter speed to get enough exposure.
(Note: going lesser than shutter speed 1/40 secs will register your hand movement and result in a blurred picture)
Advantage of a small aperture is longer depth of field, which means range of focus will be more, which is usually preferred for landscape photography.
Bigger Aperture:
If you have a bigger aperture, more amount of light enters your camera. You may have to keep a faster shutter speed to avoid over exposure. Bigger aperture produces lesser depth of field, which means range of focus will be less (Only the object of focus will be clear). Good for portrait photography.
Shutter Speed:
This setting determines how long your lens is open. The longer the more light enters the lens.
Higher Shutter Speed:
High shutter speed is good to register fast action, sports etc.
Slow Shutter Speed:
Slow shutter speed is required during low light conditions. But it cant go lower than 1/40 of a sec as the camera will register camera shake.
Extreme slow shutter speed, with tripod, is good for registering the beauty of a night city.
Film Speed:
Faster films like ISO 400 or higher are more sensitive to lights and are good for shooting dim light situations, but grains will be more. ISO 100 produces clean photographs, but could be used in bright light conditions only. ISO 100 can be used in dim lighting condition by having long shutter speed using a tripod. But any objects which are moving in the view finder will get blurred.
Subscribe to:
Posts (Atom)
