BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Abnormal FPS drop

4 posters

Go down

Abnormal FPS drop Empty Abnormal FPS drop

Post by navya01 Sun May 01, 2022 2:37 am

Hi I am a BVE route developer.
There was a big problem, and that's it
I implemented TRACK FOLLOWING OBJECT, but after a certain amount of time, the frame drops to the point where it is impossible to play the game.
The frame rate goes down to 2FPS and eventually goes down to 1FPS, making it impossible to proceed with the game any more.
I would be grateful if anyone can tell me how to solve it

GAME VERSION 1.8.3.2
OS: WINDOWS 10 X64


This is the applied route phrase


,;TFO
.TfoXML TFO\1407.xmL
.TfoXML TFO\1083.xml
.TfoXML TFO\49.xml
.TfoXML TFO\515.xml

.TfoXML TFO\K664.xml
.TfoXML TFO\K134.xml

.TfoXML TFO\K1418.xml
.TfoXML TFO\K468.xml


.TfoXML TFO\K471.xml

.TfoXML TFO\K671.xml

.TfoXML TFO\K143.xml
.TfoXML TFO\K473.xml

.TfoXML TFO\s147.xml

.TfoXML TFO\K1937.xml
.TfoXML TFO\K1939.xml

.TfoXML TFO\K1117.xml
.TfoXML TFO\K1119.xml

17 total

screenshotS
Abnormal FPS drop Ca_00211
Abnormal 1FPS


ATTACH FILE

navya01

Posts : 10
Join date : 2022-05-01

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by Gothpaladinus Mon May 02, 2022 9:58 am

Are you using it with new OpenGL renderer turned on in the settings of the program?
Gothpaladinus
Gothpaladinus

Posts : 57
Join date : 2012-05-10
Age : 30
Location : Újpest, Budapest, Hungary

https://gothpaladinus.wixsite.com/gothpaladinusbve

Midnight Express Ginga81 and navya01 like this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Mon May 02, 2022 12:11 pm

Gothpaladinus wrote:Are you using it with new OpenGL renderer turned on in the settings of the program?


YES I AM A USE NEW RENDERER


Abnormal FPS drop Ca_00710

I recorded a play video



It starts at 2 FPS, and after 17 minutes, it becomes 1 FPS.

navya01

Posts : 10
Join date : 2022-05-01

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by Midnight Express Ginga81 Tue May 03, 2022 4:38 am

I thought it was because I had a lot of TFOs in same place.
Does the TFO have an interior?
If it is contains, fps will drop, so if you display it a lot at the same distance, it will drop.
If the fps doesn't drop by removing the TFO and using only the route, I think that is the cause.

Midnight Express Ginga81

Posts : 141
Join date : 2016-09-25

navya01 likes this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by leezer3 Tue May 03, 2022 10:41 am

I don't think anyone has tried with anywhere near that number of TFOs in-game yet Razz

I tend to agree that it's likely because you've got too many in the same place.
Really though, I'd need a copy of the route / TFOs to try and see exactly what's happening.

Unfortunately, a video doesn't really help other than showing it's broken- We need to find why it's broken!
Your FPS I note drops to about 7 at the 1 minute mark, but from the video, I can't see anything immediate that would cause that (Another TFO?)

You might want to consider removing any interiors from your TFOs, downsizing textures etc- Remember that they will be seen in passing only Smile

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus, Midnight Express Ginga81 and navya01 like this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Wed May 04, 2022 12:20 pm

leezer3 wrote:I don't think anyone has tried with anywhere near that number of TFOs in-game yet Razz

I tend to agree that it's likely because you've got too many in the same place.
Really though, I'd need a copy of the route / TFOs to try and see exactly what's happening.

Unfortunately, a video doesn't really help other than showing it's broken- We need to find why it's broken!
Your FPS I note drops to about 7 at the 1 minute mark, but from the video, I can't see anything immediate that would cause that (Another TFO?)

You might want to consider removing any interiors from your TFOs, downsizing textures etc- Remember that they will be seen in passing only Smile

ok i really want to solve this problem
 
I uploaded the file to my google drive
drive.google.com/drive/folders/
I uploaded the file to my google drive
Please do not post this route anywhere else without permission

Route Description
This route was implemented as OPENBVE as the actual route of the Republic of Korea, going up the Gyeongbu Line.
The total length is 443KM450 and it is an unfinished route.
TFO is applied to the section from 420KM000 to 443KM450

