Restrict render layer range based on frames

Hey All,

I have a large project that I’m working on which is a single camera shot which travels through different scenes. Each scene is fairly complicated, and I’m looking into managing the render time. I currently have each scene on it’s own layer (or two) and the camera/lighting on it’s own layer as well. I noticed that I can’t keyframe enabled layers.

In order to manage render time I was hoping to be able to turn off layers once the camera has passed through them (saving time on BVH cache etc).

I did noticed that I can enable or disable render layers in the scene tab either on or off. Is this the best way to accomplish this goal?

I’d greatly appreciate any advice from the community on this issue.

Thank you very much,

-Matthew

1 Like

I suggest that it’s time that you adopt a lesson from “conventional movie-making.” Instead of attempting to do “one render” that magically “renders the entire movie all at once,” break down your process just as real movies do:

  • Each “render” is a separate “piece of film,” which might be longer than the portion that is actually used in the finished picture.
  • In CG, the workflow is often “edit, then render.” Blender’s “OpenGL Preview” feature is conceived expressly for this purpose, because it enables you to quickly produce material, for editing purposes, that will be an exact stand-in for the final shot.
  • After you have produced the (stand-in …?) footage, “cut it together” in the Video Editor – or in some third-party tool – to produce the finished movie.

Blender also features a “library linking” feature which enables you to “link to” assets in one file from many others. (“Scenes” are, in fact, an example of this linking concept, applied within a single file.)

So, this alternative perspective to your project would boil down to this:

  • When setting up a substantal project, create all of your assets, your sets (with camera positions), and so forth, planning to link to them. (Maybe this admonition does not apply to you … this time …)
  • You don’t attempt to “automate the transitions” during the render process.
  • … In fact, you delay(!) the actual rendering process as long as possible, working with “stand-ins” instead.
  • You knowingly “stand-in” more material than you need, “stamping” each frame so that you can positively identify it later.
  • You assemble the actual movie before(!!) you render anything, using Blender’s video-editor or equivalent software. (You will usually re-discover, at this step, that “the writer’s greatest tool is the eraser.” Go ahead and “leave it on the cutting-room floor,” and do so without apology or regret, since it actually didn’t cost you anything.)
  • Then, armed with exact “shot-names and frame-ranges” obtained by this process, you final-render the eventual picture, dropping the completed cuts in one-at-a-time. (By now, you already know that every single “final-rendered” sequence will, in fact, be used in the picture.)

In your immediate, scene-based project, one possibility would be to purpose your existing blend-file as a “library master,” containing various “scenes” that can be linked to. In this case, each “shot” might become a new file that “links to” the scenes and other assets in the master. Another approach would be to create new scenes, within the existing file, which represent each shot. Either way, the key realization is that the project is now broken down into shots, and that each of these shots are going to produce source material for a separate editing process that will produce the actual show.

Sundialsvc4,

Thank you for your very detailed response… However, the mistake may have been mine in that I should have probably placed this post in the technical support area? Your suggestions are valid for perhaps different projects; however, I did mention at the top of my post that the project I’m currently working on needs to be one continuous shot (same camera and continuous camera move throughout different scenes) so no editing. My client would certainly not be happy if they invested all of this money only to have me change their concept around so I could ‘edit it.’

Again, perhaps I should have broken down my question a different way as to not cause confusion and make it seem like a basic workflow issue. So, I’ll give it another try:

-I need to render a 720 frame animation (30 second commercial for broadcast) of a single camera move where the camera is traveling through different ‘scenes.’

-The scenes assemble and build themselves in and out of the shot as the camera passes through.

-Each of the scenes are on different layers.

