7

I've been trying to create an animation where an object blinks on and off.

For example, I have a Cube and I set a keyframe on it's Restrict Visibility icon (the "eye" icon) with I, then I toggle off that "eye" so my cube doesn't show in the Viewport and again I press I to record that keyframe. Then, when I preview the animation in the Viewport, I see my cube appears and then disappears like I want, but when I render it, the cube does not disappear at all.

What am I doing wrong?

Thom Blair III
  • 16,535
  • 20
  • 75
  • 112
ivan
  • 103
  • 1
  • 2
  • 4

2 Answers2

10

Restrict Rendering

The feature you need to animate is the Restrict Render icon: enter image description here, not the Restrict Visibility icon: enter image description here. Restrict Visibility only effects whether the object can be seen in the 3D Viewport -- it does not effect rendering at all.

enter image description here

How To Render & View Your Animation

  1. Before you render your animation, first you should specify where you want the rendered animation to be saved and also the file name. To do this:

    enter image description here

  2. Next, scroll down to the Encoding section and select an appropriate encoding format. Here, I'm selecting the MPEG4 format

    enter image description here

  3. Now go up and click on the Render Animation button:

    enter image description here

  4. Now on your computer, go to the place where you saved your file and view it with a video file player:

    enter image description here

If you want to play your rendered animation directly in Blender, you can use:
Info -> Render -> Play Rendered Animation (CTRLF11)

NOTE: The "Play" buttons shown under the Render Result window will NOT play your rendered animation -- they are only for previewing your animation before rendering it:

enter image description here

You can read more about the different features of the Outliner window here and more about the Rendering Process here in the Blender Manual.

Thom Blair III
  • 16,535
  • 20
  • 75
  • 112
  • Thanks for answer, you were correct now when I press render it renders perfectly but I have one more problem. When I try to export this and import in Unity 3d animation doesnt work cube is shown but doesnt disappear ? – ivan Apr 17 '14 at 22:52
  • You should ask this in a new question. And I'm sorry, but I've never used Unity before, but lots of people around here have. Good luck! – Thom Blair III Apr 17 '14 at 22:58
  • thanks for replay. One more thing when I run animation in Blender then Render Resault screen appears, when I press play button animation doesnt work cube is always shown. In process during this rendering it was clearly that cube wasnt rendered at specific keyframe. – ivan Apr 17 '14 at 23:01
  • I up voted you answer, because you beat me to it by about 20 seconds. Yes I knew about the code styling, but have not used it in a element yet. – David Apr 17 '14 at 23:02
  • @Ivan I'll update my answer to show you how to view your rendered result. – Thom Blair III Apr 17 '14 at 23:12
  • @Thom thanks for answer, I have done all what you have told me and when I play button in 3d View, Object Mode I can see how my cube appear and disappear. But when I press animation it start to rendering and automaticly puts me in Image Editor where I can see my cube. Then I start animation (Image Editor window is still open) nothing happens it only says Render Result, View, Slot 1, RenderLayer, Combined ? Any suggestion ? – ivan Apr 17 '14 at 23:23
  • Ivan, I'm updating my answer now...it'll take me a few minutes and I'll post each step as I write it. – Thom Blair III Apr 17 '14 at 23:26
  • Ok Ivan, I've finished my answer. Did this help? – Thom Blair III Apr 17 '14 at 23:35
  • Yes it did thank you very much. My animation was saved in PNG format so I had to include that folder with images. – ivan Apr 17 '14 at 23:39
  • Ok, great! Glad I could help! :) – Thom Blair III Apr 17 '14 at 23:41
  • If this answer solved your problem, don't forget to click the "Solved" checkmark to let everyone know the question has been solved. :) – Thom Blair III Apr 17 '14 at 23:52
  • BTW, Ctrl+F11 or Info > Render > Play Rendered Animation can be used to view the rendered animation from blender. Btw, you probably already know about this, but it's considered very bad practice to render straight to a video file. – gandalf3 Apr 18 '14 at 00:11
  • Unity3d Doesn't display these keyframe animations. It needs Armature or shapekey animations to display properly (Parented to a mesh). By the way, you can export yoru model and do the same in unity animation module more easily then blender. To know about it, Serach answers.unity3d.com – Ali Jibran Apr 18 '14 at 06:24
  • 1
    I propose to cut out the part about "How To Render & View Your Animation" into a new question/answer and then merge my q/a http://blender.stackexchange.com/questions/16009/animate-the-viewport-visibility-of-an-object-within-the-timeline into here. That would make this q/a complete and less noisy as well :) – Gaia Clary Sep 20 '14 at 10:06
  • This no longer seems to work in Blender 2.91. When pressing I it says "hide_render property cannot be animated" – Bauxite Jan 01 '21 at 09:35
3

Simple problem, you are animating only the Viewport Visibility.
In the Outliner, Keyframe the "Render Visibility" (camera icon).

outliner showing the buttons
That image shows an object in the outliner. The three buttons on the right edge are, in order from left to right, Viewport Visibility, Viewport Selection and Render Visibility.

David
  • 49,291
  • 38
  • 159
  • 317