niedziela, 18 sierpnia 2013

Voltaren Add

Hey. About one month ago we were working on an add for Voltaren. We struggle with this one a bit cause of the client. Who was not decided on how the add is going to look like. I loved the first idea but finally it turned out into something like this. My job was to build and animate the book and the packshots and also rendering/shading/lighting with exception of the fantom parts.

Prepering and animating book with a hell lot of pages was quite a challenge. I've created few scripts to speed up work.

First one is offsetting animation by one frame for multiple objects. Very simple but very useful. Here is a video how to use:

string $selekcja[] = `ls -sl`;
string $oldSelekcja[] = $selekcja;
int $ssize = size($selekcja);
    timeSliderEditKeys addInbetween;
    select -d $selekcja[0];
    $selekcja = `ls -sl`;
select $oldSelekcja;
//timeSliderEditKeys addInbetween;

Second is a script of Zeth Willie.
//select curve and object to attach and distribute along the curve
string $sele[] = `ls -sl`;
int $selSize = size($sele);
int $numObj = $selSize-1;
string $cShapeArray[] = `listRelatives -c $sele[0]`;
string $cShape = $cShapeArray[0];
for ($a=1;$a<=$numObj;$a++)
    string $thisObj = $sele[$a];
    //print $a;
    shadingNode -asUtility pointOnCurveInfo -n ("POC"+$a);
    setAttr ("POC" + $a + ".turnOnPercentage") 1;
    connectAttr -f ($cShape + ".worldSpace") ("POC" + $a + ".inputCurve");
    connectAttr -f ("POC" + $a + ".result.position") ($thisObj + ".translate");
    tangentConstraint -weight 1 -aimVector 0 1 0 -upVector 1 0 0 -worldUpType "scene" $cShape $thisObj;
setAttr ("POC1.parameter") 0;
setAttr ("POC" + $numObj + ".parameter") 1;
for ($z=2; $z<($numObj); $z++)
    string $POC = ("POC" + $z + ".parameter");
    float $increment = 1.0 / ($numObj-1);
    float $parameter = $increment * ($z-1);
    setAttr $POC ($parameter);
} // 

And an explanation video here. Selection is very important cause you have to select objects in an order you want them to stick to curve. Curve should be last in selection. Best way to do this is to use outliner.

Maya, Mental Ray

Brak komentarzy:

Prześlij komentarz