title: Simple camera animation has lots of flickering
body: <p>I am new to 3D and animations in WPF. I have been trying to create a very simple scene made of a floor and 2 cubes (well, 3D rectangles, rectangular prisms, whatever that is called). This scene has a perspective camera which I am trying to animate (I basically want it to fly around the scene).</p>
  
  <p>The code is very simple and I believe takes a good approach for the most part. Please find relevant extracts below and the <a href="http://www.mediafire.com/?kuvkoc37amyuv30" rel="nofollow">sample project can be downloaded here</a>.</p>
  
  <p>XAML:</p>
  
  <pre><code>    &lt;Viewport3D ClipToBounds="false" IsHitTestVisible="false"&gt;
          &lt;!-- Camera --&gt;
          &lt;Viewport3D.Camera&gt;
              &lt;PerspectiveCamera x:Name="ViewportCamera"
                                 Position="0 0 20" 
                                 LookDirection="40 40 0" 
                                 FarPlaneDistance="600" 
                                 UpDirection="0 0 1" 
                                 NearPlaneDistance="0.01" 
                                 FieldOfView="75" /&gt;
          &lt;/Viewport3D.Camera&gt;
          &lt;!-- Light --&gt;
          &lt;ModelVisual3D&gt;
              &lt;ModelVisual3D.Content&gt;
                  &lt;DirectionalLight Direction="1 0.5 1" /&gt;
              &lt;/ModelVisual3D.Content&gt;
          &lt;/ModelVisual3D&gt;
          &lt;ModelVisual3D&gt;
              &lt;!-- Floor --&gt;
              &lt;local:CubeControl Color="Black" Size="300,300,1" Center="0,0,0" /&gt;
              &lt;local:CubeControl Color="LightGray" Size="15,25,40" Center="40,40,20" /&gt;
              &lt;local:CubeControl Color="LightGray" Size="25,20,60" Center="40,-40,30" /&gt;
          &lt;/ModelVisual3D&gt;
      &lt;/Viewport3D&gt;
  </code></pre>
  
  <p>VB:</p>
  
  <pre><code>Dim tAnimation As New Vector3DAnimation(ViewportCamera.LookDirection, New Vector3D(40, -40, -20), New Duration(TimeSpan.FromMilliseconds(1000)))
  ViewportCamera.BeginAnimation(PerspectiveCamera.LookDirectionProperty, tAnimation)
  Dim tAnimation2 As New Point3DAnimation(ViewportCamera.Position, New Point3D(-10, -10, 30), TimeSpan.FromMilliseconds(1000))
  ViewportCamera.BeginAnimation(PerspectiveCamera.PositionProperty, tAnimation2)
  </code></pre>
  
  <p>The animation runs as expected when the window is very small (around 320x240). As the size of the window increases, the animation flickers and entire frames seem to be skipped, resulting in a white screen. In a large window (1920x1080), the animation is almost not visible at all (it's all blank until the camera is set to its new position).</p>
  
  <p>Somehow it seems very similar to <a href="http://www.mediafire.com/?kuvkoc37amyuv30" rel="nofollow">this problem</a> but this has not helped me.</p>
  
  <p>This is a very basic animation and I can't believe WPF has any problem doing this, so I'm thinking I am doing something wrong.</p>
  
  <p>can anybody help me figure out why? I have spent more than enough time on this.</p>
  
  <p>Thanks in advance!</p>