0
$\begingroup$

I want to animate various parent objects (and their children objects) appearing and disappearing in a rendered animation.

This is currently possible with single objects by keyframing the Restrict Rendering and Restrict Viewport Visibility options in the outliner. (They're the little camera and eyeball symbols next to each object.)

I want to do something similar, but with multiple objects, preferably under a single parent object. The main goal is to be able to do this without having to set the keyframes for each object in the group manually.

This has been brought up before in a previous Blender StackExchange question, but it has no confirmed answer, and the only information it does have is some extremely confusing writing about some feature called drivers.

Another option I tried to think of would be to put each group of objects on its own layer and animate the layers' render restriction, but according to this other Blender StackExchange question, keyframing layers isn't recommended.

The latter question even mentioned my problem, saying "the animation of the visibility of groups of thousands of objects (with various materials) is not easily or practically possible."

I think neither of these questions got enough exposure, and there might be someone with a simpler solution to this problem. (Or maybe even a clearer explanation of the whole "drivers" method.) This is why I am bringing this up again, despite it already being asked on here.

How can I easily animate groups of objects appearing and disappearing for a rendered animation?

$\endgroup$
1
  • $\begingroup$ Animate a material visibility and assign it to all of the objects. $\endgroup$
    – Mr Zak
    Sep 2, 2016 at 9:38

2 Answers 2

1
$\begingroup$

I've not attempted this but I have done similar in that I've created new "Scenes" and copy/pasted rigged characters into those. (CTL-C/CTL-V) Do not try and use SH-D!

The objects and characters are duplicates and importantly, are intact in their new scenes with duplicate keyframes!

You just have to bulk select the objects/chars you want in each new Scene, then copy them into it.

What you do in one scene is in many respects, isolated from the other scenes, give or take a few things.

Your motions/keyframes wouldn't have to be re-entered. A new camera or cameras would be needed along with their alignment, and lighting of course but the main animation work would be copied in along with each group of actors.

If you just want to duplicate what a group or even a single character is doing, do as above but into a different layer. Combine the layers to bring them together again. The copies will want to occupy the same locations so their parent(s) might have to be tweaked in the dope sheet. i.e. Starting frames advanced and retarded.

A further thought, if you're trying to create a crowd, you can have a rendered video of the first lot in the VSE and use a Scene strip over the video for the extra actors rendered previously to be upstaged by those being rendered "live" and in front of the transparent 'World Background' that comes with the 3D stage. Lossless rendering is a good idea when repeating this process several times.

Hope this is what you're after...

$\endgroup$
3
  • $\begingroup$ I didn't know it was possible to add more scenes! It's not as straightforward as drivers, but it's nice to know there is more than one method to this $\endgroup$ Sep 4, 2016 at 1:11
  • 1
    $\begingroup$ Adding a new "Scene" is as easy as going to the top of the 3D window and clicking on the + (plus) button. You'll be asked if it's for a new scene. Click on that and presto! You're sitting in a blank and brand new scene that's pretty much independent of the original one. By expanding the top drop down menu you can switch between scenes. Get back to the old one, select the char(s) you want to copy, press CTL-C, then go back to the new scene, press CTL-V . It's that simple. $\endgroup$
    – Edgel3D
    Sep 5, 2016 at 15:55
  • $\begingroup$ Revisiting this problem again, scenes are actually easier to manage than drivers, especially with how some render farms disable drivers in .blend files for security reasons $\endgroup$ Dec 5, 2017 at 0:13
2
$\begingroup$

Drivers are actually not much different to using keyframes. As you know, keyframes allow you to specify the value of some property at specific frames of the animation and blender fills in the values on the inbetween frames by a method of interpolation. Drivers effectively do the same job but rather than specifying specific fixed points along the animation (as you do with keyframes) you, instead, define the rules for how that property varies. This allows you to do much more than you could do with keyframes such as make one property directly dependent on another. For example, you could vary the scale of one object based on how close another object is to it - simply by defining the rule (eg, scale = distance / 10). You can also add modifiers to the driver output - for example, you could use the frame number as the basis of a driver and apply a sine wave to it to vary some property over time - very useful for getting something to pulsate, which would be extremely cumbersome via keyframes alone.

To create your first driver simply start a new blend file (with the default cube), click into the X location property field of the cube and enter #frame (the # is a shortcut for creating a driver and 'frame' is simply a reference to the current frame number). If you now step through the frames you should see the cube shoot off along the x-axis. (If you don't then you probably got a warning at the top of the screen that "auto-run" is disabled - this is a safeguard to prevent scripts being run when you don't want them to - go into File/User Preferences and select the File tab and enable the Auto Run Python Scripts checkbox to enable scripts)

Once you have created the driver you can configure it via the Graph Editor window by changing the 'Content' in the toolbar (at the bottom of the graph editor window) from 'F-curves' to 'Drivers'. Press N to see the properties panel and details of the driver are shown. The driver has a 'value' shown in the Drivers panel and you'll see that vary as you change the frame. An f-curve is applied to that value to allow you to more easily vary how it affects the actual property. If you scroll down to the Modifiers panel you can add a Built-in Function - try a Sine wave to get your cube oscillating.

Of course, this doesn't directly address your original problem. However, once you've got a grasp of drivers you can hopefully apply that knowledge to manipulate the any other properties (such as visibility) as you require.

EDIT : I believe I've managed to achieve what you're after as follows :

  • Start a new blend file.
  • Select the default cube.
  • Right-click on the Restrict View icon in the outliner and select 'Add Driver'
  • Add a new object to the scene - this will be the 'controller' object and will be used to hold the properties you'll manipulate later.
  • On its Object settings, add a Custom Property.
  • Edit the property and set its value to 'True' and its name to 'CubeVisibility'.
  • Select the cube.
  • Open a Graph Editor window.
  • Change the mode to 'Drivers'
  • Select the driver on the cube.
  • Open the Properties panel by pressing 'N'.
  • Scroll down to Variables - there should already be one named 'var'. Change it to 'Single Property' (leave the name as 'var').
  • Set the object field to the 'controller' object you created earlier (you can use the dropper to select it from the 3D view)
  • Set the Path to '["CubeVisibility"] (the custom property you created earlier)
  • Scroll up to the Drivers section and ensure it's set to 'Scripted Expression' and Expr set to 'var' (as an alternative, use Average Value in place ofScripted Expression and then you don't need the Autorun Python Scripts property enable in the user preferences)

That should be it. Now go back to the 3D scene and select the 'controller' object and scroll down to its Custom Properties. Changing CubeVisibility between 1 and 0 (True and False) should cause the Cube to show and hide.

To apply the same to multiple objects, right-click the Restrict View icon of the cube in the outliner and select 'Copy Driver'. Right-click on another object's Restrict View icon and select Paste Driver and the driver will be replicated on the other object. If it doesn't work immediately you might need to select the driver in the Graph Editor and click 'Update Dependencies' for it to pick up the changes - although saving the blend file and re-opening it should also update all drivers automatically.

Hope this helps.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .