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 / Has anybody written any form of Frustum culling in AGK?

Author
Message
Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 29th Dec 2014 06:31
Merry Christmas to all,

has anybody written any Frustum culling in AppGameKit (v1 or v2) Tier1? Would it be possible? I have been trying to get my head around it and while conceptually I think I have it, the math is well beyond me at this stage. I am finding lots of tutorials on how to do in C/C++ and openGL.

While my forum searches have not shown anything written in AppGameKit (some DB pro stuff, but I did not find it much help), I was wondering if somebody has already done this before in AppGameKit, but not posted it? I am looking for some pointers so I can learn how to do this, or if it is possible?

I just want to cull the objects on the terrain, not the terrain it'self.

A couple of the links I am using (have helped a lot)
http://www.lighthouse3d.com/tutorials/view-frustum-culling/geometric-approach-extracting-the-planes/
as well as Phaelax's excellent maths lib http://forum.thegamecreators.com/?m=forum_view&t=192569&b=6


cheers

It's late, I'm tired, out of coffee and now I'm wet.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 29th Dec 2014 13:33 Edited at: 29th Dec 2014 13:34
Hi ,

Frustum culling is if you exclude an object outside of the near/far clipping plane and the view cone,
so everything inside of the view cone and ONLY the view cone is rendered (an object hiden behind another object is not considered)
I think you dont't mean frustum-culling and it's already done by agk.

There is Back/Front face culling wich only determine if a face is directed to your camera and is drawn, also done by agk.

I think you want Occlusion culling wich is not done by agk and can be archived in many ways Wikipedia

If you know all that, then it's for others

Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 30th Dec 2014 01:08
Thanks Janbo,

I was not to clear on whether AppGameKit did Frustum culling already (and looking at low level OpenGL examples confused me), but I guess it should have been obvious to me with the availability of the command "GetObjectInScreen" which does the frustum test (not that is says that).

Now to go an look at Occlusion Culling methods....

It's late, I'm tired, out of coffee and now I'm wet.
Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 30th Dec 2014 01:40
well as I noticed in the forum and my own testing GetObjectInScreen() is broken, I wonder how quick a forward looking raycast would be..time to test.

It's late, I'm tired, out of coffee and now I'm wet.

Login to post a reply

Server time is: 2024-05-17 11:43:33
Your offset time is: 2024-05-17 11:43:33