10/2/15

MAYA _ jiggle batch render

If bug when batch rendering jiggle :
Edit > Keys > Bake Simulation (use the option box)
Tick the "Control Points" option to bake the animation onto each vertice, and untick "Keep unbaked keys".

source

8/6/15

HOUDINI _ Divers

Export houdini color to Alembic via colorSet for Maya
- in houdini create anattribute promote and promote group Cd from Point to new class Vertex.
- in Maya use the mel command to import alembic :
AbcImport -mode import -rcs "/folder/Color.abc";
source

7/22/15

MAYA _ IK pole vector constraint joints move

Sometimes when applying pole vector constraint on a RP IK, the joints move, here is the fix :

"The fix, as it turns out, is really easy. Before you apply the pole vector constraint, you need to place your controller (whatever is going to drive the pole vector) exactly between the start of the IK chain, and the end effector, e.g., the shoulder and the wrist. This is quickly done by selecting the start and end joints, and then the controller, and creating a point constraint (do not maintain offset). Then delete the constraint. Next, use an aim constraint to point the controller directly at the middle joint (say, the elbow). Delete the constraint. Then you just need to move the controller along its pointing axis a little ways, to push it away from the bones. For example, if your aim vector for the constraint was +X, then push your controller a few units forward in its local X axis. Now you can create the pole vector and the joints shouldn’t snap at all."

from http://www.toadstorm.com/blog/?p=129

6/27/15

VRAY 3 _tips

Multi tile Uv texture -> just use one filetexture node then in the filename insert <UVTILE> and Vray will change it with the corresponding UV coordonate.
ex : path\color_<UVTILE>.jpg ->  path\color_u1_v1.jpg
More info on the help

6/24/15

MAYA _ nHair

To create nHair from custom curves :
- create guide curve
- select curve then nhair -> assign hair system
- select mesh then nhair -> create hair (optionbox choose the hairsytem)
To display the guidecurve after just uncheck intermediateobject in the attribute editor of their shape

6/19/15

MAYA 2016 _ new / tips

modeling :
holding ctrl Key + moving componenent : move along normal
multicut Tool : holding Ctrl+Shift : 90 degree cut / hloding shift : percent display
edit pivot + clic sur component : snap and align pivot

After creating a polygon primitive, you must activate the Show Manipulator Tool (Hotkey: T) before the In-View Editor appears.

Ctrl + 1 : toggle isolate
Alt + D : deselect

settings/preference :
animation  -> evaluation parralel and check GPU Override (faster for vertex animation/ skin)
display -> material loading Mode -> Parallel to avoid lag at scene opening when lot of shader
color management -> input color space rule : for texture color space, also check in attribute editor for file node to chose individual colorspace

single blendshape deformer:
create blendshape deformer on one mesh then windows - animation editor - blendshape, add new target clic on edit then edit the mesh uncheck edit and repeat to create blendshape directly on mesh.

dR_setActiveTransformAxis 3; // reset current manipulator handle to 3 axis
outlinerEditor -edit -expandAllItems 0 outlinerPanel1; // collapse all in docked outliner


6/9/15

NUKE / PYTHON _ copy text from .txt file and paste into the DAG

create a .txt file containing a nuke group or nodes (copy from nuke and paste as a text) then use this function in nuke to create a node from it

import nuke
from PySide import QtGui

def FromTxtToNukeNode():
 with open ("O:/_WORK/.../textfile.txt", "r") as myfile:
  data=myfile.read() #get the text in the .txt file as a string variable
 QtGui.QApplication.clipboard().setText(data) # set to clipboard
 nuke.nodePaste("%clipboard%") # paste into nuke DAG

6/3/15

NUKE _ rotate normal

set cut_paste_input [stack 0]
version 8.0 v5
push $cut_paste_input
Expression {
 temp_name0 expA
 temp_expr0 r*v1+g*v2
 temp_name1 expB
 temp_expr1 (1-r)*v1+g*v2
 temp_name2 expC
 temp_expr2 (1-r)*v1+(1-g)*v2
 temp_name3 expD
 temp_expr3 r*v1+(1-g)*v2
 channel0 rgba
 expr0 "\[\nif \{\[value val]<=1\} \{return expA\} else \{\nif \{\[value val]<=2\} \{return expB\} else \{\nif \{\[value val]<=3\} \{return expC\} else \{\nif \{\[value val]<=4\} \{return expD\}\n\}\}\}\n]"
 name Exp_rot_Normal
 tile_color 0x73168eff
 gl_color 0xffffffff
 label "_\n"
 note_font "Verdana Bold"
 note_font_color 0x1a131cff
 selected true
 xpos 142
 ypos -215
 addUserKnob {20 control}
 addUserKnob {7 val l valeur R 0 4}
 addUserKnob {7 v1}
 v1 {{"\[\nif \{\[value val]<=1\} \{return 1-val\} else \{\nif \{\[value val]<=2\} \{return val-1\} else \{\nif \{\[value val]<=3\} \{return 3-val\} else \{\nif \{\[value val]<=4\} \{return val-3\}\n\}\}\}\n]"}}
 addUserKnob {7 v2}
 v2 {{"\[\nif \{\[value val]<=1\} \{return val\} else \{\nif \{\[value val]<=2\} \{return 2-val\} else \{\nif \{\[value val]<=3\} \{return val-2\} else \{\nif \{\[value val]<=4\} \{return 4-val\}\n\}\}\}\n]"}}
}

