philipborg

BOOKMARKS

MAYA STUFF

DEFORMER ORDER:
Right click on your surface to bring up the marking menu.
Select inputs > complete list. This gives you a window listing the deformers and everything else affecting your surface, by middle clicking and dragging, these can be moved up or down the list (order of priority).

This way you can have a skinned surface controlled by a skeleton, blend shapes to help with extreme positions and clusters for local movement all existing quite happily. (Great for hand animating clothes without worrying about cloth simulation).


JOINT ROTATION:
Draw your skeleton perpendicular to the view planes, making sure the rotations are all 0 degrees in the channel box, change the values in the attribute editor 'joint orient' box to get the skeleton to line up to your model. This leaves you with nice clean rotations.

PARTICLE STUFF:
Particles emitting particles (leaving trails):

Make an emitter and particle system - e.g directional

in script editor (from manual):

emitter -r 30 -mnd 1.5 -mxd 2.5 -n emitter particle1;
particle -n emitted;
connectDynamic -em emitter emitted;

this makes an emitter of rate 30, min & max distance 1.5&2.5 called 'emitter' applied to object 'particle1'
also makes particles called 'emitted'
then connects the emitter to the new particles - sorted!

some other switches- [emitter -typ omni | dir | direction | surf | surface | curve | curv -dx -dy -dz -mnd minimum distance to start emission -mxd max" " " -r rate -sp spread (0-1) ]

---

Emitting smoke from surface (e.g burning plane wing):
(NB- See also for simple expressions for expanding smoke trails)

surf_emit_smoke.txt

---

Using rib archived particles (3d sprites if you will):
A basic method, but hey - what more do you want?

rib_archive_particles.txt

---

USEFUL EXPRESSIONS:
Wheel Rotation -
FRONTWHEEL_L_Rot.rotateZ = car.translateX / (3.145 * 71.82) * -360;

where wheel_rotz = mainObject_transX / (PI * wheel diameter) * 360degrees (or negative in this case to fix the direction)

-----
int(rand(1,3)); - clamps random numbers to an integer.
-----

MEL SCRIPTS
Adding Slim attributes for texturing (where your textures have the same name as the surface - like in DeepPaint 3D):

//Select Shape nodes


string $thing;

string $Things[] = `ls -sl`;

string $end1 = ".Slim_color";
string $end2 = ".Slim_bump";

for ($thing in $Things)

addAttr -ln Slim_color -dt "string" -k true $thing;

for ($thing in $Things)

setAttr -type "string" ($thing + $end1) ("textures/head_colour/"+($thing)+"_color.tif");

for ($thing in $Things)

addAttr -ln Slim_bump -dt "string" -k true $thing;

for ($thing in $Things)

setAttr -type "string" ($thing + $end2) ("textures/head_bump/"+($thing)+"_bump.tif");

You can then refer to these attributes in your shader (see below).

--

Shader hookup mel:

slimcmd slim CreatePalette -file "/job/CB/crows/models/maya/shaders/palettes/CrowPalette/crowPaletteSlim_v2.splt";

select "*_leg_*_1Shape";
string $selString = `slimcmd slim GetAppearances -name "crowLeg*"`;
mtor control attach surface `slimcmd $selString GetID`;

- Brings in the selected palette

then..

 - selects shape node
 - puts the specified shader name into a variable 'selString'
 - attaches the said shader (from the variable) to the selected object
   (This last line is a mel command for accessing renderman stuff)

--


Simple light follow expression (uses bounding box):

select -r papi_head_proxy ;
CsRibProxyMesh papi_head_proxyShape papi_head_PLY;

spaceLocator -p 0 0 0;
rename "locator1" "papi_grpTarget";

expression -s "papi_grpTarget.translateX=`getAttr papi_head_PLYShape.boundingBoxCenterX`; papi_grpTarget.translateY=`getAttr papi_head_PLYShape.boundingBoxCenterY`;papi_grpTarget.translateZ=`getAttr papi_head_PLYShape.boundingBoxCenterZ`;"

--


Basic Indirect Diffuse / Scatter notes:
Most of this stuff will be a combination of shaders, lights, cameras and objects in specific trace sets or individual render scenes.

Bake Diffuse - generate an initial pointcloud from a specific view (camera or perspective coordsys). This is the light falling on the surfaces.

ptfilter - makes second pointcloud for stage two bounce - takes the initial lit areas and bounces light around from there according to settings. eg:

ptfilter -filter colorbleeding -progress 2 -maxsolidangle 0.05 -sortbleeding 0 -sides front -maxdist 500 -bounces 1 -coneangle 1.57 -sources myscene_IDIFF_01.ptc -progress 2 -output myscene_IDIFF_01f.ptc

NOTE: This pointcloud is now usable but only from the same camera it was rendered from. Pointcloud mis-matches result in huge render times. To simplify generate a brickmap:

brickmake -maxerror 0.002 -radiusscale 1 -maxdepth 12 -ignorenormals 0 -progress 2 dk1113_017_env_IDIFF_03f.ptc dk1113_017_env_IDIFF_03f.bkm

NOTE2: Surface shaders need to be able to understand the indirect diffuse component - should be something like kirr=1

Hot objects - to make an object emit light in the indirect diffuse pass it should have an iddEmission value of 1 in the rib (should be an attribute that gets passed through)

Subsurface scatter is similar - makes a pointcloud generated by a filter command, tend to limit number of scatter lights for best effect. --


SLIM STUFF


SHELL STUFF


CSHRC STUFF


DOWNLOADS

Texture grid 773K
Supercheck grid 777K
makexpm utility (windows) 114K





junk