Thursday, December 15, 2011

Tip # 272 - resetting pan zoom

A lot of people don't even like Maya's pan/zoom tool in the first place, I often recommend to shut it off in the camera settings.






















this also allows you to do have two panels up of the same camera, and see a green square around the area you are "zoomed" into, which can be helpful.

However, someone recently asked "How do I reset the pan/zoom "
which I realized i had no idea, so I looked it up.




its under the attribute Editor of the camera,
open the tab for Display Options ,
and then open the tab under that for 2D Pan/Zoom


if you set the Pan to 0 0 and the zoom to 1 it will go back to its default , or no pan and no zoom.

this is something that may come in handy as a script, so.....

here is a little mel snippet you can paste on your shelf..


{

string $panel = `getPanel -wf`;

string $camera = `modelEditor -q -cam $panel`;

setAttr ($camera + ".horizontalPan") 0;

setAttr ($camera + ".verticalPan") 0;

setAttr ($camera + ".zoom") 1;

}



//-----------end --------------




Wednesday, December 14, 2011

better turning particles...

I havn't tried this yet,, but it looks interesting....







this code was suggested by Eric Cloutier on cgtalk to make better turning particles. ive added a simple adjustment dividing the turn by the goalPP. the results are pretty acceptable. i think i see flipping occassionaly but not too much

the suggested code is listed here

forums.cgsociety.org/showthread.php?p=7186073#post7186073

and repeated here for reference with my adjustement....466 is my maxCount of particles which im using to get a percentage value for goalPP



creation:
nParticleShape1.customAim = ; //or whatever
nParticleShape1.goalPP=nParticleShape1.particleId/466+.4;

after dynamics:
float $maxTurn = 0.1;
vector $curAim = nParticleShape1.customAim;
vector $vel = nParticleShape1.velocity;
vector $newAim = ;
nParticleShape1.customAim = $newAim/nParticleShape1.goalPP;

V-motion REAL flow plugin

Looks interesting, but at the moment I don't know enough about RealFlow to know how "revolutionary" this actually is.....

http://www.v-motion.co/



Tuesday, November 15, 2011

Dag Menu Proc - Updated for 2012

I just checked the 2011 DagMenuProc vs the 2012, and autodesk made updates, so I updated mine as well. you can get it on highend3D.



Monday, November 14, 2011

Real Flow Render Kit wants to just keep checking...

For those of you out there using RealFlowRenderKit you may want to check something.
not sure if it harms anything, but I figure with MAYA you don't want wasted cycles.

load the rfrk plugin,
in the script editor turn on "echo all commands"
and you get this
catchQuiet(`rfrkTimerFunc`);
over , and over, and over, and over , and over, again

oops!

-=s

Thursday, November 10, 2011

Offsetting multiple textures on one surface / uv offset

My apologies , these images are all out of order....

panel view of the separate objects with individual shaders, and one object with all the files combined.


set your uvs to be offset by 1



set the hardware texture channel to "combine textures" and up the resolution
offset each place2D by 1 and turn off wrap u and wrap v
hypershade view of the shader





set the default color to BLACK on the file texture
plus minus average with all the inputs ( use add new item to get more inputs)

Wednesday, August 10, 2011

smSelectByShaderAndLayer.mel part 1

someone on a forum was looking for a simple way to select all the objects of a particular shader, but only of a particular layer. So, like select objects by shader, but only in selected layer.

I did a quick script on the boat on the way in and posted it on highend|3D .
for now it is here....
//--------------------------------------------------------------------
// selects the items based on shader and layer
// stephenkmann@yahoo.com
// right now based on mesh nodes only
global proc smSelectByShaderAndLayer (string $shader, string $layer)
{
string $SG[] = `listConnections -type "shadingEngine" $shader`;
print ("SG:" + $SG[0] + "\n");
string $objs[] = `sets -q $SG[0]`;

string $layerObjs[];
string $layerItems[] = `editDisplayLayerMembers -fullNames -query $layer`;
for ($li in $layerItems)
{
string $mshs[] = `listRelatives -type "mesh" -ad $li`;
$layerObjs = stringArrayCatenate ($layerObjs,$mshs);
}
$layerObjs = stringArrayRemoveDuplicates($layerObjs);

string $no[];
for ($obj in $objs)
{
if (stringArrayContains($obj, $layerObjs) !=1)
$no[`size$no`] = $obj;
}
string $selList[] = stringArrayRemove($no, $objs);

select -r $selList;

}
//--------------------------------------------------------------------


Hello World.

Its the rule, you always have to start with "Hello World"