Complex cube transition effect

Im trying to make a good cube transition effect, as its done here http://greyscalegorilla.com/blog/2010/05/how-to-make-the-the-discovery-channel-rebrand-cube-transition-effect-with-cinema-4d/ but Im finding a hard time to achieve that result with blender.

So far I never found something that I could say, this is impossible with blender, but right now Im close to that!

I could animate cube by cube, but I would never achieve that random effect like he did on the tutorial.

So, anyone knows how can I create that with blender? I mean only the cube random animation.

Im really lost here.

Thanks.

Well, I watched the beginning and I think I know how I would do it.

I’d texture a cube with two shadeless blue, two shadeless red and two shadeless green sides. This means I can always do a 90 or 180 degree twist going from any one color ending at another or a 180 degree twist going from one color to another ending on the third.

For the animation I’d animate single cubes, copying and off-setting/reversing the animation for other cubes, I mean, that’s basically a choreography problem more than anything else.

The in comp I’d create the alphas. The reason I used three colors is that this allows me to create three different alpha’s by replacing one color with black and the other two with white. So I can switch between three different source videos/images or two source videos/images + white.

Lastly you need a copy of the complete scene/animation in something like AO/clay-render to use as shading multiplied on top of everything else.


And I hope you get how I mean, hehe, it would work. But, as with so much working with 3D and comping, there’s always a couple of different solutions, which is ‘better’ is the one you like and feel comfortable doing, the one you ‘get’. :slight_smile:

Edit: Now I’m gonna check the rest of his tutorial and see how he solved it. :smiley:

He made the whole animation with two effectors basically, I dont want to make it all by hand, it ll be kind of too mutch, Im trying to find a practical way to do it, using the tools that blender have to achive something more random.

I dont know, thanks farmfield, but I still want to find a better solution like the guy found on the video, if its possible off course.

Thanks again.

Oh, he spent a shitload of time with the animation part, hehe, not really my thing, but I guess you could use constraints to create similar effects that he’s doing though I think you’d need to do some scripting to get it all together - but, as I said, that kinda animations is not really my thing, there might be better/simpler solutions.

Also, he used four colors, though rotation becomes locked to the Y-axis, my setup allows for rotation on all axis - which it also would using 6 colours, but seems like to much work. :wink:

My mind went directly to the compositing part of it as I’m more of a comper than anything else (even it’s what I do the least nowadays) but I’m pretty shure there are things you could use, like paint effects is one thing that comes into mind, if you can connect that to a constraint or otherwise us the generated vertex groups to control the rotation of an object…

Uhmm, I see, do you know about a tutorial about what you wrote? the “generated vertex groups to control the rotation”?

Thanks, farmfield.

And if anyone have an idea I ll be glad to read it!

But you actually split the video and mapped it on the cubes? Very cool though not the same effect. :wink:

Also, it’s pretty obvious the original effect is an Avid Motion Graphics box (or similar broadcast system) plugin, most likely written from scratch in C, this is something with presets they just plug source video/images into and presses play…

It looks like almost the same thing, I think, thanks a lot Atom, very cool!

@Farmfield: Correct, Nick cheated in his video. He created the motion and the ambient occlusion pass so he could composite whatever he liked in After Effects without a re-render, which is smart. I went for a direct mapping method by calculating all the UVs to split the image at runtime. This does require a re-render if you want to change what is on each side. But you can still kick out an unmapped AO pass and material ID passes with my system and achieve the same thing Nick does in his video. If you look into the final posted BLEND from the links I posted you will find the compositor is setup to do just that.

Great atom, you are planning in release it to 2.6x? it would be great! Thanks a lot!

No plans for an update, sorry. Even though it is cool, IMHO, nobody (my clients) wants the effect.
I encourage you to search on Liero’s threads, though. He has something already up and running that simulates the effectors from Cinema4d inside of Blender.

Here’s my attempt:
http://i.imgur.com/vm13F.gif

The script sets up drivers on the cubes, so that it looks up the rotation value in a texture. The only animated property is the brightness value of the texture.

import bpy
import math

TEXTURE_NAME = 'rotation_tex'
GROUP_NAME = 'grid'


def texture_lookup (obname):
    ob = bpy.data.objects[obname]
    
    tex = bpy.data.textures[TEXTURE_NAME]
    val = tex.evaluate( (ob.location.x, ob.location.y, ob.location.z) )
    return val[3]*math.pi/2


bpy.app.driver_namespace['texture_lookup'] = texture_lookup


# update expression for all objects in the group set by GROUP_NAME
for ob in bpy.data.groups[GROUP_NAME].objects:
    
    expr = 'texture_lookup("%s")' % ob.name
    
    ob.animation_data.drivers[0].driver.expression = expr

Some things are expected before you run the script:

  • All cubes affected should have at least one driver (preferably only one), and it should be set to python expression.
  • All cubes (and nothing else) should be a member of a group named “grid”
  • The texture “rotation_tex” must exist
  • Probably something more that I’m forgetting :wink:

You could animate the location of the cubes as well, if you’d like, as it always looks up its current local coordinates in the texture.

Everything is in the attached blend-file.

Attachments

cubegrid_drivers.blend (719 KB)

That was my thought to. Also, as I don’t script I need to keep it simple. :wink:

And I’ll check the blend, I missed there was one. Tnx. :slight_smile:

Thanks atom.

Thanks a lot teppic, I l trying to undersand your settup.

And thanks farmfield.

I tried to find the script from liero that you ment but I didnt foud it, but I found lots of great things that he made, well, if you know where it is and could send I ll be glad, thanks a lot for your tip, I didnt found that script but I found lots of other great scripts.

Feel free to ask if you have any questions. I’d be happy to help if there’s anything that you want differently (within reason :))

A quick explanation of the script:

its in two separate parts actually, which are more ore less independend

The first part registers a helper function, which is called from the driver. This function is used to fetch the value of the texture at the object location (using the object location as texture coordinates)

The second part of the script is just used to update the driver-expression on each of the cubes, since it’s tedious to do it manually. Each expression must contain the name of the object itself. So if you need to copy the cubes to make more rows or columns, you will have to run the script again, to update all the expressions.

Also, there is a little plane to the left (in the camera view), which is just used to access the texture used for driving the cubes. As i wrote earlier, the brightness-value of the texture is animated.

The scale of the texture is probably totally off. I just set it to a value that looked OK. You might have to tweak it if you want to drive it from an image-texture.

Great teppic, really great, thanks a lot, now I understood it, great script!