Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Get current fps

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 381 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/09/2011 at 10:02, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hello again,

      How to get the current fps of the viewport? Or how can I calculate them?

      I do not find any method execpt of doc->GetFps(), but this is the fps for animation.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/09/2011 at 12:43, xxxxxxxx wrote:

        I'd think the simplest way to do it would be to measure the time between redraws in a scenehook or something like that. I don't know if Cinema has a built in function for this.

        - Carter

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 14/09/2011 at 03:22, xxxxxxxx wrote:

          You should get a fps by dividing 1000ms with time difference.
          Time being system time that you get with: time()

          Rough coffee:

            
          var lastTime = 0;   
          main(doc,op)   
          {   
          var fps      = 1000.0 / (time() - lastTime);   
                lastTime = time(); // <- store time   
          }   
          

          Cheers
          Lennart

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 14/09/2011 at 05:50, xxxxxxxx wrote:

            Thank you both, got it now by my own.

            In C++:

              
            timediff=GeGetMilliSeconds();  
            DrawViews(DRAWFLAGS_ONLY_ACTIVE_VIEW|DRAWFLAGS_NO_THREAD);  
            fps=1000/(GeGetMilliSeconds()-timediff)  
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post