Friday, October 10, 2008

Media Repeat Frame Expression

Autodesk Smoke Tips & Tricks - Media Repeat Frame Expression

This is almost same with the previous tip Media Strobe Expression, but this time we will do repeat every frame in the clip N times. Is like you use 'Video' - 'Repeat' - 'Frames in Clip' , but we will do it in DVE with expression. Say, here i got 2 animation clips. The animation characters move every frame, however, here i want it to move only every 3 frames. The expression is: frametoslip(floor(frame/N))+1, just replace the N to whatever value you like it to repeat, put this expression into the media slip & matte slip.

To repeat every frame in the clip 3 times, expression is:
frametoslip(floor(frame/3))+1.
This will give result : frame 1,1,1,2,2,2,3,3,3,4,4,4....

Here i want to keep my option flexible, or maybe i want to change the repeat frame amount during animation. So, i made a new axis and name it axisC.

In media1 'Slip' & 'Matte Slip' put this expression:

frametoslip(floor(frame/axisC.position.x))+1

In media2 'Slip' & 'Matte Slip' put this expression:

frametoslip(floor(frame/axisC.position.y))+1

Now i can use the axisC positionX to control the repeat amount for media1, and axisC positionY to control media2 repeat amount. I can animate it if i want to. Try change the interperlation (linear, hermite, constant, natural) and see the different when you animate the freeze amount.

Tuesday, October 7, 2008

Paintbox Roll - Autodesk Smoke Tips & Tricks

Autodesk Smoke Tips & Tricks - Paintbox Roll

Here i got a still pictures, i want to move the compass to the right, but then there will be blank black at the left because the picture is not big enough.

I can go into the paintbox, use the RollX, to move the picture a bit to the right.
You will see that the joining edge of the picture is not good.
Use your paint tools like clone, paint, copy to touch up the edge.
After touching up the edge, you can freely move your picture left and right without the edge joining problem. You can do the same with RollY so that you can freely move the picture vertically without edge problem. Now, you can use the picture in DVE and move it vertically or holizontally freely.

You can also use this picture as texture fill with repeat mode to do a fast multiple pictures.

Monday, October 6, 2008

Media Strobe Expression

Autodesk Smoke Tips & Tricks - Media Strobe Expression

Here i got 2 medias, i want to do the strobe effect inside the DVE.
The strobe expression is :
frametoslip(frame-ceil(frame%N))
Just put the above expression in your media's 'Slip' and 'Matte Slip' value, and replace the 'N' in the expression to whatever value you want the strobe to be.

Say '5' will give the result : frame 1,1,1,1,1,5,5,5,5,5,10,10,10,10,10,.....

But here, i not really sure what's the exact strobe i want, i want to keep my option flexible and maybe animate the strobe along the way.
First, i created a new axis, i rename it axisC.
Then in the media 'slip' and 'matte slip' for media1, i enter expression :
frametoslip(frame-ceil(frame%axisC.position.x))

In the media 'slip' and 'matte slip' for media2, i enter expression :
frametoslip(frame-ceil(frame%axisC.position.y))

Now in axisC, you can use the PositionX parameter to control media1's strobe value, and PositionY to control media2's strobe value. You can try different value right at the schematic without need to go changing the expression. And you can animate the strobe value. If you do animate it, remember to try a different curve (hermite, linear, constant) to see a different result.