Flipbook effect

view in high res here > vfxtalk

Flipbook FX

view in high res here>vfx talk

Stepping Expression

A few time ago i need to create a tree that works like a flipbook, so a big part of the technique reside in a function than can keep a value for a variable number of steps and jump to next value, for example if i want to flip exposing 4 frames each one i need a function that create this step graphic...

so each value must be kept 4 frames somethig like

frame 1 timevalue 0
frame 2 timevalue 0
frame 3 timevalue 0
frame 4 timevalue 0

frame 5 timevalue 4
frame 6 timevalue 4
frame 7 timevalue 4
frame 8 timevalue 4


the graphic must look like this....

stepping function

the equation behind this graphic is inside a time node and is the following>

newTime = floor( ( floor( time/(step) )*step ) )

this can be read as

new time is equal at time divided by step tacked down floor and then multiplied by step and tacked down floor again.

for example time value at 22 with a step value of 4

newTime= floor( ( floor( 22/(4) )*4 ) )

  • newTime= 22/4=5.5
  • newTime= floor(5.5)=5
  • newTime= 5*4=20


this way we are getting the same entire value until the decimal part goes to one unit more each 4 steps.

( for nuke you can use de Hold operator, or whatever you can generate the expression inside another node adding a step custom knob and putting this expression>

expression > floor(frame/this.step)*this.step)


to take control of this expression i create 2 custom variables

  1. fliptime
  2. step
Fliptime is a user driven variable that indicates how much time i want to have stepped my animation
And step is the final calculation of the stepping. (if you want to add some noise behavior you can calculate on the step... for now step will be the same as fliptime ).


Flipping Expression

Well, with this we will be stepping the animation frames, that is the first part of the script, but now we need to create a function that drives a loop to have the paper flipping in the selected step range.

For example for the same stepping of 4

frame 1 rotattion -110
frame 2 rotation -82.5
frame 3 rotation -55
frame 4 rotation -27.5
frame 5 rotation 0

frame 6 rotattion -110
frame 7 rotation -82.5
frame 8 rotation -55
frame 9 rotation -27.5
frame 10 rotation 0

Our graphics may look like these

flip function

The expression to obtain this kind of loop fliping equation is

angle = ( ( (time % step)/ step)-1 ) *desiredangle

basically we are taking the remainder of dividing the time over the step.

This way we are getting a loop of values kind of

Step 4

remainder = frame
% 4

frame 1 remainder 1
frame 2 remainder 2
frame 3 remainder 3
frame 4 remainder 0
frame 5 remainder 1
frame 6 remainder 2
frame 7 remainder 3
frame 8 remainder 0

then i am dividing this reminder over the step to get the percentage point of the stepping so


frame 0
percentageOfStepping 0%
frame 1
percentageOfStepping 25%
frame 2
percentageOfStepping 50%
frame 3 percentageOfStepping 75%

frame 4 percentageOfStepping 0%
frame 5 percentageOfStepping 25%
frame 6 percentageOfStepping 50%
frame 7 percentageOfStepping 75%

The next -1 is used to obtain de completent of 1 this way im switching the direction of the graphic.

frame 0
percentageOfStepping 100%
frame 1
percentageOfStepping 75%
frame 2
percentageOfStepping 50%
frame 3 percentageOfStepping 25%

frame 4 percentageOfStepping 100%
frame 5 percentageOfStepping 25%
frame 6 percentageOfStepping 50%
frame 7 percentageOfStepping 75%

finally this values are multiplied by the max flipped angle value

i use this expressions on a move 3d node

move3D function

Noise Stepped Expression

Another useful expression is a variant of the steeping one equation that adss some randomness to each loop cycle

the expression is teh following>


as you can see im feeding the noise with the same


that we use to retime our clip then the result is multiplied by a
NoiseRange the way we can obtain each cycle a different but constant value.

I use this on my random stepped color correction functions>

brightness function

Well these are the basic expressions to create a true flipbok effect take a look at the script.

tree overview

download script here > http://www.vfxtalk.com/forum/attachment.php?attachmentid=5205&stc=1&d=1198102192

Pseudo Vectorized Look.

Pseudo Vectorized Look.

This is a kind of tutorial showing the most basic operations to get a Vectorized Hand Made look. This tutorial was made in shake but is intended to be easily converted to another compositing package like Fusion or Nuke.

The main tool here is the ColorX Node, ( In fusion and Nuke Custom tool), Driven by 2 custom Variables Called LoVal and HiVal.

This is a overall look of the finished script>

Well, Lets get Started.

  • First We need a File In of an HD image or better ( Using this technique in low res images could works but with low quality edges ).Then We Add a setDOD node ( Could be another but with this is simple ) and add 2 Local ( or custom) Variables.We call This Variables loVal and hiVal. Now your tree should look like this>

  • Now We need to make our file to an standardized size . Using this we can handle the same filtering values , with any kind of image size. So next, add a resize node and resize it to 1444 square. ( I take this value random but it works fine with the rest of the script ).
  • Well Now here is the place where the magic comes. We need to add 3 ColorX Nodes coming from the setDOD node, we may call this Low Mid and High like this>

We are going to add some expression to this ColorX nodes. The main idea is to create alittle rig control like the "Levels" Control used in photoshop ( Not really the same thing but is a little bit illustrative).

What We are going to do is to create a hard Color Filtering than reduce the full image in basically 3 color descriptors Low Mid and High Tones , you can see it this way >

