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.

AppGameKit Classic Chat / GameGuru Billboards.

Author
Message
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 5th Apr 2016 15:08
I hopeless idea to get a gameguru level running on a mobile , but im getting there , Does anyone got some ideas to improve even more ?, any suggestions ?

The automated billboards creater, can make billboard from nearly all kind of objects ( different angles in the same billboard texture ), in the video i enable "debugbillboard" so you can see how they are created , in the other gg levels i have disabled it again so it just generate them on the fly.

Notice: video 1:20 sec. in the profile gg level , the polygon count goes from 7.400.000 polygons to 1.700.000 when combining lod0 and billboards at a distance. it also doubles the FPS.

Im using a slow mac mini 1.4 ghz with a slow graphics card ( the lowest mac spec possible). think ts just like 2 times faster then a ipad , but great for making mobile apps when testing speed

In this video the billboards do NOT use any fading to smootly switch from object to billboard, it will just setvisible object ,0 and setvisible billboard ,1 . This is so you can see the billboards have the same rotation as the object and are never rotated.

This also show how you can just copy a gameguru level ( unzip the level.fpm files , convert the vegmask.dds to png ) and copy everything to the media/gameguru folder , and this program will display the gg level directly in agk, no conversion needed.





Do you have any idea on how to REALLY speed this up even more ?
best regards Preben Eriksen,
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Apr 2016 17:25
Download link??
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Apr 2016 17:01
It looks like you are being limited by draw calls, even though the polygon count is manageable, drawing 1000 objects with 4 polygons each is worse than drawing one object with 4000 polygons. The first step would be to reduce the number of textures, if you combine all the billboard textures onto a single large texture (no bigger than 2048x2048) and use that for all billboards then it might improve performance as each draw call won't have to switch textures. Beyond that you'd have to combine the objects themselves into a single object (or as few as possible).
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 9th Apr 2016 12:04

Thanks Paul,

The gameguru level is now put into 128x128 sections and in each section a billboard is created. I selected the section way so culling would still work.

But i do not see any fps improvement:
Paul , could you explain how the batching works in AGK.

1. Are objects created using AddObjectMeshFromMemblock( tmpobj, newmem ) , treated as a single object , or are each mesh treated as an object ?
2. Are AppGameKit already doing batching, mesh using the same texture,shader ?
3. Any other explanation why reducing the draw calls like this do not have any impact ?

I would expect that this would give a huge fps improvement , going from 1124 billboard objects to 45 billboard objects. but ?
Screenshot red is section billboards.

Missing the rotation code ( vertex ), anyone got some ? , not really needed as section billboards are way out , but anyway.
section billboard are created by using the 128x128 grid x,z and offsetting the objects from this point.

best regards Preben Eriksen,

Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Apr 2016 02:21
The screenshots show about 1.5 million polygons being rendered in both scenes, which is quite a lot, and probably the major component of performance in that test.

Meshes are culled independently, and currently there is no batching done by AGK.
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 12th Apr 2016 15:31
Thanks paul, that explain everything, no matter what you do with AddObjectMeshFromMemblock it will never reduce draw calls.

The 1.5 mil. poly is mainly the terrain, its a profile level , and it have a total around 10mil. poly ( only displaying lod0 ) so its good to optimise on.

I converted my code to bake the section billboards into one mesh , and that gave me a 10% fps improvement. ( by limiting the draw calls ).

Also fixed the vertex rotation so no code sample needed

best regards Preben Eriksen,

Login to post a reply

Server time is: 2024-11-25 07:58:43
Your offset time is: 2024-11-25 07:58:43