nasty fps slowdown in Basic Lighting
by Ivan Mandzhukov · in Torque 3D Professional · 10/10/2009 (9:11 am) · 9 replies
Guys,
I've ported my game from TGEA 1.7.1. to T3D 1.0 and it seems to have a difference of 200fps between the two engines.
It's very unpleasant and unsatisfactory. I thought that T3D BL should be almost the same as TGEA in fps. Any ideas how to increase the fps? I use post FX in BL because I need some effects such as glow.
At this time I just cannot continue making my game , because in an empty scene with several items and just the world (13k polys) I get 150 to 200 fps. Any thoughts?
the system on which all this is tested:
RADEON X1950XTX,
Core Duo 2.4Ghz
on RADEON 3870 , Core2 Quad 2.66 Ghz the same scene pruduces about 320 fps.
I've ported my game from TGEA 1.7.1. to T3D 1.0 and it seems to have a difference of 200fps between the two engines.
It's very unpleasant and unsatisfactory. I thought that T3D BL should be almost the same as TGEA in fps. Any ideas how to increase the fps? I use post FX in BL because I need some effects such as glow.
At this time I just cannot continue making my game , because in an empty scene with several items and just the world (13k polys) I get 150 to 200 fps. Any thoughts?
the system on which all this is tested:
RADEON X1950XTX,
Core Duo 2.4Ghz
on RADEON 3870 , Core2 Quad 2.66 Ghz the same scene pruduces about 320 fps.
#2
In fact I found that the pixelSpecular of my items drop about 100 fps.
10/10/2009 (4:54 pm)
No , i just have s 13k custom mesh that use Visible mesh for collision , my player , and several items in scene.In fact I found that the pixelSpecular of my items drop about 100 fps.
#3
So, if you start out with 150fps in an empty scene and that stays pretty stable, then that's all one really needs.
Per-pixel stuff in particular will take a big initial hit but then be rather stable as the amount of work for these won't really change much with scene complexity (well, depending on how things are dumped to the screen).
10/10/2009 (5:06 pm)
Losing FPS in the high counts (150+) shouldn't really matter much and not really be paid that much attention to. What matters is how things scale when the scene gets populated.So, if you start out with 150fps in an empty scene and that stays pretty stable, then that's all one really needs.
Per-pixel stuff in particular will take a big initial hit but then be rather stable as the amount of work for these won't really change much with scene complexity (well, depending on how things are dumped to the screen).
#4
I am using my own 3th person camera system.
It is processed as a secondary GameConnection control object.
It uses a lot new input connections.
When i used:
I got a lot of those "CLIENT OUT OF SYNC".
It means the client and the server are out of sync.
It is normal to get one-two of those,but not all the time.
I tested the stock camera and all is synced well.
OK,it is not well enough because i see a lot of texel jittering in 3th person,but i think it is normal since interpolatetick() is responsible for interpolation.
This linear interpolation is good for first person games,but not in 3th person games.
Excuse me,but i can demonstrate a lot of games that interpolate well on 60 fps,but Torque jitters at 200 fps.
Now firstly i should repair the synchronization between client and the server.
Any thoughts ?
10/11/2009 (2:38 pm)
No No No.I am using my own 3th person camera system.
It is processed as a secondary GameConnection control object.
It uses a lot new input connections.
When i used:
void SuperCamera::readPacketData(GameConnection *connection, BitStream *bstream) {
Con::warnf("CLIENT OUT OF SYNC");
Parent::readPacketData(connection, bstream);
...
}I got a lot of those "CLIENT OUT OF SYNC".
It means the client and the server are out of sync.
It is normal to get one-two of those,but not all the time.
I tested the stock camera and all is synced well.
OK,it is not well enough because i see a lot of texel jittering in 3th person,but i think it is normal since interpolatetick() is responsible for interpolation.
This linear interpolation is good for first person games,but not in 3th person games.
Excuse me,but i can demonstrate a lot of games that interpolate well on 60 fps,but Torque jitters at 200 fps.
Now firstly i should repair the synchronization between client and the server.
Any thoughts ?
#5
10/11/2009 (2:46 pm)
Your camera simulation code is non-deterministic. This means it is acting differently on the clients than it is on the server, which is causing the server to writePacketData instead of just packUpdate. You should check your updateTick() method, and potentially your pack/unpack methods.
#6
I am sure all is good there.
The camera actually does call packUpdate(),but i see
CLIENT OUT OF SYNC
SERVER packUpdate
SERVER packUpdate
and it is all the time.
10/11/2009 (2:55 pm)
In pack/unpack i only transmit/receive the position(pos) and the rotation(mRot) of the camera.I am sure all is good there.
The camera actually does call packUpdate(),but i see
CLIENT OUT OF SYNC
SERVER packUpdate
SERVER packUpdate
and it is all the time.
#7
10/11/2009 (3:15 pm)
Yes position is the wrong thing to send, depending on the application. Something like this you want to send velocity, and calculate position, I think.
#8
Control objects are some sort of "important objects" for each client.
Therefore they use another delivery mechanism.
So it is normal to see "CLIENT OUT OF SYNC" all the time.
It was good to be found - so there is nothing wrong in the camera code.
Here is the real problem.
When i tweaked a whole day with the default camera,i saw the problem was there too.
After tested it on several PCs, the problem turned out to be the vertical synchronization.
On one PC it jitters after each 30 seconds,on other each 5 seconds,but it jitters on all with all cameras.
I see a few visual artefacts in the skybox too - random black flickering.
I understand when i use 60hz refresh rate and i have 50fps there is a problem,but i have 480fps vsycned at 60hz and it jitters a lot.
I tested with some comersial games,made with another engines (just to be sure my ati setting/drivers are good).
They all perpormed very smooth with the same settings - resolution,refresh rate,vsync.
10/12/2009 (9:59 am)
Here is the deal:Control objects are some sort of "important objects" for each client.
Therefore they use another delivery mechanism.
So it is normal to see "CLIENT OUT OF SYNC" all the time.
It was good to be found - so there is nothing wrong in the camera code.
Here is the real problem.
When i tweaked a whole day with the default camera,i saw the problem was there too.
After tested it on several PCs, the problem turned out to be the vertical synchronization.
On one PC it jitters after each 30 seconds,on other each 5 seconds,but it jitters on all with all cameras.
I see a few visual artefacts in the skybox too - random black flickering.
I understand when i use 60hz refresh rate and i have 50fps there is a problem,but i have 480fps vsycned at 60hz and it jitters a lot.
I tested with some comersial games,made with another engines (just to be sure my ati setting/drivers are good).
They all perpormed very smooth with the same settings - resolution,refresh rate,vsync.
#9
I didn't find the problem.
The artefacts are due to the video memory.
The camera code now also works flawlessly with no jittering.
I also found that if i run T3D at fullscreen and directly adjust the prefs,vsync works good.
If i start windowed,but maximize the window runtime with the mouse,vsync breaks and i get a message "sceneObject getbinrange() - out of range".
But it was not the problem. I think the input was wrong.
The problem is solved,this thread can be closed.
10/12/2009 (2:33 pm)
After a lot of testing and tweaking(into client files),vsync worked flawlessly.I didn't find the problem.
The artefacts are due to the video memory.
The camera code now also works flawlessly with no jittering.
I also found that if i run T3D at fullscreen and directly adjust the prefs,vsync works good.
If i start windowed,but maximize the window runtime with the mouse,vsync breaks and i get a message "sceneObject getbinrange() - out of range".
But it was not the problem. I think the input was wrong.
The problem is solved,this thread can be closed.
Torque 3D Owner Joshua Halls (Xerves)