faster rendering (higher FPS)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
xaddict
Posts: 23
Joined: Tue Jan 29, 2008 7:18 pm

faster rendering (higher FPS)

Post by xaddict »

Hello,

Are there ways to speed up the FPS in a scene?
I think adding fog in the distance does it but I'm not completely sure.
I wonder if there is a way to, for example, not render things not seen.
I've only got one, not too big map, and its rendering at 400FPS... I want it to go up... I know this is very early on but I know I'll go and work with very much more detailed maps than this one (it's simple a plane with a house on it and it's prelighted (I think... it's a b3d file)) and I wonder if there's a way to make everything go a lot faster...

I have heard of stuff like:
Backface culling?
not seeing things behind walls.
Mipmapping

and some more (adding sub textures or something... forgot)

Is there anyone who explain me some of these principles and explain me how to do it in Irrlicht? :D
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

If you want Irrlicht to help you and do not draw things that is behind the active camera (for example) -- first of all you should make your map to be not single scene-node (as quake level, for example) but to be splited on a lot of smaller parts. The meaning is::: scene node is a smallest part in Irrlicht that "will" or "will not" be completely drawn (so in general: if you see only 1 triangle of the mesh on the screen -- all the node that this triangle belongs to -- is drawn).

Mipmaps generated automatically by Irrlicht.

Using FOG do not automatically skip drawing the node if its completely affected by the FOG. But using setFarValue() for the camera -- do. So, it is good combination when you using FOG + setFarValue() to hide far objects.
Vsk
Posts: 343
Joined: Thu Sep 27, 2007 4:43 pm

Post by Vsk »

EASY:
Rememer setting atomatic culling with frustombox option. I think that in 1.4 is working correctly.

EASY but some work:
Then you must implemente LOD (Level of datail). Irrlicht don't (still?) has this utility for most bodies. But have some LOD for terrainscenenode (use it).
For Lod the simplest way is create 3 bodies:
-The one that you are gonna see from near distance (max detailed).
-The one that you are gonna see from middl distance( low poly).
-The one far way but still in camera frustum (bilboard or very low poly).

I don't know is there is some librery for obtain this models in "runt time" (actually in beggining). I create them outside :?).

Medium, some calculus.
-Apply "some" occlusion culling.
if you have terrian with much hill for example you can make some kind of quick and easy test to find if there is some bodies hide for that hill.


Medium to hard (depending of your implementation.
Use Space data structures for handling your geometry position in you game world. It reduces your time for "close to a point" querie functions.

Hard (well I don't even know if it is hard or easy so for default is hard :P).
-if you have a indoor game, read for "portal culling". It is realy cool and intuitive. But I don't know how intuitive is its implementation :?.

I hope it helps you.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Vsk wrote:EASY:
Rememer setting atomatic culling with frustombox option. I think that in 1.4 is working correctly.

EASY but some work:
Then you must implemente LOD (Level of datail). Irrlicht don't (still?) has this utility for most bodies. But have some LOD for terrainscenenode (use it).
For Lod the simplest way is create 3 bodies:
-The one that you are gonna see from near distance (max detailed).
-The one that you are gonna see from middl distance( low poly).
-The one far way but still in camera frustum (bilboard or very low poly).

I don't know is there is some librery for obtain this models in "runt time" (actually in beggining). I create them outside :?).

Medium, some calculus.
-Apply "some" occlusion culling.
if you have terrian with much hill for example you can make some kind of quick and easy test to find if there is some bodies hide for that hill.


Medium to hard (depending of your implementation.
Use Space data structures for handling your geometry position in you game world. It reduces your time for "close to a point" querie functions.

Hard (well I don't even know if it is hard or easy so for default is hard :P).
-if you have a indoor game, read for "portal culling". It is realy cool and intuitive. But I don't know how intuitive is its implementation :?.

I hope it helps you.
Really it depends on what type of portal system you plan to implement. Usually a simplistic box portal culling system will do, and provide for some really good speed increases.

What it boils down to, on figuring out what culling process you want to use, is how are your levels designed. You are going to need to ask yourself, are you levels dynamic, or are they static? If they are dynamic then you will probably want to go with occlusion culling. If it is static then I would go with a PVS culling data system, or portal system(easier).
TheQuestion = 2B || !2B
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Premature optimization is the root of all evil.

Right now, this is the wrong thing to worry about. Concentrate on your game design and logic. That will stay with you to the end of your project, but you may decide to dump Irrlicht tomorrow.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply