If I wanted to create an animation, each frame would have several seconds of rendering a completely transparent part, which adds up obviously. Is there a way to eliminate this waste of time?
-
$\begingroup$ A partial solution might be to make these black; in newer versions of Blender (2.73 if i recall), if the world background is black, it will be removed from the sampling tree making it faster. Try this and see if the render is any faster. $\endgroup$– someonewithpcCommented Jun 8, 2015 at 22:29
-
$\begingroup$ Fully black background does render slightly faster than a non black background, but transparency is still slightly faster than both. In my mind the only things that will control this issue is tile size and render frame size. Perhaps if your animated element doesn't move around the whole frame, you could render a cropped frame and composite it back into the shot in the right place later. $\endgroup$– Todd McIntoshCommented Jun 8, 2015 at 22:40
-
1$\begingroup$ @someonewithpc I believe it's 2.74+ $\endgroup$– PGmathCommented Jun 8, 2015 at 23:27
2 Answers
There is nothing specifically designed into Blender to tell it to ignore the transparent areas currently.
That being said, there are some things we can do to help speed up the render somewhat.
- Transparent Background - Choose transparent in the Film section of the Render properties panel. This will render faster than a coloured background (whether full black or not)
- Tile Size- Choose a smaller tile size than your current (this tip is mostly for CPU rendering as GPU rendering generally uses larger tiles). This will help the render times when the buckets are processing the edge of the foreground element.
- Targeted Sampling - Use the Branched Path Tracing option in the Sampling section of the Render Properties panel. If you reduce the AA sample some what and raise the bounce samples (Diffuse, Glossy, etc.), you will reduce time spent on rendering the sky/transparent background.
- Cropped Render - this option is a little more extreme, but if you have an object that doesn't move much on screen, you can crop the render to only include the portions of the screen it's in. You'd then composite it together with the rest of the full frame renders.
-
$\begingroup$ I did a quick test, and you're right, rendering with transparency seems consistently faster (even if only by a few milliseconds), which surprised me. Any idea why this is? $\endgroup$– gandalf3Commented Jun 9, 2015 at 18:54
-
$\begingroup$ I'm not sure why, but I would have thought it would be much faster, which it isn't. Cycles needs some sort of mask pre-processor to skip the alpha area completely. $\endgroup$ Commented Jun 9, 2015 at 19:16
-
$\begingroup$ The only thing it's doing is replacing the sky with alpha for the camera, it still needs to send rays to get reflections of the actual environment (I guess since the environment still influences the scene it can't be skipped in any meaningful fashion). As a matter of fact I can't see any reason for transparency to be faster at all..? $\endgroup$– gandalf3Commented Jun 9, 2015 at 19:29
Full disclosure, the add-on I'm about to recommend is a paid for add-on created by me, but I think it does what you need as it was built partially for the very task of skipping transparent parts of an image.
If you were rendering a still image you could use the 'render border' feature of blender to skip areas outside of the chosen area. For animations you can use my add-on, the Animated Render Border (link to Blender Market product page for add-on). This updates the render border every frame so it always surrounds the selected object or group and works both in the viewport and the final render, allowing the skipping of transparent parts for all frames. It also has an adjustable margin to allow for a slight border around the object.
Here is a (choppy) gif showing it in action:
-
$\begingroup$ I'm specifically looking for a render layer border animator, is that a feature in your addon? $\endgroup$ Commented Jul 14, 2015 at 16:57
-
$\begingroup$ Ah, I see. It supports render layers if you are rendering them separately or if each of the render layers requires the same border (unlikely). Basically, the border can update in between renders but not inbetween different different parts of the render, e.g. render layers. $\endgroup$ Commented Jul 14, 2015 at 17:26