To reset perspective camera when it goes away pressing f :
Select an object then : View panel -> View -> Look at selection
4/28/15
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
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
Image in the Node Editor:
andrewandoru.com/images/motionpathrigging.jpg
andrewandoru.com/images/motionpathrigging.jpg
source - Andrew Hake
3/24/15
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
- 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
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"
12/12/14
MAYA / VRAY _ wave with distanceTex node
To procedurally create wave near object :
- create a VRayDistanceTex, a ramp and a shader.
- add object to distTex_set
- set the ramp like below.
- connect VRayDistanceTex.outColorR to ramp.Vcoord
- connect ramp to shader diffuse.
As it's heavy to calculate, it's better to bake it to a texture file map before rendering a long animation.
12/11/14
MAYA _ can't do planar mapping uv / OBJ group problem
Sometimes, there is some buggy mesh on which Maya can't apply a planar mapping and when trying to export and import obj to clean the mesh we get this warning :
"Your OBJ file contains faces shared by multiple groups. Maya cannot create multiple objects for this file. A single mesh object will be created instead. The OBJ group information will be captured in Maya sets."
Here is a trick (for multiple objects) :
export to OBJ turning groups and point groups option off then import it in Maya then mesh > separate.
12/10/14
MAYA _ same uv square size multiple mesh
In UV texture editor : polygons > layout and set "Prescale" to "World".
maya help
12/1/14
MAYA _ Particle
Volume noise fitting particle
http://www.djx.com.au/blog/2008/07/21/particlesamplerinfo-smoke/
See the particule after converting to mesh :
nParticleShape > attribute editor > object display > unchek intermediate object
When converted to mesh increse the max triangle resolution
Delete particule with an uniform field : https://www.youtube.com/watch?v=fZWa43u8KB4
create an uniform field, set lifespan > lifespanPP only, add expression before dynamics in lifespanPP
if(nParticle_verreShape.inputForce[0] >= 0.0001)
{nParticle_verreShape.lifespanPP = 0.0;}
Multiple emitters for same nParticuleShape :
Select nParticle, shift select emitter > nParticule > Use selected emitter
or
duplicate emitter using CTRL+d then Window -> Relationship Editors -> Dynamic Relationships, select the particles in the left side of the window, check Emitters in the upper part of the right window, and select both emitters. source
Change particule color with age - Vray
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "age".
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.age -> ramp.uCoord.
Randomize particule color - Vray
Add user scaler 1pp attribute to nParticleSHape
add runtime before dynamics expression to it : nParticleShape.userScalar1PP = rand(1);
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "userScalar1PP"
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.userScalar1PP -> ramp.uCoord.
Sprite
For simple setup use nParticles -> sprite Wizard.
For sequence file texture without spriteWizard in file node animate image number and check interactive sequence caching.
if random on birth, create spriteNumPP et expression nParticleShape1.spriteNumPP = int(rand(1,4));
For scale add dynamic attribute sprite scaleX PP and spritescale Y PP, right click and create ramp
For random rotate add attribute sprite twist PP and add creation expression nParticleShape1.spriteTwistPP = rand(-180,180);
pour animer rotation dans runtime expression :
nParticleShape1.spriteTwistPP += 1;
Display age (or other attribute) in viewport
particleShape -> shading -> numeric
attribute name : age
attribute name list
Move bad particle to hide them (dirty way)
Select individual particle (right click -> particle) then add a cluster to them and move the cluster !
http://www.tokeru.com/mayawiki/index.php?title=Particles
Steppy movement (ex : when attach emitter to motion path)
Create cache : evaluate every 0.2 and save every 5 and change the subframe in nucleus if needed.
http://www.djx.com.au/blog/2008/07/21/particlesamplerinfo-smoke/
See the particule after converting to mesh :
nParticleShape > attribute editor > object display > unchek intermediate object
When converted to mesh increse the max triangle resolution
Delete particule with an uniform field : https://www.youtube.com/watch?v=fZWa43u8KB4
create an uniform field, set lifespan > lifespanPP only, add expression before dynamics in lifespanPP
if(nParticle_verreShape.inputForce[0] >= 0.0001)
{nParticle_verreShape.lifespanPP = 0.0;}
Multiple emitters for same nParticuleShape :
Select nParticle, shift select emitter > nParticule > Use selected emitter
or
duplicate emitter using CTRL+d then Window -> Relationship Editors -> Dynamic Relationships, select the particles in the left side of the window, check Emitters in the upper part of the right window, and select both emitters. source
Change particule color with age - Vray
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "age".
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.age -> ramp.uCoord.
Randomize particule color - Vray
Add user scaler 1pp attribute to nParticleSHape
add runtime before dynamics expression to it : nParticleShape.userScalar1PP = rand(1);
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "userScalar1PP"
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.userScalar1PP -> ramp.uCoord.
Sprite
For simple setup use nParticles -> sprite Wizard.
For sequence file texture without spriteWizard in file node animate image number and check interactive sequence caching.
if random on birth, create spriteNumPP et expression nParticleShape1.spriteNumPP = int(rand(1,4));
For scale add dynamic attribute sprite scaleX PP and spritescale Y PP, right click and create ramp
For random rotate add attribute sprite twist PP and add creation expression nParticleShape1.spriteTwistPP = rand(-180,180);
pour animer rotation dans runtime expression :
nParticleShape1.spriteTwistPP += 1;
Display age (or other attribute) in viewport
particleShape -> shading -> numeric
attribute name : age
attribute name list
Move bad particle to hide them (dirty way)
Select individual particle (right click -> particle) then add a cluster to them and move the cluster !
http://www.tokeru.com/mayawiki/index.php?title=Particles
Steppy movement (ex : when attach emitter to motion path)
Create cache : evaluate every 0.2 and save every 5 and change the subframe in nucleus if needed.
11/28/14
MAYA _ surface attach/rivet
To create a locator that follow a face, in plugin manager load muscle, select two edges on your mesh, then :
Animation > Muscle > Bonus Rigging > Surface Attach
or use a follicule
vimeo.com/47456885
Animation > Muscle > Bonus Rigging > Surface Attach
or use a follicule
vimeo.com/47456885
11/20/14
AFTER EFFECTS _ tips
To launch a second instance of After effects :
"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -m
type it in cmd (windows) or save it in a .bat file and double click.
Shortcuts
b / n work area end / start
- / = zoom in/out timeline
ctrl shift h Toggle Layer Controls in viewport
shift F4 toggle parent column
F4 toggle column
ctrl a select all
ctrl shift a / F2 deselect all
ctrl L lock layer
ctrl shift t open effect panel for selected layer
ctrl shift p open dialog box for position of selected layer
ctrl+ increase scale selected layer
ctrl- decrease scale selected layer
shift F3 toggle graph editor/layer mode
ctrl shift d split layer according time position
shift + / shift - change blending mode
[ in point(start) of the layer
] out point (end) of the layer
Alt Ctrl Shift N Split the frame containing the active viewer and create a new locked viewer
x focus selected layer
Ctrl+Alt+B Set work area to duration of selected layers
Shift+Esc Toggle between two recent composition
Ctrl+Alt+U To choose which layer controls to show in a view, shortcut for : choose View > View Options
Alt+Shift+M Set key on mask path for selected layer
L Toggle waveform on timeline
To manually edit/add shortcuts, edit the .txt file located here:
C:\Users\UserName\AppData\Roaming\Adobe\After Effects\*.*\Adobe After Effects *.* Shortcuts.txt
- "ToggleTabPanelMaximize" = "(RParen)"
- "TimeTrimIn" = "(Ctrl+Alt+Shift+I)"
- "TimeTrimOut" = "(Ctrl+Alt+Shift+O)"
- for azerty keyboard, add "Pad" before numbers ex : 1 -> Pad1
Easy crop comp : select region of interest then composition - crop comp to region of interest
Preserve underlying transparency (small T check) = clipping mask in Photoshop
ctrl + double click pan behind tool = pivot to center
Some expressions
"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -m
type it in cmd (windows) or save it in a .bat file and double click.
Shortcuts
b / n work area end / start
- / = zoom in/out timeline
ctrl shift h Toggle Layer Controls in viewport
shift F4 toggle parent column
F4 toggle column
ctrl a select all
ctrl shift a / F2 deselect all
ctrl L lock layer
ctrl shift t open effect panel for selected layer
ctrl shift p open dialog box for position of selected layer
ctrl+ increase scale selected layer
ctrl- decrease scale selected layer
shift F3 toggle graph editor/layer mode
ctrl shift d split layer according time position
shift + / shift - change blending mode
[ in point(start) of the layer
] out point (end) of the layer
Alt Ctrl Shift N Split the frame containing the active viewer and create a new locked viewer
x focus selected layer
Ctrl+Alt+B Set work area to duration of selected layers
Shift+Esc Toggle between two recent composition
Ctrl+Alt+U To choose which layer controls to show in a view, shortcut for : choose View > View Options
Alt+Shift+M Set key on mask path for selected layer
L Toggle waveform on timeline
To manually edit/add shortcuts, edit the .txt file located here:
C:\Users\UserName\AppData\Roaming\Adobe\After Effects\*.*\Adobe After Effects *.* Shortcuts.txt
- "ToggleTabPanelMaximize" = "(RParen)"
- "TimeTrimIn" = "(Ctrl+Alt+Shift+I)"
- "TimeTrimOut" = "(Ctrl+Alt+Shift+O)"
- for azerty keyboard, add "Pad" before numbers ex : 1 -> Pad1
Easy crop comp : select region of interest then composition - crop comp to region of interest
Preserve underlying transparency (small T check) = clipping mask in Photoshop
ctrl + double click pan behind tool = pivot to center
Some expressions
loopOut(type = "continue");
loopOut(type = "cycle", numKeyframes = 2)
loopOut(type = "pingpong", numKeyframes = 2)
loopOut(type = "offset", numKeyframes = 2)
# force fps animation
posterizeTime(8);
value
# round value
Math.round(effect("Slider Control")("Slider"))
# keep only one decimal
effect("Slider Control")("Slider").value.toFixed(1)
#copy animation from layer and offset time
thisComp.layer(1).position.valueAtTime(time-1)
11/16/14
MAYA / MEL _ flat shaded viewport
edit : Now in Maya 2015 there is an option for that in the viewport -> lighting -> use flat lighting.
I didn't find a simple way to display a flat shaded viewport. So here is a simple script to toggle the viewport with a flat shaded view, usefull to see silouhette when animating. This mel script create a global render layer with a surface shader material override, to change the flat color just modify the surface shader.
I didn't find a simple way to display a flat shaded viewport. So here is a simple script to toggle the viewport with a flat shaded view, usefull to see silouhette when animating. This mel script create a global render layer with a surface shader material override, to change the flat color just modify the surface shader.
// TOGGLE FLAT - using render layer global proc toggleFlat () { if (`editRenderLayerGlobals -q -currentRenderLayer` == "defaultRenderLayer") { // Check if Render Layer FLat exists or create it if (`objExists "RL_FLAT"`) { editRenderLayerGlobals -currentRenderLayer RL_FLAT; } else { createRenderLayer -n "RL_FLAT" -number 1 -makeCurrent -global; // SHADER /// string $shadName = "SH_FLAT"; // Check if Shader doesn't exists and create it if (!`objExists $shadName`) { $shader = `shadingNode -n $shadName -asShader surfaceShader`; setAttr ($shader + ".outColor") -type double3 0.7 0.7 0.7; } hookShaderOverride("RL_FLAT", "", "SH_FLAT"); editRenderLayerGlobals -currentRenderLayer RL_FLAT; } headsUpMessage "FLAT ON"; } else { editRenderLayerGlobals -currentRenderLayer defaultRenderLayer; headsUpMessage "FLAT OFF"; } } toggleFlat ();
11/7/14
11/3/14
NUKE _ $gui
- keep subdivision of 3D objects low in GUI, high in render ($gui?10:100)
- keep motion blur sampling low in GUI, high in render ($gui?3:20)
-"$gui" in expressions will return 1 in the UI and 0 at render time. Great for enabling nodes only when rendering on the farm (use it in the disable knob or Switch node).
source
- keep motion blur sampling low in GUI, high in render ($gui?3:20)
-"$gui" in expressions will return 1 in the UI and 0 at render time. Great for enabling nodes only when rendering on the farm (use it in the disable knob or Switch node).
source
11/2/14
NUKE/PYTHON _ toggle fullscreen viewer
def FullscreenViewer(): m = nuke.menu( 'Viewer' ).findItem( 'Toolbars/Bottom' ) m.invoke() m = nuke.menu( 'Viewer' ).findItem( 'Toolbars/Top' ) m.invoke()
11/1/14
NUKE _ find shortcut .py file
Edit shortcut without using menu.py
edit : nukeinstaldir\plugins\nukescripts\toolbars.py
edit : nukeinstaldir\plugins\nukescripts\toolbars.py
10/29/14
Links
maya:
My Oh Maya!
fevrierdorian.com
cum-md.blogspot.fr
polygonspixelsandpaint.tumblr.com
berniebernie.fr/wiki
mayapy.wordpress.com
mayamel.tiddlyspot.com
http://ewertb.soundlinker.com/mel/mel.php
adrianomuraca.blogspot.fr
http://therenderblog.com
http://scriptsandtidbits.blogspot.fr
http://www.3dbuzz.com/forum/threads/157484-Maya-Demystified-The-Hidden-Marking-Menus
http://www.toadstorm.com/blog/
http://nymayausersgroup.blogspot.fr/
http://ianwaters.co.uk/wp/ MASH
http://bindpose.com RIGGING
Soup
mayaspiral.blogspot.fr
http://www.tokeru.com/mayawiki/index.php?title=Soup
Houdini
http://www.tokeru.com/mayawiki/index.php?title=Houdini
http://ihoudini.blogspot.fr
http://odforce.net/
http://www.andynicholas.com/?cat=41
https://vimeo.com/user2030228
http://berniebernie.fr/wiki/Houdini_101
https://sites.google.com/site/fujitarium/Houdini
http://houdinitricks.com/
http://houdinibasic.blogspot.fr/2007/09/houdini-lesson-1.html
https://jurajtomori.wordpress.com/
V-ray:
https://github.com/BigRoy/mayaVrayCommandDocs/wiki
http://deex.info/wordpress2/vray-for-maya-tricks-and-tips/
nuke:
http://hagbarth.net
http://www.fevrierdorian.com/wiki/Commandes_de_base_(Nuke)
http://chrisglew.com/nuke/pythonscripts/
chrisglew.com
satheeshnuketutorials.blogspot.fr
http://www.tomas-lefebvre.com/#tools
after effects
Jr.Canest's AE Expression document
berniebernie.fr/wiki
My Oh Maya!
fevrierdorian.com
cum-md.blogspot.fr
polygonspixelsandpaint.tumblr.com
berniebernie.fr/wiki
mayapy.wordpress.com
mayamel.tiddlyspot.com
http://ewertb.soundlinker.com/mel/mel.php
adrianomuraca.blogspot.fr
http://therenderblog.com
http://scriptsandtidbits.blogspot.fr
http://www.3dbuzz.com/forum/threads/157484-Maya-Demystified-The-Hidden-Marking-Menus
http://www.toadstorm.com/blog/
http://nymayausersgroup.blogspot.fr/
http://ianwaters.co.uk/wp/ MASH
http://bindpose.com RIGGING
Soup
mayaspiral.blogspot.fr
http://www.tokeru.com/mayawiki/index.php?title=Soup
Houdini
http://www.tokeru.com/mayawiki/index.php?title=Houdini
http://ihoudini.blogspot.fr
http://odforce.net/
http://www.andynicholas.com/?cat=41
https://vimeo.com/user2030228
http://berniebernie.fr/wiki/Houdini_101
https://sites.google.com/site/fujitarium/Houdini
http://houdinitricks.com/
http://houdinibasic.blogspot.fr/2007/09/houdini-lesson-1.html
https://jurajtomori.wordpress.com/
V-ray:
https://github.com/BigRoy/mayaVrayCommandDocs/wiki
http://deex.info/wordpress2/vray-for-maya-tricks-and-tips/
nuke:
http://hagbarth.net
http://www.fevrierdorian.com/wiki/Commandes_de_base_(Nuke)
http://chrisglew.com/nuke/pythonscripts/
chrisglew.com
satheeshnuketutorials.blogspot.fr
http://www.tomas-lefebvre.com/#tools
after effects
Jr.Canest's AE Expression document
berniebernie.fr/wiki
10/9/14
MAYA _ Wire deformer rotation issue
When using a wire deformer with clusters there is rotation/twisting issue, to avoid :
- parent clusters, baseWire and Geo to the same controller
source
- parent clusters, baseWire and Geo to the same controller
source
9/27/14
MAYA/VRAY/PYTHON _ fallof - occlusion shader
create a fallof and occlusion shader for Vray using python
#____________ FALLOF ____________# def shFallof(): # gamma node cmds.shadingNode('gammaCorrect',asUtility=True, n='GammaTemp') cmds.setAttr('GammaTemp.gammaX', 0.455) cmds.setAttr('GammaTemp.gammaY', 0.455) cmds.setAttr('GammaTemp.gammaZ', 0.455) #Creates Ramp cmds.shadingNode('ramp', asTexture=True, n='facingRampTemp') # Remove middle color of ramp cmds.removeMultiInstance( 'facingRampTemp.colorEntryList[1]', b=True ) #Modify Ramp cmds.setAttr('facingRampTemp.colorEntryList[2].color', 0,0,0, type='double3' ) cmds.setAttr('facingRampTemp.colorEntryList[0].color', 1,1,1, type='double3' ) cmds.setAttr('facingRampTemp.colorEntryList[2].position', 1) cmds.setAttr('facingRampTemp.interpolation', 1) #Creates Sampler Info node cmds.shadingNode('samplerInfo', asUtility=True, n='facingSamplerTemp') #Connects Ramp and Sampler cmds.connectAttr('facingSamplerTemp.facingRatio', 'facingRampTemp.vCoord', f=True) cmds.connectAttr('facingRampTemp.outColor', 'GammaTemp.value', f=True) # connect it to a surface shader cmds.shadingNode('surfaceShader', asShader=True, n='SH_TMP_Fallof') cmds.connectAttr('GammaTemp.outValue', 'SH_TMP_Fallof.outColor', f=True) # Select Ramp cmds.select('facingRampTemp', r=True) #Renames nodes so you can use the script as many times as you want cmds.rename('facingRampTemp', 'facingRamp_F') cmds.rename('facingSamplerTemp', 'facingSampler_F') cmds.rename('SH_TMP_Fallof', 'SH_Fallof') cmds.rename('GammaTemp', 'gammaCorrect_F') shFallof() #____________ OCCLU ____________# def shOcclu(): # surface shader cmds.shadingNode('surfaceShader', asShader=True, n='SH_TMP_Occlu') cmds.shadingNode('VRayDirt', asShader=True, n='VrayDirt_TMP') cmds.connectAttr('VrayDirt_TMP.outColor', 'SH_TMP_Occlu.outColor', f=True) #Renames nodes so you can use the script as many times as you want cmds.rename('SH_TMP_Occlu', 'SH_Occlu') cmds.rename('VrayDirt_TMP', 'VrayDirt_O') shOcclu()
MAYA _ float value annotation in viewport
Annotation node can't have float value, only string. So to display a value in viewport:
- dynamic- particles - particle tools : create one particle
- select particle shape and add a float attribute toto
- particleshape - render attribute - particle render type : numeric
- attribute name : toto
- then connect any value (like scaleX) to toto
- dynamic- particles - particle tools : create one particle
- select particle shape and add a float attribute toto
- particleshape - render attribute - particle render type : numeric
- attribute name : toto
- then connect any value (like scaleX) to toto
9/21/14
MAYA/MEL _ toggle
//Toggle Isolate Selected in Current Panel $currentPanel = `getPanel -withFocus`; $state = `isolateSelect -q -state $currentPanel`; if ($state == "0") { enableIsolateSelect $currentPanel 1; } else { enableIsolateSelect $currentPanel 0; } // Toggle SHaded WIreframe string $panel = `getPanel -wf`; modelEditor -e -wos ( !`modelEditor -q -wos $panel` ) $panel; //ToggleOutliner: if ( `window -exists outlinerPanel1Window` ) deleteUI -window outlinerPanel1Window; else tearOffPanel "Outliner" "outlinerPanel" false;
MAYA/MEL _ second outliner
tearOffPanel "Outliner1" "outlinerPanel" false; tearOffPanel "Outliner2" "outlinerPanel" false;
MAYA/VRAY _ linear workflow
Render and VFB settings
For texture map add a Vray texture input gamma attribute
Create a standard gray shader : Vray MTL with gamma correct node in diffuse, 0.5 value color and gamma value 0.455
Subscribe to:
Posts (Atom)