Showing posts with label maya tips. Show all posts
Showing posts with label maya tips. Show all posts

Sunday, 31 January 2016

Maya tips 011 - Finding missing Texture

Maya will sometimes lost track of where to get the Textures, as reflected in the White Texture on the object when "Hardware Texturing" is turned on by pressing 6 on keyboard.



Before finding the Texture in Maya, make sure the all the PNG files are downloaded somewhere in the computer. In Animation Mentor case, go to AMP, the Character file, right click and "Get Dependencies".



Also download the newest version Textures by pressing "Get".



Follow these steps:

1. Go "Hypershade".
2. There will be missing picture in "Texture" tab. Left click on it.
3.  Open "Attribute Editor".



4. Click on the Folder icon.
5. Look for the Texture in the "Documents" folder.
6. The file should be the same as the one indicated here. Unless there is an updated version with a different name.
7. Click open and it is done!

Maya tips 010 - Solving Texture Transparency issue

Sometimes after loading the texture, the body seems transparent and the other arm or leg can be seen.



I am not sure why this happens. And there maybe other ways to solve this but this is the way someone shared and it works.

1. Go to "Hypersade".
2. Click "Materials" tab.
3. Left click on the material that is affected, in this case the character's body.
4. Notice the Transparency values are highlighted in yellow.



5. Hold right click on the same material file, release on "Graph Network".
6. Nodes and connections can be seen in the "Work Area".
7. Notice the connection arrow is yellow.



The yellow indicates there is some Transparency connection to the Material. There are 2 ways to remove this connection.

Method A:

8a. Highlight the 3 Transparency attribute. And right click on anyone of them.
9a. Left click on "Break Connections". Their values will not be highlighted yellow anymore.



Method B:

8b. Left click the yellow connection arrow. And press "Delete" button.
9b. Press Ctrl Z to undo and the connection arrow should come back. But it is now green.



Either way, the Transparency connection is broken and the issue is solved!



Saturday, 7 November 2015

Maya tips 009 - Update on Constraints

This is an update to an earlier post where the constraints are simply parented to the locators separately. This causes problem if the object itself is to be animated, or when a reposition of the constrain is needed. This method is clearer and is much more flexible to use.

Assuming the weapon (Stick) is already created.
1. Click "Create" from menu
2. Click "Locator"
2. Scale Locator to appropriate size



1. Press "ctrl d" to duplicate 2 more Locators and rename the Locators
2. Reposition them equally on the object



1. Highlight the Locators and the object Stick
2. Click "Edit"
3. Click "Group"



Rearrange the Locators and Stick to this hierarchy sequence below by using middle mouse drag.



Click "Freeze transformation" for the whole group so that the values are zeroed and can come back to original position easily.

Load in a character Rig, pose the hand, and position the Stick to the hand using the "Back" Locator.



1. Select any of the the "Finger cup control" (because it is almost never used to animate, except maybe for smear frame effect)
2. Shift select the "Back" Locator
3. Click "Constrain"
4. Click "Parent"



The other hand can also be constraint and they can be switched around.

1. Make sure all attributes are keyed
2. Switch off the constrain to the right hand
3. Similar to the right hand, select any "Finger cup control"
4. Shift select "Back" Locator
5. Click Parent constrain
6. Now there are 2 switches to change between constrain to right hand or left hand. Key it too.
*Note - Make sure when 1 switch is On the other must be Off. Make sure "Blend Parent 1" is on "1".





With this set up the "Middle" Locator or the "Front" Locator can be used to reposition the Stick for a different grip, and it can be used to animate itself.




If the Stick is needed to be constrain to the belt, like in the video, simply repeat the same step as constraining the hands. Then there will be 3 constrain switches in "Back " Locator..



One very important note regarding the "Blend Parent" in the Locator attribute. When any constrain switch is at "1" make sure  "Blend Parent" is also at "1" in order for the constrain to work.

When "Blend Parent" is at "0" it will go back to the position that is last keyed. So in order to be exactly where it is before turning constrain off, and start animating the Stick follow the steps below.

1. Select the "Back" Locator
2. Press the "S" key so that the current position is now keyed
3. Switch "Blend Parent" to "0"
4. Switch constrain to "0"
5. The constrain on the hand is turned off and now the Stick can be animated from where it last stops.







