Programming > OpenGL
Performance issue with high quality terrain chuncks
ErChick3n:
I'm making a game that needs a always loaded pretty big map with a very high heightmap resolution(at the moment 8192*8192), to improve performance i divided the map in 64 chuncks and in the game i render only the ones the camera is ooking at. The improvement in performance is huge and clear but when i try to pass over the chuncks of the 4th,5th,6th or 7th column my fps drop consistently. So I tried to understand the problem by eliminating the first 2 and the last row of the map and the "critical point moved to the 7th coloumn only". At first I thought it was due to my ram filling up and the coloumns after a certain one were going to the commited part on the hdd. But after cleaning up ram usage by other applications and running the game again the issue persisted even though my ram wasn't completely exploited. Is there something i'm missing? Why is this happening?
Cornix:
Probably because of the current constellation of mars and venus. Try after the next moon period and see if things have improved.
But seriously, there could be any number of reasons. We dont know what your code looks like and it is probably too much code for us to analyse. The only things we can tell you is very vague guesses. My personal guess would be that your culling does not work correctly.
I'd say try to strip your code down to its bare basics. Start with a very simple example and make it grow step by step. Keep profiling the performance at each step to see if something went wrong.
ErChick3n:
Leaving aside the fact that at first i thought u were talking about eclipse versions...
For culling u only mean rendering the front and not the back of a face? because I think there's no problem with that part of code.
Is it POSSIBLE what I said in the first post: that the problem is only a matter of reading speed, because part of the program memory is stored into the hard drive and not on the ram?
Cornix:
No, with culling I mean the way you only draw those chunks which are supposed to be visible to the camera. You are culling certain meshes on the client side before issueing draw commands to the server side. The easiest guess is to say your culling algorithm is wrong. You are not correctly calculating which chunks to draw and which chunks to omitt.
ErChick3n:
Ok, I modified the game so now when it renders the scene it prints the coords of all the rendered chuncks and it seems to be allright; only the chuncks that are visible to the camera are rendered as desired. So culling cannot be the problem.
So again, my question is: IS IT POSSIBLE that some chunck data is not stored in the ram but on the hdd?
Navigation
[0] Message Index
[#] Next page
Go to full version