Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, I'm very interested in Copperlicht. To convince my professor to use this framework, I want to develop an application which I can code custom 3D model using copperlicht and should be able to add more objects. I should also able to print FPS to check the variations in FPS as I add more objects on canvas. I'm new to graphic programming, I neither have knowledge on shader programming nor openGL. Being a newbie, how can I start diving into this framework? The following steps I wanted to implement (Suggest me if I go wrong): 1. Develop simple demo using copperlicht loading single cube or sphere or teapot on canvas. 2. Able to see the fps as I change the camera angles. 3. Later I should be able to add more triangles(Models) on the canvas either of same type (ex: Teapot) and able to compare the fps with single teapot one. Am i approaching the right way or please suggestions needed. The provided tutorials neither of them having FPS demo. Please someone HELP ME. I really liked the features stated on homepage but I don't know how can I implement them in my demo. |
||||
|
The best way to start is to work through all tutorials (you will find them in the documentation). By reading them, you'll learn most things you need to. The call to create an instance of the 3D engine is something like CL3D.CopperLicht(elementIdOfCanvas, showInfoTexts, fps, showFPSCounter) See the 4th parameter, just set it to true and it will print the current FPS. |
||||
|
thanks for your wonderful reply, I will try to do that. In the third lesson form tutorials, using custom nodes, I want to add more meshes so that I can compare the fps with single mesh. How can I do that? |
||||
|
wrote: The best way to start is to work through all tutorials (you will find them in the documentation). By reading them, you'll learn most things you need to. The call to create an instance of the 3D engine is something like CL3D.CopperLicht(elementIdOfCanvas, showInfoTexts, fps, showFPSCounter) See the 4th parameter, just set it to true and it will print the current FPS. I tried to do this: var engine = new CL3D.CopperLicht(canvasID); CL3D.CopperLicht(canvasID, true, null, true); I set 2 and 4th parameter to true and 3rd one null for default 60 fps. But I get this: Error: Object doesn't support this property or method Seriously speaking, I don't have any knowledge on this kind of programming. Only passion drove me here. I request your reply could be more detail. I'm also going through all the tutorials, no where mentioned how to print FPS. |
||||
|
Your code looked exactly like this here? var engine = new CL3D.CopperLicht(canvasID); It should have been only something like this here: var engine = new CL3D.CopperLicht('thenameofyourcanvas', true, 60, true); |
||||
|
wrote: Your code looked exactly like this here? var engine = new CL3D.CopperLicht(canvasID); It should have been only something like this here: var engine = new CL3D.CopperLicht('thenameofyourcanvas', true, 60, true); Thanks for the answer. I think you are the only one in whole forum who is active. |
||||
|
wrote: Your code looked exactly like this here? var engine = new CL3D.CopperLicht(canvasID); It should have been only something like this here: var engine = new CL3D.CopperLicht('thenameofyourcanvas', true, 60, true); @niko, Its working fine and seriously thanks for your valuable answer. But I do have one more question, actually, here we are restricting FPS to 60 max, but how could we obtain FPS in natural phenomenon? I mean, The copperlicht application maximum FPS is 60 fps? Can't we achieve more than that? Isn't there a way to achieve frame rate as it was without restricting to default as maximum? For loading simple cubescenenode, (Cube 3D model), can't we achieve more framerate than 60FPS? Isn't it the higher the framerate, the better the application? I'm confused, could you clarify me please.. P.S: Sorry if I'm very dumb in questioning, I'm in the state of understanding each bits and pieces from lower level. |
||||
|
If you specify '60' fps, then CopperLicht will try to do 60 fps, if possible. If the hardware it runs on is not capable of doing so, it will simply do it as fast as possible. You can also specify 100 fps. Or 1000. Whatever you want. Usually, even 30 fps is enough for most people, but 60 is a value where all people see movements as 'smooth'. |
||||
|
Hello, I am working on a test-scene and i want to measure the performance for different amount of objects. Now the FPS which can be set and displayed with
doesn't match the amount of rendered frames which i actually see. I understand that you can cut off the FPS with the fps-attribute. So when i choose "15", the framerate won't go higher than 15 frames per second. I tried this for a scene with many objects. If i set the fps to "15", it will render the scene about 15 times per second. Also what i see on screen is not faster rendered than 15 times per second. But if i use the same scene with a framerate set to "60", then the FPS on screen shows 60FPS but what i actually see on screen is that the scene will be rendered only a few times per second. It seems to me that the FPS isn't really measuring the amounts of rendering-circles per second. So how can i measure the real frames rendered per second? Thanks in advance! |
||||
|
Hello again, ok i solved the problem by myself. I have found out that you are using setInterval() for drawing the scene, which doesn't consider the performance of the system. Maybe you should implement the rendering cycle with requestAnimationFrame() in one of your next releases. |
||||
|
that's true, but it's intentional. People don't like websites taking down the performance of their system. But you are right, maybe it's an idea to offer a section option. |
||||
|
niko, I'm running CopperLicht as an engine for a game inside a C client locally, so I want all the performance I can squeeze from a user's machine as any desktop PC game would. So to me, the news that it's possible to squeeze better performance from switching the render cycle from setInterval() to requestAnimationFrame() greatly excites me. I second the feature request, as I think it is relevant for different use cases. Thanks! |
|