Our Expresion will take color ranges from loVal to hiVal and Mix together in one Mask the low tones, in another mask the mids and in another the high ones.

  • Ok, before star creating these expressions rename the setDOD node to main.

  • Then Start by adding this expression ont the Low ColorX node, in the rExpr compononet.


  • and the same for gExpr and bExpr only replacing the literal r for the corresponding channel

b>main7.loVal&b<((main.hiVal-main.loVal)/3)?1:0 if you are getting error messages here check that you have the loVal and hiVal Custom variables inside the main (after setDOD) node

Your color X node might look like this.

Well lets get inside this expression.

We can break this in 3 parts because we are making a logical comparission ( in other words an IF ELSE operation). So the first part is the comparison (beofre the ? character) second the option A result ( before : character) and Third the option B so...


We can read it as
if red value is higher than Main loVal and lower than one third part of hiVal

use 1
else use 0

So for example if


any value in r between 0 and .3333 will be turned in 1 else will be 0

This way we are mixing all range from 0 to .3 and creating a solid mask that represents 1/3 part of the full color range inside this image. in this case the lower colors

So as you can imagine the expression to mid and high tones will be very similars only changing the min and max clippin values.

These are the expression>

Mid colorX

r>(((main7.hiVal-main7.loVal)/3))+.0001&r<(((main7.hiVal-main7.loVal)/3)*2)?1:0 gExpr g>(((main7.hiVal-main7.loVal)/3))+.0001&g<(((main7.hiVal-main7.loVal)/3)*2)?1:0 bExpr b>(((main7.hiVal-main7.loVal)/3))+.0001&b<(((main7.hiVal-main7.loVal)/3)*2)?1:0

High colorX

this way our source image

will be breaked in




  • At this point we are generating full RGB images with restricted ranges in low,mid and high, but we need to convert this to a grayscale image. For this, i suggest to add a
  • Monochrome node in the mid colorX node and then add another 2 linked copies of thi to the low and high colorX controls. like this>

If everything is working fine you are pretty done, the rest of the script is too much intuituve. You can check the script is working fine adding a grayscale generator and looking at each of the colorX nodes to see the corresponding low mid an high tone ranges.

high weighted map

mid weighted map

low weighted map

Massive Football Players


When i was working at ollin studio i got a chance to know massive software for a project they were developing to discovery channel.

This year on january A company contract me as freelance massive TD for a project they were making for corona beer.

The task was to create a 2000 crowd of two diferente teams of agressive football players, fighting for only one ball. These players will fight in a strongest battle where only one player will still alive and win the ball possession.

After asking about the battle psychology , i started working on the loco guy ( a kind of hooligan ready tu run agent ) designing some new procedural actions like lifting one arm up like a calling to fight shout, and creating some rules to make the most stronger player keep alive using collision detection and a strongest variable depending on the body size of the players.

early test avoiding black holes
View High Res here at VFXTalk

In the scouting proccess the production team decides to make the shooting on this location in EL ajusco Mexico.

The shooting day i take a lot of photo references of the real players to create de massive guys.

some real players references

Also i take a lot of photoreferences of the terrain at the same focal distance to recreate then using the image synth plugin to create a big 10K image to recreate a 3D terrain with a non pattern texture.

terrain photo refrences

Then when the approved clothes for the real players, i take photo references to the paint artist that creates above 10 different clothes , including shirt, pants, shorts, belts ,t shirt, and different hair, head, arms and legs textures.

multiple shirts maps

multiple head maps

Then Using the base OGLSL shaders included inside masive we make some baked maps to create a little more detailed skin and cloth shaders using displacement and different baked maps paint artist create on MODO

roughness map

baked normal displacement map

In addition 3d artist work on the loco guy model geometry to create new geometry's as punky hairs, cloth accessories, heads, arms and legs.

This is a preview render of a small crowd running.

After i create some fuzzy rules to assign these individual clothes in different combinations for each player. This way we create near 10 to power of 10 different combinations of unique look players each one with different size on each body part like arms, legs, and head, creating amazing visual variety .

These are some previews test showing the AI engine of the players.

In this test without a ball the agents try to keep near and run only when a team partner is near of them. In any other case the agents stops and walks slowly looking for another partner to still running ahead. Because they don't have a goal, the crowd start running in cirlces to keep them togueter. Also At the end of the simulation only the more stronger players keep alive.

Partnership fuzzy logic test
View High Res here at VFXtalk

In this other test, all the agents know the ball position but only the agents closest to the ball receive a "ball in range signal", and starts running to the ball, also these agent emit a new stronger "ball in range signal" that other agents can hear and go ahead the ball too.

looking for the ball fuzzy logic test
View High Res here at VFXtalk

One of the most important issues on this project, comes whit the rendering fact, because for budget and facility reasons we are unable to render on a renderfarm because the installed renderfarm runs on windows, and the archive expander plugin of massive only works on linux at that time.

I walk around on the OGLSL shaders and create a compositing mix technique to solve the loook issues, helping me in the fact that massive agents will be on a medium far plane from the camera. This way i start making some preview shots creating some atmosphere with maya fluids and making some precomps in shake like these.

I finish my work when the full agent brain was done, and the final scene setting and compositing runs on charge of Flame artist Kamen Markov and Massive Artist Phil Heartmann

These are some of the final shots

View in high res here at VFXtalk

VWB final work

Cars Banks and Hotels !

This is the final VWB TV ad. Hope you like it !.

I made this with the great guys at organika, visit our website> organikta.tv