About Store Forum Documentation Contact



Post Reply 
Low fps when zoomed in.
Author Message
mih Offline
Member

Post: #1
Low fps when zoomed in.
Hi, I updated my car editor to the last version of the engine and I have noticed a strange problem with the rendering speed :

When I zoom camera close to the model the fps falls down immedietly :
[Image: lowp.jpg]
The same model, with normal camera distance :
[Image: highs.jpg]

And that is the way I render the model :
Code:
case RM_PREPARE:
            for(int i=0; i<selected_mesh_parts.elms(); i++)
            {
                car.hide(selected_mesh_parts(i)());
            }
                car.draw(Matrix(mesh_pos));
                wheel_left.draw(wheels[0].matrix());
            wheel_right.draw(wheels[1].matrix());
            wheel_left.draw(wheels[2].matrix());
            wheel_right.draw(wheels[3].matrix());
            car.showAll();
            car_stage.draw(stage_actor.matrix());
        break;
        case RM_SHD_MAP:
            for(int i=0; i<selected_mesh_parts.elms(); i++)
            {
                car.hide(selected_mesh_parts(i)());
            }
            car.drawShadow(Matrix(Vec(mesh_pos)));
            wheel_left.drawShadow(wheels[0].matrix());
            wheel_right.draw(wheels[1].matrix());
            wheel_left.drawShadow(wheels[2].matrix());
            wheel_right.drawShadow(wheels[3].matrix());
            car.showAll();
            car_stage.drawShadow(stage_actor.matrix());
        break;

Where selected_mesh_parts are the names of the transparent parts, which are not present in this model. Any ideas what am I doing wrong ? smile
01-19-2010 01:00 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #2
RE: Low fps when zoomed in.
I think that's pretty normal.. The engine will automatically add more detail to the model and textures when you zoom in. Meaning a lower FPS.
01-19-2010 01:27 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #3
RE: Low fps when zoomed in.
Hm I don't think that it's normal, because in the earlier versions of the engine the fps were on the same level all the time. The model is about 9k tris and when zoomed in It starting to run really slow and camera is 'jumping' when I move around so It's rather strange with so little verts to render pfft
01-19-2010 01:36 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Low fps when zoomed in.
please check version history and see what effects have been updated/changed
but I dont think about anything which could affect this

try checking other stuff, like programs running in background, graphic drivers..
01-19-2010 05:29 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #5
RE: Low fps when zoomed in.
But the way I render model is ok ? RM_PREPARE is all I must use to do rendering ? or maybe the RM_SOLID must be used too ?
I have seen that the .draw method is not using automatic frustum culling anymore and I didn't use It when rendering the model, so can It be the problem ?
01-19-2010 05:54 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Low fps when zoomed in.
ah yes,
I guess that's the case
please make sure to use frustum culling in RM_PREPARE and RM_SHD_MAP
01-19-2010 05:57 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #7
RE: Low fps when zoomed in.
But how to use It on the mesh ? because Frustum() function desn't take a mesh parameter
01-19-2010 06:04 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: Low fps when zoomed in.
frustum(mesh->box, mesh matrix)
01-19-2010 06:14 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #9
RE: Low fps when zoomed in.
Hm It didn't help, any ideas what more can be cause of that slow-down ? All i have changed in my code was the way objects are rendered, so I think It must be something with that but i have no idea what can It be ;/
01-19-2010 06:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #10
RE: Low fps when zoomed in.
why do you have

wheel_right.draw(wheels[1].matrix());
wheel_left.drawShadow(wheels[2].matrix());

'draw' in shadow mode?
01-19-2010 06:52 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Low fps when zoomed in.
2nd thing which was changed was shadow map split proportions adjusted, D.shadow_step
01-19-2010 06:54 PM
Find all posts by this user Quote this message in a reply
mih Offline
Member

Post: #12
RE: Low fps when zoomed in.
Oh didn't see that wink but It wasn't the problem, because It slow down even if only stage is rendered and no car is loaded yet. I will check those shadows tomorrow, anyway thanks for help wink
01-19-2010 07:15 PM
Find all posts by this user Quote this message in a reply
Post Reply