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 / 3D World optimization

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Jul 2017 23:35
I have a 3D level of say 20x20 tiles which consists of say 1000 models (Mostly planes) so i guess the polly count would be around 3-4 thousand.
Should i;
1. build the whole level
2. draw only the surrounding say 8x8 area

If your answer is 2 then do i destroy the models that go out of range and create new ones or recycle them somehow?

Thanks in advance for your help
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Jul 2017 02:43 Edited at: 15th Jul 2017 14:23
I would suggest you to recycle them as 20*20 shouldn't be too much for keeping them
I would hide them as soon as they leave your 8x8 area maybe using Manhattan distance to make the area round if you like...
If you don't need physic collision then you could just draw them ...you create only one object of every type, place one draw it ...place another draw it and so on ...so you would end up having the picture without the geometry behind it...
Also are you using InstanceObject( newobjID, objID ) already ?

Using AGKv2 Tier1
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Jul 2017 08:27
Thanks janbo. Seeing as it will be just about all planes i might try to recycle them.
I am using CloneObject(). Is InstanceObject() more efficient?
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Jul 2017 12:23 Edited at: 15th Jul 2017 12:28
Quote: "Is InstanceObject() more efficient?"

Yes thats the purpose of this command(perfect for trees,streets and buildings ), beware it doesn't support everything like a normal object does: animations I think...
And you need to keep the original object.
Instancing in OpenGL
Instancing AppGameKit doc

Using AGKv2 Tier1
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jul 2017 06:13
Ok thanks. That is very helpful

Login to post a reply

Server time is: 2024-11-24 11:58:53
Your offset time is: 2024-11-24 11:58:53