Saturday, 24 October 2015

Maya tips 008 - Euler Filter

Sometimes in the middle of the splined animation the arm or legs just go haywire, rotating massively around before getting to the next key pose. Usually this occurs when there is a lot of action, having to key a wide range of poses.

So do a check on the Graph Editor.


I realised the graphs seems very extreme from one another. And if i manually adjust the curves, all my keys and poses will be off. And if i leave it alone, i may have to correct those weird frames by editing every frame. The Euler Filter will helps solve this problem. It can be found under Curves menu in Graph Editor.


Basically what it does is it shifts all keys highlighted to the closest value to 0, still maintaining the exact position in space. Its like magic! All poses are exactly the same, but the graph looks normal now! This is how much it has moved looking at buffer curves.




And the result is this.


Sometimes it may just be a few keys that go extreme. Just highlight the whole curve and click Euler Filter!

Friday, 16 January 2015

Maya tips 007 - Hotkey for add and remove frame

This is a tip that i use the most especially during the blocking to get the timing of the shot just right. Basically this adds 2 Hotkeys to add a frame and remove a frame from the Timeslider, without having to select keys, slide things around in the dope sheet, or move keys around in the graph editor.


Here are the hotkeys script:

timeSliderEditKeys addInbetween;

timeSliderEditKeys removeInbetween;


Hotkey setup

1. Click Windows/Settings/Preferences/Hotkey Editor
2. Click "User".
3. Click "New".
4. Type in the name and description, copy and paste the script.
5. Choose the key to be assigned to this script.
6. Click save.




Use

1. Make sure it is at the frame in between the 2 keys. Press the assigned Hotkey.
2. If it is on 1s, then it has to be on the next frame when pressing the Hotkey.


Note

Make sure all the animated curves or object are selected before using the Hotkey, so that all adds or removes frame together. Also if there are different timing for different objects, the timing may be off when adding frames, so be very clear exactly what needs to add frames. 

Remember to save file before try this out! 

Saturday, 3 January 2015

Maya tips 006 - Constraining Object

Oh this is a headache topic, at least for me! Sometimes i just don't get it. Sometimes it works, sometimes it doesn't. So i am going to record what works for me and i can refer to it when i need to.

This assignment shot i did for Animation Mentor class 3, is about Stella Rig doing a acrobatic slam dunk. So it requires the Stella to hold a basket in one hand and pass to another a few times during the jump. 

I have done passing the ball sequence without constraint before and it is an even bigger headache. I have to go frame to frame to adjust the position of the ball, and any adjustments to the timing and spacing i have to do it all over again. So i learnt the hard way and give in to using constraint. And it is easy! Just a few things to take note of before confusion sets in.

The most important thing here is the "Outliner"! So get it on Hotkey or custom shelf button.

Create Locators

1. Click "Create"
2. Click "Locator" to create locators and scale them to appropriate size. I created 2 locators.
3. Position the locators near the body part i want to constrain object to.
4. Open up "Outliner" and rename locators to prevent confusion.



Constrain Locators

1. Click the curve that best suits controlling the movement of the object. I chose the wrist curve.
2. Hold "Shift" key and click the locator.
3. Click "Constrain".
4. Click "Parent". Default settings.
5. In "Outliner" a constraint will be created under the locator



Constrain Object

1. Reference or create the object. From the "Outliner" it would look like "Ball 2". Position near the locator.
2. Middle mouse click the object in "Outliner", hold and drag into the constraint created before. From the "Outliner" it would look like "Ball 1".


Done! Now when the wrist curve is moved the object moves together!


Switch on/off constrain

The constrain can be turned on and off, allowing the object to be animated dropping away from the hand.

1. There are 2 ways to go to constraint menu. Either click the constraint in "Outliner".
2. Or click the object, press up, up on keyboard.
3. This is the constraint menu.
4. 1 = ON , 0 = OFF



Things to take note

1. Make sure the graph for on/off constrain animation is either in stepped tangent.
2. Or create keys before and after the switch so that it works even if it is in auto tangent. Any in-betweens in the switching will cause the object to move. 



