Page 1 of 1

Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 2:47 pm
by manurung
Hi All,

Right now I am working on a simulation for my university with several OBJ files and total 1166892 poly. As expected, the FPS goes to around 33 FPS.
But what is really strange, even when I move my camera to some an empty space with nothing on it to render/display, I still have the same 33 FPS.

I used OGRE before, it only rendered thing it displayed. For instance, when I move my camera to a less complex structure, the FPS will increase, and vice versa.
The other way around, Irrlicht's FPS is always constant.

Where did I do something wrong?
Is there any parameter should be set to get this kind of behavior?

-- Auralius

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 3:11 pm
by Bl00drav3n
How do you create your objects?

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 3:41 pm
by CuteAlien
You can influence culling per scenenode with setAutomaticCulling:
http://irrlicht.sourceforge.net/docu/cl ... d2db28c5b8
That decides which nodes will be tranfered to the graphic-card.

You can also use more advanced clipping for static scenes by using an Octree.

Also you can avoid regular uploading to the graphiccard for static (non changing) meshes (the nodes can still move, scale etc) by calling setHardwareMappingHint with EHM_STATIC: http://irrlicht.sourceforge.net/docu/cl ... 8599043dfe
That way only the graphiccard will do clipping (which is often faster than any culling on the CPU side).

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 4:00 pm
by manurung
Thanks for quick reply.

@ Bl00drav3n:
I load my object using the standard way as in Hello World tutorial:

Code: Select all

 
nds->bed_node =   smgr->addOctreeSceneNode(smgr->getMesh( "../model/bed_structure.obj"));
 
Of course, I have like 10 of these objects. They have certain hierarchy, like one node is a child of another node and so on.

@CuteAlien:
I will have a look and try your suggestion. I will come back again. 8)

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 6:43 pm
by manurung
I tried all suggestions from CuteAlien, but nothing works.

I checked PerPixelLighting demo, it works just like the way I mentioned earlier, when I go to outer empty spaces, the FPS increased.
But it does not happen to me. I saw that there were no special variables/parameters tuned to get this kind of behavior.

Now I am really confused.

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 7:46 pm
by hendu
The default is bounding box. So if you're inside a big box, even if you can't see the big box, the big box is drawn.

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 7:53 pm
by nespa
try with vsync false to see the limits fps, then you will find the solution

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 10:06 pm
by manurung
Thanks for replying.

I do disable the vsync .

And I tried to find out more about bounding box, I checked CostumizedSecenNode example that came with Irrlicht package. It seemed that bounding box is a box that is sorounding a scene node around its origin point.

So, in my case, I have several scene nodes. So do I need to create a costumized scene node for each node that I have and define its bounding box. Which bounding box will be the main player here? The biggest one?

CostumizedSceneNode in example folder has only one node there, so it's easy to grasp the idea, but now I have several nodes here.

Re: Low FPS even when nothing is renderd on screen

Posted: Mon Jun 11, 2012 10:20 pm
by hybrid
You cannot mix octree scene node and EHM_STATIC. At least IIRC, the default octree setup uses an incompatible mesh buffer structure. Try to load just with getMesh and set the static usage afterwards. Also try to visualize the bboxes in case you assume errors.