-In order to save render time I was curious if there were a simple way to tell blender which layers to enable at a given time so it doesn’t need to calculate 10’s of millions of vertices for each frame (only a few million per scene/layer :wink:

-I’ve found one possibility of achieving this goal by key-framing the enable switch on active render layers in the scene tab, but I’m not sure if this is the best/ most efficient way of accomplishing this and would appreciate any help from the community.

Sundialsvc4, the information you gave is very good and direct. As a 3D/VFX Artist for a production company (in the SF Bay Area) for the past 10 years I can absolutely vouch for you in terms of the value of OPENGL renders and sharing assets between projects. You should certainly think about having a blog or website (if you don’t already) where you can give instruction to the community about the editing pipeline as it relates to Blender and 3D work in general.

MattyZ, I can bet that your client will never know if you use another camera in another scene (or even in another file) if it would have the same settings (even the same camera datablock) :wink:
Output will be the same if you split the entire movie in scenes. Each scene can have its own frame range, render layers, active layers, lights, compositing nodes, literally anything you want. But all the scenes can share the same camera (link camera to all the scenes), and it will move constantly in term of movie, but it will move just from start frame to end frame of each scene.
There is even a key in the command line for blender to render a particular scene (-S or --scene scene_name).
So you will be able to disable unwanted stuff with layers or on per-object basis using different scenes.
Also notice that you can keyframe those eye and camera icons in the outliner… :wink:

mechanic,

Thank you very much for your feedback. Yes, as long as the final video is one continuous shot, my client will be happy. I like the idea of linking the camera to travel between different scenes. I think that may work. Thank you again, very much for the suggestion. Again, as long as our compositor can then stitch everything together and it appears as though it’s one shot, we should be good.

Greatly appreciate your suggestion.

You simply need to do your editing (and shot design) carefully so that the effect is “seamless.”

For instance, you might arrange for the camera to follow a path at a certain rate. (The camera, and its path, is in a single linked asset-file. In the same file you might place “empties” which correspond to key positions, for props and so-forth, which must be the same throughout.) You can now do a “fly-through” using dummy-objects that are parented to each empty. “Stamp” your fly-through with frame numbers and note the precise frame-numbers where each cut will occur.

Next, you construct each set, once again in separate linked files, using the empties to help you precisely position key objects that will be seen in each scene. (Parent them to the linked empties.)

Your lighting design, insofar as possible, should also be a linked-asset, so that you know that the lighting will be consistent from one shot to the next.

You can now, again with creative linking of assets, produce a blend-file that (perhaps in a group of “scenes,” for convenience) is used to OpenGL-preview render each “strip of film,” including a frame-number and filename “stamp” on each one. Go ahead and “render the whole damned thing,” as though the complete fly-through was occurring on each set in turn. (It’s fast. You can do this.) Stamp each strip with frame-number and file-name.

Now, put on your Editor’s cap and cut the strips together at the chosen positions. By tying your camera to a path, you have the perfect “motion-control rig” to work with. Notice that you can “slide” the cut-points back and forth, along these identical-length strips of film, and the transition at any point will still be seamless.

(At least with BI renders, the lighting in a Preview render will also be consistent. You should measure the illumination at the key points, in each strip, to be sure that they appear consistent and seamless in Preview. Look at the histogram; use the eyedropper to sample (R,G,B) values. Careful attention to detail now will save much time later. When you think you’ve got it, pull a one-frame final-render at the transition-points and examine them again.)

      • Now, it’s time to let the client see something, and to become involved now(!) in what happens next.

OpenGL Preview renders will be exact stand-ins for renders produced by other methods. (Sometimes, they can be “final shots.”) You can now present this film to the client for review, knowing that it is inevitable that editing recommendations will now be made … now that the client can see what you are talking about. This is why we’ve delayed final-render.

The “timing and pacing” of the sequence will be very important, perhaps tied to music (or, vice-versa). The film will need to “hit” particular “beats.” There will be story-telling decisions that are made here. However, since you have complete renderings of each strip of film, you can quickly accomplish this with editing, either using Blender VSE or some other video-editing tool. (I use Final Cut Pro.)

Practice this so that you can do it in front of the customer.

Your editing process is very similar to what they do in television, punching one camera-button after the other to [CUT TO], at that instant, from one cam that is following the same action to another. Because all of your quick-renders are of identical complete fly-thrus, you can accommodate the finest of editing decisions … quickly.

When you finally reach “final cut,” you can now make a list of the frame-numbers that you actually need from each strip, and final-render only those frames. (Use a “frame per file” format such as OpenEXR.) Drop these into your final-cut edit in place of the stand-ins, one strip at a time, and the film is done. The customer receives a final render of exactly what he has already agreed-to.

That no longer seems possible in the newer versions of Blender.
I’ve been looking for something like that but haven’t found a simple solution yet.

My scene is not quite as complex, In my case I have many collections of objects that are animated for certain shots of my scene and I’d like to turn them off for the majority of the timerange when they are not supposed to be visible. Currently I’m carrying a whole bunch of assets 100% of the timeline when many only need to be present for a fraction of that time.

The only thing I can think of right now is to render separate frame ranges while turning objects on/off manually.

Is there a better way I’m missing ?

That might be the easiest way – “scenes” can also help. Basically, you link into the scene the objects that need to be in it, linked from a master scene (and/or external library files). You then render the frame-sequences that you need from each one. Then assemble with a video editor of your choosing.

Let me elaborate a little more on the important idea of “scenes.” These are effectively containers for many important sets of things, such as (but not limited to):

  • Current camera.
  • A collection of objects that have been linked-in from external files or other scenes.
  • Render settings including range and output destination.

You can reference the scene-name when running Blender from the command-line, which enables you to create a “shell command” file in your operating system which will render several scenes in sequence e.g. in “background mode” which doesn’t start the GUI.

As I said, one way to arrange for only certain objects to be visible is through the use of scenes. You link to or include all the objects in the base scene, then you create other scenes, each derived from the base scene, which link only to the assets needed by that scene. And, you set scene-specific output parameters to determine where the rendered files for that scene will go.

(Notice that the scenes link to resources – they do not copy them. Links can be made to other links. A change to a linked resource is instantly reflected in “everything everywhere” that directly or indirectly links to it because there is actually only one instance of it.)

While you’re doing rough-renders and initial editing, the “stamp” feature is also useful, “stamping” information such as filename, scene name, frame-number and timecode directly onto the rendered frame. This makes it much easier to do initial editing and to then “take off” from this a list of exactly what you must now final-render.