3. During constrain, the values are fixed, no animation needed. But when the constrain is switched off, the object will be back at where it was located at the start. So it is necessary to reposition 1 frame after the switch and not change anything before. Using bhGhost sure helps with the repositioning!
4. The visibility can also be animated. I use it instead of animating the on/off switch. So i actually already constrained 2 balls on each hand locators, switching "ON" one ball's visibility at a time, and used a third ball unconstrained to animate when its not contact with the hand. Well, this works at this moment because there is no spin on the ball, and nobody can see the spin anyway to tell that the ball switched between 3 balls.



Maya tips 005 - Broken Rig fix

Sometimes one moment the rig is working fine, but when i try to translate or rotate something suddenly the rig goes out of shape or gets broken. The curve stays yet the body is out of shape.

This example shows a mistake when the Joint is accidentally moved instead of the Curve, and it will look something like this.


It can be due to many other reasons but this is one of the common mistakes and can be easily fixed.

Solution

1. click "show"
2. click "All"


3. Click the small triangle.
4. Click "All objects on"


5. Press "5" on keyboard to display wireframe mode. And you will be able to see the joints in blue.


6. Click the joints.
7. Reset the attributes to zero. If the joint selected is already zeroed try selecting another joint.



How to prevent this happening again


1. Click "Show"

2. Only show what i need.
3. Click the small triangle.
4. Click "All objects off"
5. Only turn on the things i want to move.



Of course i can simply press Alt "z" or "undo" after i made a mistake, but i wouldn't know what i did wrong and how to prevent this in the future.

Sunday, 28 December 2014

Maya tips 004 - Custom button 002

Create custom button for 4 panel display with preffered camera view and shading

Everytime i open my assignment, the panels always mixed up. So this is to safe time setting up the right camera views i usually work with.

Script is this :

lookThroughModelPanel persp modelPanel1;
modelEditor -edit -displayAppearance smoothShaded -activeOnly false modelPanel1;
modelEditor -e -displayTextures false modelPanel1;

lookThroughModelPanel side modelPanel2;
modelEditor -edit -displayAppearance smoothShaded -activeOnly false modelPanel2;
modelEditor -e -displayTextures false modelPanel2;

lookThroughModelPanel front modelPanel3;
modelEditor -edit -displayAppearance smoothShaded -activeOnly false modelPanel3;
modelEditor -e -displayTextures false modelPanel3;

lookThroughModelPanel shot_cam modelPanel4;
modelEditor -edit -displayAppearance smoothShaded -activeOnly false modelPanel4;

modelEditor -e -displayTextures True modelPanel4;


Panel 11 is Perspective View, All shaded without texture.
Panel 12 is Side View, All shaded without texture.
Panel 13 is Front View, All shaded without texture.
Panel 14 is shot_cam View, All shaded with texture.






Maya tips 003 - bhGhost

Maybe i should record this so that it will be faster then watching the videos and reading elsewhere.

Installing

1. Download the rar file from here : bhGhost and more.
2. Put the mel file into :  C:\Users\User\Documents\maya\2015-x64\prefs\scripts.
3. Open or restart Maya.
4. Copy and paste below mel script :
select -cl;
bhGhost; select -cl;
5. Highlight the script and hold middle mouse button on the script and bring it into the shelf.
6. A small window will appear. Click MEL.
7. A custom button will be created.



Setting up

1. bhGhost panel will open once the mel script is executed.
2. Open Outliner and find the geometry name of the thing to ghost. Click the geometry name and click "Add meshes" button in bhGhost panel. Multiple geometry can be added in order to ghost together.
3. Click "Tools" in bhGhost panel. Click "+Shelf Button". It will add a custom button in current maya shelf for this settings. Remember to go custom shelf panel in maya first.
4. Right click the custom button created and click edit.
5. Three things i will edit. Icon Name, Tooltip, Icon Label. Icons can be found in the bhGhost folder.



Basic function

1. Click Meshes to go to ghosting menu.
2. Switch visibility of ghost on/off.
3. Delete current ghost.
4. Delete all ghost.
5. Create ghost of current frame.




If ghost created cannot be seen, make sure stroke is visible in show tab.


If ghost cannot be deleted even after clicking "BustAll", go Outliner and delete it manually.