Monday, 24 March 2014

soup - bounding object, geo volume

SOUP (Peter Shipkov) - how to use an object to select points/faces/edges by volume

- get selection object, make scatter points within (remember to connect world matrix to in matrix)
-setup group/bounding object as usual
-set bounding object to "geometry"
- use a points to mesh node on scatter, connect that into bounding object as mesh

ta da!

Tuesday, 18 March 2014

Transfer UVs after rigging


Transferring UVs AFTER rigging....

This is a tough one, but here's the HACK. Lets say you've rigged up your amazing character and realize OH, I have to make a bunch of UV changes. You copy out your character's head, UV it up nicely, bring it back in and use the "transfer attributes" from your copied head to the rigged one.
No deal. It's because your transfer attributes input comes after rigging and all UV inputs have to come before rigging. Same as in Ncloth.
I don't understand why Autodesk doesn't put in a "before deformers" option or something similar to how you can insert blendshapes at certain parts of a deformer chain.
ANYWAY
Every object has a "shape orig" node which represents what an object was before it was deformed. We can apply a UV transfer to this no problem which will also transfer up the stack to your rigged object.
I access it like this

1. Select your rigged object, in the hypergraph hit options/display/ hidden nodes & shape nodes
2. You'll see a hidden node which is your Orig node, or what your object was before rigging.
3. In the orig node's attribute editor under object display, uncheck 'intermediate object'
4. Your Orig node is now accessible.
5. Apply your UV transfer attributes to it - then delete it's history.

There you go - you've applied your transfer to your object via it's history object. Maya sees it that you performed this operation before rigging. Now why Autodesk hasn't made a tool for this....who knows.


Straight up stolen from http://animbiz.blogspot.co.uk/2010/02/transferring-uvs-after-rigging.html
script by Zeth Willie!

//zbw_cleanTransferUV
//by Zeth Willie
//install in scripts folder and run "zbw_cleanTransferUV"
//select object w/ uv's then object to be transferred to then run
//zeth@catbuks.com


global proc zbw_cleanTransferUV()
{
string $sel[] = `ls -l -sl`;
int $sizeSel = size($sel);
if ($sizeSel != 2){
 error "hey. 2 objects. Select source then target";
 }
string $source = $sel[0];
string $target = $sel[1];
print ($source+"\n");
print ($target + "\n");

//try to do it by just reading SECOND shape node (first is shape, then ORIG, then other shape)
string $targetShapes[] = `listRelatives -f -s $target`;
string $targetOrig = $targetShapes[1];

//dummy check that this is orig object (is it intermediate? does it contain "orig"?)
if ((`getAttr ($targetOrig+".intermediateObject")`) && (endsWith ($targetOrig, "Orig"))){
 //turn off intermediate object setting on orig
 setAttr ($targetOrig + ".intermediateObject") 0;
 //transfer uv's to "orig" shape of target
 select -r $source;
 select -add $targetOrig;
 transferAttributes -pos 0 -nml 0 -uvs 2 -col 2 -spa 4 -suv "map1" -tuv "map1" -sm 3 -fuv 0 -clb 1;
 select -cl;
 //delete history on target orig then turn back on intermediate object attr
 delete -ch $targetOrig;
 setAttr ($targetOrig + ".intermediateObject") 1;
 }
else  {
 error "couldn't find the orig shape of the target object. make sure it's a bound/deformed thing";
 }
}

zbw_cleanTransferUV; 

Monday, 14 October 2013

After Effects stuff

This expression is pasted in map white to- part of tint effect to use index of layer to drive how dark something is, using linear function.
takes index, sees where it is within range of 1->number of layers in the comp and remaps it from 1->0, then returns a grayscale colour value. Nice.

x=linear(index,1,thisComp.numLayers,1,0);
[x,x,x,x];


This is pasted in a time remap effect of a layer, referencing the time remap value of the "leadLayer". It grabs the current state at "time", then subtracts the index, multiplied by the time offset variable (linked to a slider elsewhere). Good for delaying multiple layers and things.

thisComp.layer("leadLayer").timeRemap.valueAtTime(time-(index-1)*thisComp.layer("controlLayer").effect("timeOffset")("Slider"));


A more straightforward expression. "value" takes the pre existing value and uses that. We then add the control layer's distance offset value and add it, after multiplying it by the index (for multiple layer purposes)

value+thisComp.layer("controlLayer").effect("distanceOffset")("Point")*(index-1);

Monday, 2 September 2013

Swapping out layers in After Effects..

To replace a layer in a composition with a new item from the project window select the layer to be replaced in the composition window. Press ALT and drag the item from the project window and drop it on top of the selected layer in the composition window.

Thursday, 25 July 2013

realflow editing without realflow..

editing real flow the hard way
-obtain real flow particles in some form - eg. bin cache

-import to maya via "create system using real flow emitter"
-deform particles with lattice or whatever
-create 3d fluid volume around deformed particles, probably wise to activate auto-expand
-add radius pp attrs to the original particles, pipe this into fluidshape (it doesn't read from deformed particles)
-set to surface, convert to mesh
-wait
-profit

Monday, 25 February 2013

vray dr command line

Render -r vray -preRender "setAttr \"vraySettings.sys_distributed_rendering_on\" 1;" /Users/beige/Desktop/test.ma

Sunday, 3 February 2013

vray - fog on objects

Attach a vray material to the object
Set opacity to 0
In the volume shader slot of the shader group, attach an env. fog/whatever
Profit.