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 Object Occlusion Testing

Author
Message
puzzler2018
User Banned
Posted: 6th Jan 2019 12:29 Edited at: 6th Jan 2019 12:33
Im pretty sure im close, could someone test it out for me




Press Cursors and W and S to move camera object around

R to Rotate with the results

Space to see the object without cull

Change the constants size, near, far values for the effect
puzzler2018
User Banned
Posted: 6th Jan 2019 12:46
I have added a camera positioning on to the Object - press C to turn on and off

Also a gap constant - to spread out the environment a bit



puzzler2018
User Banned
Posted: 6th Jan 2019 13:02
I have now added a boundary code so when your outside the whole object then it will increase its occulusions

and if inside the object it decreases the occlusions



Have a great day...

Come back soon
puzzler2018
User Banned
Posted: 6th Jan 2019 14:10
This one works to occlude surrounding meshes



puzzler2018
User Banned
Posted: 6th Jan 2019 18:38 Edited at: 6th Jan 2019 18:39
A nice interesting video

This is all it takes



Notice the original plane it starts on - just a CreateObjectPlane(200,200) I assume

Enjoy
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Jan 2019 19:09
They don't mind throwing the polys around do they?
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 7th Jan 2019 02:10
Paul,

When did AppGameKit get occlusion culling? We know it has fulstrum culling, to not draw objects which aren't on screen, but occlusion culling (assuming we are using the correct name) stops rendering of objects behind other objects......I promise you this has never worked that I've found.

For example, you should be able to create a flat, solid cube bigger than the vriwport, drop it right in front of the camera, and nothing behind it is rendered......but pretty sure that's not the case as I've done that exact scenario many times and it didn't stop rendering.

I don't mean to be rude, but are you sure it's meant to be included?
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Jan 2019 15:28
Ah I got the terms mixed up, I meant AppGameKit has frustum culling. It doesn't hide objects that are behind other objects
puzzler2018
User Banned
Posted: 7th Jan 2019 15:48
Thanks Paul... Is it something likely in the future of agk at all.

Thanks for getting back to us
puzzler2018
User Banned
Posted: 8th Jan 2019 20:07
In the mean time, will have to try and develop our own. This is my version of depth



Depth 0 been an object closest to the camera, all other object have to identify the coords back to 2D and if any other objects are inside each others bounding square then make those invisible

Here is just a start in the making.

< and >

Will get this sorted by Friday evening - too tired to think at the moment
puzzler2018
User Banned
Posted: 8th Jan 2019 20:31
Like this

X direction to start with



Press < or >

More to come soon
puzzler2018
User Banned
Posted: 8th Jan 2019 21:09
If anyone interested - here you go



Cursors to move

Enjoy

Catch up soon
puzzler2018
User Banned
Posted: 9th Jan 2019 12:35
Tonight I will make it loop through all the other objects in the depth buffer array too and check other objects against each.

This will probably make the FPS grind to a halt, but if we also check if it any are off screen X<0 or X>screenwidth or Y<0 or Y>screenheight - then don't check those or if any objects that are already invisible then don't re-check either.

This method will work better with bigger meshes in the camera view, I feel.

But will try it on individual objects first that last example was creating 100 boxes and seemed quite well - we never know, the FPS may be alright on much more objects.

Looking forward to get this tested.
Rick Nasher
2
Years of Service
Recently Online
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 10th Jan 2019 23:53
Cool stuff puzzler2018. I've seen that video before, pretty astounding reality like level building.

Very curious to see if this would up the FPS. It should theoretically right?
Especially using the above mentioned methods.


When done in C++ and build in as a command by AppGameKit for Tier1, perhaps as something like SetObjectOcclusion(integer) to enable it globally and/or per object selectively with SetObjectOcclusion(object, integer), then it could potentially really speed-up things on a large scale and make it possible to create even more complex kick-*ass scenes or even lift AppGameKit to new heights.

Really hope Paul gives it a shot.
puzzler2018
User Banned
Posted: 22nd Jan 2019 00:32 Edited at: 22nd Jan 2019 00:36
thanks rick, everyone... the roadmap needs to be adhered to, TGC could we add this to your roadmap..

puzzler2018
User Banned
Posted: 22nd Jan 2019 00:37

I understand that things take time in everything - Costs of time to develop especially for a company trying to develop something more than what we can create with

Where and how do we Donate to make this come forth...

Ill be happy to donate to the expertise TGC to produce this effect - its important to 3D

puzzler2018
User Banned
Posted: 22nd Jan 2019 00:54
We need a petition - who is all for this???

Ill donate for the amount answers posted agreeing to this feature -

Ending Tuesday 29th Jan

Rick Nasher
2
Years of Service
Recently Online
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 22nd Jan 2019 11:13
That's a good idea.


I've ran the test and on my ancient dev laptop(2007) I've seen FPS go from ~70'S up to ~130's, so definitely worth it .

Then given this was done in Tier1 it's pretty amazing!
I think it would be pretty strange if this wouldn't up AGK's FPS massively when build-in coded in C++.


So here's my +1
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 22nd Jan 2019 12:46
I really hope you get this working, but I can't even begin to envisage how you would make it performance worthy in T1. Occlusion of a cube at set angles is one thing......Occlusion on a complex mesh is another entirely, and I assume.e works through depth buffers and raycasts.

I for one would rather see improvements to the rendering pipeline to be capable of handling more objects (anything about 200-300 Right now is a serious struggle), but that said DBPRO had dark occlusion......perhaps it could be adapted to fit I to AGK.

It's also super important to remember that occlusion culling is useless on objects with transparency.
puzzler2018
User Banned
Posted: 24th Jan 2019 19:51
Thanks Santman/Rick

Its proving FPS is quite challenging on individual objects to be fruitile with occlusion culling - 100 individual objects checking occlusion against each other is a non starter for Tier 1 - but we all thought that would be the case.

Memblock meshes.

- for large scale memblock meshes with tuns of different objects on is no point either - cause the time it takes to rebuild a mesh with the occlusion will be also time consuming

- for smaller meshes - like minecraft (for example) with a 16x16x16 chunk - this on the other hand could work, cause be quick to update the mesh and surrounding chunks can be occluded (in camera viewport)

Ill try and apply occlusion to Minecraft when time comes but on the chunk meshes rather than individual objects.

But for other big world games will have to really think about best practice to do it in Tier 1 - without the CPU getting hot and bothered.



blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Jan 2019 21:00
Quote: "I for one would rather see improvements to the rendering pipeline to be capable of handling more objects (anything about 200-300 Right now is a serious struggle), "

Do you mean with physics? What sort of polycount

Login to post a reply

Server time is: 2019-08-24 18:19:42
Your offset time is: 2019-08-24 18:19:42