locked
3D, smooth animation (rotation) and framerate RRS feed

  • Question

  • I'm intending to write a 3D maze-game in WPF 3D and have reached so far that I can walk through a maze now, but I have a few concerns of WPF 3D performance.

     

    Firstly when I rotate the camera (through quaternion) I don't get a smooth animation that I was hoping for, re-positioning the camera is no problem (it's smooth).

     

    My second concern is the best way to do the game loop (I have tried with both CompositionTarget and DispatcherTimer). The FPS is around 60 in both cases (I have tested on two new PC's running Vista with a graphic card with 256 MB dedicated memory, the results are the same on both of these).

     

    I would be grateful for any tips I can get.

    Friday, October 5, 2007 10:35 AM

Answers

  • I tried using Rotation3DAnimation class instead and this gives much smoother animation (it's not perfect but it's better).

    Monday, October 8, 2007 6:14 AM

All replies

  •  

    many monitors including lcds have a refresh rate of 60hz and by default directx is setup to sync to the refreshrate, therefore sync'ng with that hard cap of 60fps. In Managed directx you can override this default, but i'm not positive about it in WPF... research sync with refresh rate, if there's a way to turn it off that will get rid of that 60fps limit you have.
    Friday, October 5, 2007 6:31 PM
  • Thanks for the reply.

     

    But, I'm mostly concerned of the animation problem I have (when rotating the camera).

    I'm not sure that getting more FPS's will solve that problem.

    The strange thing is that re-positioning (translating) the camera is very smooth. It's when I rotate the camera, the screen update (animation) isn't as smooth as I would like it to be. It feels like I have tried everything...

    Friday, October 5, 2007 7:13 PM
  • I tried using Rotation3DAnimation class instead and this gives much smoother animation (it's not perfect but it's better).

    Monday, October 8, 2007 6:14 AM