Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Mesh or Matrix ????

Author
Message
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 11th Nov 2008 15:25 Edited at: 11th Nov 2008 15:48
What is the distinction between a Mesh and a Matrix.

We can convert a Mesh into an Object void dbMakeObject ( int iObject, int iMesh, int iImage ), but we can not convert a Matrix into an Object or into a Mesh.

Is there something special about a Matrix.

The reason I ask is because of some tests on a project I am running.

With 32 high detail aircraft and a few small Matrix, on one of my machines, I see around 120 FPS .
When I introduce just on extra Matrix of 128x128 in size, the FPS collapses down to 12 FPS.

The CPU is a 754 pin Sempron with only 256K cache memory, and it looks like major parts of the code are no longer being cached when I add this little extra Matrix.

On my other machines with much larger cache memory, I don't see this collapse.

I also get the impression that Objects are automatically culled by the camera code when they are not in view, but the Matrix stay active always, no matter if the camera is looking at them or not.

Do we have any relevant information anywhere that may shed a bit more light on this problem??

EDIT: I have just tried by removing 31 of my high resolution aircraft out of the game, and still that one extra 128x128 Matrix with the 2 other small Matrix cause the game on this one machine to collapse.
Any one of the removed 31 aircraft have way more polygons than this extra small Matrix. Are Matrix really so bad to use???
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 18th Nov 2008 10:17
I use Matrix regularly, but I've never encountered any perfomance problems. Do you use the SyncOn option? Because I use full-textured Matrix of 400x400 but my FPS never collapse. Does your code perform too much operations on the same matrix maybe?

However I use DarkGDK.NET with VB.NET, I suppose you are using DarkGDK for C++, aren't you?

Fear leads to anger
Anger leads to hate
Hate leads to suffering
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 18th Nov 2008 11:04
Hi Yoda Master,

Thanks for your response.
Yes I am using Dark GDK .... but i program in "C" mode rather than "OOP" style as I believe that structured programing produces faster code.

I am starting to think that I jumped the gun about what the actual problem is.

Basically I am creating a world in 3 layers. My world happens to cover an area of 1000KM x 1000KM.
I am using 2 active cameras (camera 0 covers distance from 0.3 to 300 meters, and camera 1 covers from 300 to 300,000 meters) The images are merged to create the final view screen. This was necessary to resolve Z fighting problems.

It has an ocean bed covering that area and made up of a matrix of 128x128.
It has a transparent ocean of the same area, and also made up of a matrix of 128x128.

It has a land mass going from just below the ocean bed level, cutting through the ocean level and poking into the air. The land mass is also made of a matrix of 128x128. the land mass is skinned with a 4096x4096 pixel texture with a nice picture added into it to test for resolution capability of the land mass. Here is a screen shot.


By removing one of the meshes on my problem machine, the FPS jumps back to normal .... and as it was the machine with the smallest cache memory, I assumed it was a CPU cache problem.
After double checking, it is also the machine with an ATI X300se as the video card. All the other machines are running ATI HD2400 or better video cards. After having other people test the program with different generation CPU, even down to old slow Socket A athlons, the common thread for this FPS collapse is looking to be Video card related rather than CPU cache memory related.
When others are using things like ATI 9800 Pro, and that earlier generation of video cards, then the collapse in FPS happens.

It is looking more like a problem when meshes intersect (land mass intersecting through 2 other meshes) that may be the real problem with these earlier video cards.

I have confirmed, that there is no noticeable difference in performance between using *.X based models (mesh based) for the terrain etc, compared to using Matrix constructions.

I still want to do some more testing when I get the time.

The reason for this elaborate explanation post is that should people at a later date get back to this post, I hope they will not take my first post in this thread as being accurate. I think I did a bit too much assuming, and it looks like I was wrong.

Regards sydbod

Login to post a reply

Server time is: 2024-09-30 11:24:18
Your offset time is: 2024-09-30 11:24:18