5/30/15

MAYA / VRay _ sprite texture pixelated

If sprite particles get pixelated with Vray (when they scale) :
Vray -> Global Option ->  Materials -> uncheck texture filter map

5/20/15

MAYA / MEL_ offset animation multiple objects

// Proc to offset animation keyframe - two mode random or increment 
// select controllers and run the command : OffsetKeyFrame random 6 or OffsetKeyFrame increment 2
global proc OffsetKeyFrame (string $type, int $value)
{
    string $sel[] = `ls -sl`;
    
    if ($type == "increment")
    {
        int $val = 0;
        for ($item in $sel)
        {
        keyframe -e -iub true -r -o over -tc $val $item;
        $val += $value;
        }
    } 
    else if ($type == "random")
    {
    for ($item in $sel)
        {
        int $rnd = rand(0,$value);
        keyframe -e -iub true -r -o over -tc $rnd $item;
        }
    }
    select -r $sel;
}

5/18/15

MAYA_ Bake camera mapping / projection

I had problems to bake camera projection to 2D texture and for any reason Vray texture bake wasn't working properly. Here are the two solution I found :
- Baking the texture (but a bit blurry)
select the mesh and shader then in hypeshade -> edit -> convert to fileTexture (Maya Software)
- Create a texture reference object ( may not work well with animated deformation on mesh)
select the mesh then -> rendering -> texturing -> create texture reference object

4/28/15

MAYA _ perspective camera bug

To reset perspective camera when it goes away pressing f :
Select an object then : View panel -> View -> Look at selection

4/22/15

MAYA _ delete multiple shapes node for one transform

Sometime it occurs that one transform node has multiple shape node, to clean it and keep only one shape node :
File -> Optimize scene size -> Deformers

4/4/15

MAYA_clean motion path to constrain on curve

1. Create your motionPath as you normally would
2. Select the "motionPath1" node in you Channel Box inputs and you should see "U Value" and it should be keyframed. Select that attribute and Break Connections to kill the animation. This "U Value" is just like "Parameter" in PointOnCurveInfo nodes in that it will move your connected object along your curve using values 0-1. You think it would be that simple but you will likely get Cycle Check errors.
3. To clean up the setup and avoid errors you can use the connection editor to connect motionPath1 (allCoordinates "xyz") to the translate "xyz" values of whatever object you have attached to your path, and then simply delete the 3 addDoubleLinear nodes that are no longer necessary.
This leaves you with your curve->motionPath->attachedObject and also gives you all the other options that are built into the motionPath node like Follow, Twist, etc. I usually attach locators to motionPaths rather than directly attach objects and also like to use setRange nodes to expand the 0-1 value of "U value" to something more friendly to interact with like 0-10 or 0-100

source - Andrew Hake

3/24/15

AVID _ Divers

Duplicate track : mark in/out press alt+c then select an empty track and hit alt+v

3/12/15

MAYA _ Skin with a curve

To skin with a curve and deform with the control vertex :
- select a joint and the mesh -> bind skin -> smooth skin
- select the curve and the mesh -> edit smooth skin -> add influence option : check Use geometry
- go to the skin cluster and check Use component


3/5/15

AVID _ frame / shot / timecode filler

To burn timecode / frame for current track / and shot number in avid:

1/27/15

NUKE / PYTHON _ Toggle heavy node by class


def disableHeavyNodes():
    # Toggle value / 1 disable - 0 enable
    # RSMB / frischluft / sapphire zblur-zdefocus-glow
    global tgl
    try:
        tgl = not tgl
    except NameError:
        tgl = 1 

    nodeArray = ['OFXcom.revisionfx.rsmb3_vectors_v3','OFXcom.revisionfx.rsmb3_v3',
                         'OFXcom.frischluft.openfx.depthoffield_v1','OFXcom.frischluft.openfx.outoffocus_v1',
                         'OFXcom.genarts.sapphire.blursharpen.s_zblur_v1','OFXcom.genarts.sapphire.blursharpen.s_zdefocus_v1','OFXcom.genarts.sapphire.lighting.s_glow_v1']
    for a in nuke.allNodes():
        if a.Class() in nodeArray :
            a['disable'].setValue(tgl)

1/4/15

NUKE / PYTHON _ snippets

nuke.selectedNode().Class()

def reloadReads():
 for myNode in nuke.allNodes("Read") :
  myNode["reload"].execute()
 print "--> Reads reloaded"