After you run the game you have to skip to the next station through Skip Train Station

You can skip to "수원" and drive about 44KM

In-game, after passing "안양" station, the TFO object will appear in earnest when the remaining distance reaches 10KM.
hope you test it well


Last edited by navya01 on Thu May 05, 2022 9:56 am; edited 2 times in total

navya01

Posts : 10
Join date : 2022-05-01

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Wed May 04, 2022 12:23 pm

Midnight Express Ginga81 wrote:I thought it was because I had a lot of TFOs in same place.
Does the TFO have an interior?
If it is contains, fps will drop, so if you display it a lot at the same distance, it will drop.
If the fps doesn't drop by removing the TFO and using only the route, I think that is the cause.

If I remove the tfo, I get a normal 60FPS.
But I definitely need TFO in my root
Almost all object trains for TFOs have interior interiors.
this also i need

navya01

Posts : 10
Join date : 2022-05-01

Midnight Express Ginga81 likes this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Wed May 04, 2022 1:07 pm

The previous video was not a front view, so I re-recorded it.
  check it out


navya01

Posts : 10
Join date : 2022-05-01

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by Midnight Express Ginga81 Wed May 04, 2022 2:06 pm

I got it!
I think your tests have identified the cause as a TFO.
I also use TFO to publish the route.
I recognize the importance of TFO.
This is my route data using by TFO.
https://youtu.be/Ona3KuO5Kyg

As leeser3 says, your information can't identify the cause(include 'both' videos), so we needed to know if it was a route or a TFO.
We have to know that this problem is happen by a lot of TFO at the same distance put or a lot of TFOs at difference distance, we have to know which happens.
So, need the route data.
If your data is before publish, leeser3 can't check.
At least, need the csv route data and TFO's XML files, maybe not need the object data.

Midnight Express Ginga81

Posts : 141
Join date : 2016-09-25

navya01 likes this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Wed May 04, 2022 2:33 pm

Midnight Express Ginga81 wrote:I got it!
I think your tests have identified the cause as a TFO.
I also use TFO to publish the route.
I recognize the importance of TFO.
This is my route data using by TFO.


As leeser3 says, your information can't identify the cause(include 'both' videos), so we needed to know if it was a route or a TFO.
We have to know that this problem is happen by a lot of TFO at the same distance put or a lot of TFOs at difference distance, we have to know which happens.
So, need the route data.
If your data is before publish, leeser3 can't check.
At least, need the csv route data and TFO's XML files, maybe not need the object data.


ok i really want to solve this problem
 
I uploaded the file to my google drive


*link removed*

Please do not post this route anywhere else without permission

Route Description
This route was implemented as OPENBVE as the actual route of the Republic of Korea, going up the Gyeongbu Line.
The total length is 443KM450 and it is an unfinished route.
TFO is applied to the section from 420KM000 to 443KM450

After you run the game you have to skip to the next station through Skip Train Station

You can skip to "수원" and drive about 44KM

In-game, after passing "안양" station, the TFO object will appear in earnest when the remaining distance reaches 10KM.
hope you test it well

navya01

Posts : 10
Join date : 2022-05-01

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by leezer3 Wed May 04, 2022 4:06 pm

So, I've got the files (you can remove if you wish- I've deleted the link from your post)

Some first observations:
Your primary problem is definitely with your TFOs. They're *completely* oversive, and would benefit from some massive optimisation I'm afraid.

Textures should always conform to the power of 2 rule. If this is not followed, they will be resized in-memory to the next conformant size up. For example, this is a particularly oversize file:
106편성(20220319)\car\carLED\carLed.png
This is sized 1562 x 682 pixels. In memory, it'll be 2048 x 1024 pixels, or in graphics memory terms 8.1mb (2048 px wide * 4 bytes per pixel * 1024 px high)
You can resize this to 512 x 256 pixels with no real loss of quality, especially as you're going to be seeing it briefly in passing, and the memory used drops to 520kb (512 px wide * 4 bytes per pixel * 256 px high), which is ~5% of the size.

There are many more files with exactly the same sorts of issues.


Keeping in the same train, it loads 168 distinct textures, taking up approximately 900mb of texture memory.
A texture change is the single most costly operation OpenGL can perform, and the size of some of these magnifies the problem exponentially.


