10 Replies Latest reply on Nov 18, 2016 6:56 AM by Colin Holgate

    Any plans to support 90 fps?

    Bob Flesch Level 1

      I have been working on a 3d game engine using Stage3D for a while now.

      Was able to support Oculus Rift via an ANE until Oculus announced that 90 fps was going to be required for next gen viewer.

       

      Does anyone know of Adobe plans to support 90 frames per second?

      Or do I throw away my hope of using my engine with Oculus Rift?

       

      bob

        • 1. Re: Any plans to support 90 fps?
          Bob Flesch Level 1

          FYI: So the player will run at 90 fps if used in the standalone player, or in the device emulator for mobile devices

          • 2. Re: Any plans to support 90 fps?
            Colin Holgate MVP & Adobe Community Professional

            I unmarked your second post as being the correct answer because it was just additional information. That way this post still shows as being an outstanding question.

             

            You can set the frame rate to up to 120, which includes 90. But, all Apple devices are frame locked to 60 fps I believe, so for Oculus Rift and HTC Vive you would need to use a high-end PC video card to be acceptable to them. I think 60 fps would be fine, and it's a shame they've ruled out all Macs, though I imagine it's possible there are boards for Mac Pro that could work.

             

            In any case, all the Oculus needs to see is 90 fps coming from the video board. Even with their own software they sometimes have modes where the scene is only changing 45 times a second, but they still work.

             

            So, either try any frame rate running on a 90 fps video board, and it may well work. Or set the fps of your animation to 90 fps too, see if that helps.

             

            Interesting article here about frame rate limits, and some ways you can get past 60 fps, at least in some Windows browsers:

             

            Overriding Flash player 60fps limit in Firefox (up to 950fps, as Silverlight 2 in bubblemark) – Tekool.net

            • 3. Re: Any plans to support 90 fps?
              Bob Flesch Level 1

              Thanks for the response Colin.

              I am not sure how pertinent that link is, it is from 2008 and flash has changed at bit since then.

               

              Maybe you have some thoughts on the general process.

              I get an enterFrame event, if I set FrameRate to 60fps

              I get one every ~16 ms.

              Problem is, I then have updating and rendering I need to do ~5-10 ms.

              So the next enterFrame comes in from 16ms after I leave the app.

              If I have a frame that takes me 10 seconds to render, I end up taking 26 ms per frame.

               

              What I have done is crank up frameRate to 120 fps, this lowers the between frame time down to 8ms, so now with a 5 ms time to update and render, I get 13ms total, so a 66 fps.

               

              Ideally those times would not add!

              • 4. Re: Any plans to support 90 fps?
                Colin Holgate MVP & Adobe Community Professional

                Where you said "10 seconds" I assume you meant 10 milliseconds.

                 

                A good thing about enterframe is that it happens at the point where the frame has just been redrawn, and so for 90 fps you would have about 11 mS to make any changes that are needed. Your description of the figures makes sense if you were using exitframe.

                 

                My suspicion is that what you are drawing is taking 13 mS to do.

                 

                You are doing AS3? And what kind of animation are you doing, what rendermode are you using? Are you using bitmaps, or at least cache as bitmap for vectors that are not changing?

                 

                HTML5 Canvas is unlikely to be fast enough. HTML5 WebGL might be, but neither are as fast as AS3.

                 

                If you were allowed to, could you post an example FLA, so I can see what figures I get?

                • 5. Re: Any plans to support 90 fps?
                  Bob Flesch Level 1

                  >Where you said "10 seconds" I assume you meant 10 milliseconds.

                  Indeed! All times are in ms.

                   

                  From my logging data, a 60 fps frame rate target will not generate a new enterFrame event every 16ms. It is 16ms plus your render time. I could be wrong.. but its not what I have measured. I take a time stamp before I leave the frame, and subtract that from the time stamp upon entering the next frame to find the interval time. 16ms if I am lucky, if I take too long to load assets, It appears Flash scales back my frame rate.

                   

                  I have run extensively in Adobe Scout, I use object pools extensively, but my biggest frame hit is still garbage collection.

                   

                  I have writen a 3D graphics engine using Voxels in AS3. More than that I am writing a cross between SecondLife, a better Minecraft, and Wow. I am using Direct Rendermode, and make extensive use of AGAL.

                   

                  My goal is to give users the ability to create what ever they want! And to free my self from the tyranny (and cost) of meshes, and max/maya. I have spent 100,000s on previous projects creating meshes, but that is another story.

                   

                  >HTML5 Canvas is unlikely to be fast enough. HTML5 WebGL might be, but neither are as fast as AS3.

                   

                  Indeed AS3 is still the best thing for doing this in a web-browser even after 5 years. Webassembly is faster, but they dont support GPU yet.

                   

                  >If you were allowed to, could you post an example FLA, so I can see what figures I get?

                   

                  Since this is my project I can do what ever I like. At this point I am not really worried about someone stealing my idea or code. I am not actually using Animate CC ... I am using Intellij Idea. My code looks more like a C++ project then it does a traditional Flash project.

                  • 6. Re: Any plans to support 90 fps?
                    Colin Holgate MVP & Adobe Community Professional

                    Fortunately, the rendering will happen within the 16 or 11 mS. It would only extend the time if you were using exitframe instead of enterframe, or if building up the changes took more than 16 or 11 mS.

                     

                    You could look at the amount of time that has passed, and do your object movement based on real time, and not the number of frames that have gone by.

                     

                    Although Scout will help see things that could be improved, I would expect it to also cause some slowdown. Also, you could have an array of times, and only do one trace after a while, because even a trace statement could cause a delay.

                     

                    With making meshes, will you be able to combine them into less meshes? I think that one mesh of 10,000 faces will perform a lot better than 10 meshes of 1000 faces.

                     

                    Try different wmodes anyway, because it could be that the player or browser is forcing the frame rate to match the browser's refresh rate.

                    1 person found this helpful
                    • 7. Re: Any plans to support 90 fps?
                      Bob Flesch Level 1

                      >You could look at the amount of time that has passed, and do your object movement based on real time, and not the number of frames that have gone by.

                       

                      That is a basic rule of 3D engines.

                       

                      Since scout uses release mode, the effect on frame rate depends on the type of profiling you do.

                       

                      >With making meshes, will you be able to combine them into less meshes?

                      >I think that one mesh of 10,000 faces will perform a lot better than 10 meshes of 1000 faces.

                       

                      There is a balance between making large meshs, which take a lot of time to update. And making smaller meshes which update fast but take slightly longer to render. Since modifying the world is a critical part of game play, being able to update the mesh quickly is important.

                       

                      >Try different wmodes anyway, because it could be that the player or browser is forcing the frame rate to match the browser's refresh rate.

                       

                      Since this app uses AGAL, you HAVE to use direct or gpu mode.

                       

                      Thanks for your feedback and thoughts.

                      I am listening...

                      • 8. Re: Any plans to support 90 fps?
                        Colin Holgate MVP & Adobe Community Professional

                        direct or gpu are rendermodes, aren't they? Isn't that different to wmode?

                         

                        As an aside, can you really use gpu rendermode? It would be nice if you could run Stage3D in GPU rendermode, and not just in Direct.

                        • 9. Re: Any plans to support 90 fps?
                          Bob Flesch Level 1

                          > direct or gpu are rendermodes, aren't they? Isn't that different to wmode?

                           

                          They are wmode's
                          https://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html

                           

                          I haven't actually used gpu wmode. But according to docs..

                           

                          gpu - Use additional hardware acceleration on some Internet-connected TVs and mobile devices. In contrast to other wmode values, pixel fidelity for display list graphics is not guaranteed. Otherwise, this value is similar to wmode=direct

                          • 10. Re: Any plans to support 90 fps?
                            Colin Holgate MVP & Adobe Community Professional

                            Alas, I believe that Stage3D requires Direct, unlike StageVideo and StageText, both of which will work in either mode.

                            1 person found this helpful