I don't know exactly how much GPU memory you've got available, but with an integrated GPU / slower disk and a couple of these trains in view, it'll be an absolute mess.
Turning on Load In Advance may help things a little if you've got a GPU with 8gb or so memory.

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus, Midnight Express Ginga81 and navya01 like this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by leezer3 Wed May 04, 2022 4:23 pm

Further observations, related to the internals of the TFO objects:
You're unnecessarily using Transparent in places. This will slow things down- It should only be used when the face actually contains transparencies.

Most of the objects seem to exploit an old bug, by specifiying a daytime and a nighttime texture.
This is marginally slower (due to the two textures, even though they're the same) and causes lighting effects to be disabled for the polygon, and should no longer be used. (for that matter only works if Hacks are enabled now)
If you want to replicate this effect, please set the face to emit pure white instead, e.g.

Code:

CreateMeshBuilder
AddVertex, -0.775, 2.8, -0.15
AddVertex, -0.775, 3.32, -0.15
AddVertex, -0.625, 3.32, -0.15
AddVertex, -0.625, 2.8, -0.15
AddFace2, 3,2,1,0
SetEmissiveColor,255,255,255
GenerateNormals
LoadTexture, hanger_l.bmp
SetTextureCoordinates, 0, 1, 1
SetTextureCoordinates, 1, 1, 0
SetTextureCoordinates, 2, 0, 0
SetTextureCoordinates, 3, 0, 1
SetDecalTransparentColor, 0, 0, 255

If possible, squash all uses of the same texture into a single MeshBuilder statement, as opposed to using one per face.
This is especially important when using transparencies, as it'll help the renderer in the sorting process. [n.b. If you do this, please check for unexpected effects on transparencies]

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus, Midnight Express Ginga81 and navya01 like this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by leezer3 Wed May 04, 2022 4:31 pm

More on the objects:
Delete *all* the grab handles from the TFO interiors- You'll never see these from a passing train.
There are I think ~60 or so per coach. Each one of these must be depth sorted and renderered (unfortunately, this is one of the limitations of the engine- we don't discard non-visible transparent stuff), and this will be causing a massive amount of texture switching.

Consider texture atlasing.
It should be possible to combine many of your smaller textures into larger ones, and use texture co-ordinates appropriately. Removing texture swapping will really help, as once a texture is loaded, it's 'free'

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus, Midnight Express Ginga81 and navya01 like this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by navya01 Sun May 08, 2022 8:20 am

leezer3 wrote:More on the objects:
Delete *all* the grab handles from the TFO interiors- You'll never see these from a passing train.
There are I think ~60 or so per coach. Each one of these must be depth sorted and renderered (unfortunately, this is one of the limitations of the engine- we don't discard non-visible transparent stuff), and this will be causing a massive amount of texture switching.

Consider texture atlasing.
It should be possible to combine many of your smaller textures into larger ones, and use texture co-ordinates appropriately. Removing texture swapping will really help, as once a texture is loaded, it's 'free'

Thanks for testing.
I've tried all of the methods you suggested, and the results were effective.
but other things i couldn't try
I'm just a route maker, not a train maker
The train is the model made by the train maker applied to the tfo object as it is.
So I couldn't try anything related to the object.

Separately, I discovered a new phenomenon.
I immediately found out that the tfo object also affects the overall path length.
As a result of deleting the previous section from the original route and reducing the length to play a new game, the fps increased significantly.
Also, it was found that the loading time of the object also affects the game time of the main program. If the tfo syntax is applied outside the in-game time range, it is ignored and changed to a different time, and the tfo object appears.

I hope you can check what I found and help improve the tfo function

navya01

Posts : 10
Join date : 2022-05-01

Gothpaladinus likes this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by leezer3 Sun May 08, 2022 9:00 am

Will take a look at path lengths, but I don't think that will be a quick fix.
Routes of this length are much less common, much less those using TFOs.

Unfortunately, again due to engine design & file format limitations, we (essentially- I'm simplifiying here) keep the entire route in-memory, whereas other games use a tile based system, where tiles can be loaded / unloaded at will.

TFO appearing if outside the game time range must be a bug, and should be fixable (or at least generate a suitable error message)

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gothpaladinus likes this post

Back to top Go down

Abnormal FPS drop Empty Re: Abnormal FPS drop

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum