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.

DarkBASIC Professional Discussion / Is DarkOcclusion still around?

Author
Message
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 02:43
Searching for it, I only found a demo DLL. Do I get some performance increase when I use it?
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th Oct 2016 03:38 Edited at: 24th Oct 2016 03:43
Quote: "Do I get some performance increase when I use it?"


I never used the Occlusion Plugin. In theory it is supposed to be faster. But, due to the need to render twice I really don't notice any advantage. Unless there's an error in the way this demo is calculating frames per second. Attached is a DirectX C++ example. No Dark Basic and no Dark Game Development Kit.

Attachments

Login to view attachments
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 06:07 Edited at: 24th Oct 2016 06:15
Thanks, but does DBP already has Occlusion Culling of some sort?

Is it part of some extras where I can download? I would like to try it with the scene I'm currently building.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 24th Oct 2016 06:15
@WickedX
I use Dark Occlusion ( DLL version ) and looks that its work fine.
What trouble do you have with it?
Quote: "due to the need to render twice"
- what do you mean?
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 08:45 Edited at: 24th Oct 2016 08:45
@Kuper

Hi, would you mind pointing out where I can get the download link or is it still for sale? Browsing to the actual links I get an archived page or broken links now.

https://www.thegamecreators.com/?m=view_product&id=2311

I just wish there's a clearer note or post on what can now be acquired freely and what is still up for purchase.

Thanks
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th Oct 2016 16:46
Quote: "- what do you mean?"


Actually, there are 3 render passes. DirectX occlusion culling works by first rendering every objects reduced bounding mesh, bounding box, or bounding sphere to a render target surface. Then rendered again and their occlusion queries are received. Finally the object meshes that had pixels drawn in the second render are rendered to the actual scene.
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 21:46 Edited at: 24th Oct 2016 23:17
So I'm guessing this is a discontinued product and the author is now inactive?
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 24th Oct 2016 23:11 Edited at: 24th Oct 2016 23:13
@WickedX

I got a chance to take a look at the code you provided again and noticed it is another alternative method using DX9 API which probably the same method with dark occlusion.

Do you think this is something that can be easily ported to DBP?
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 25th Oct 2016 13:28 Edited at: 25th Oct 2016 13:42
Ok so I tested the DarkOcclusion demo (old TGC site link) and it really does not make any difference especially if you're using a modern graphics card which is ready to handle significant amount of polygons. Yes, it's true that DarkOcclusion reduces the poly count which I included below (statistics) but apparently it does sort of make multiple render pass to achieve the effect which is time and fps consuming.

Here's my version of the demo which I tried to line up 500 objects (mesh and cube alternate) so the first one in front will occlude all objects from the scene, but I got the same frame rate or higher removing the D.O. functions.

Apparently, frame rate is more of a concern than poly count.



Benchmark (All objects totally occluded by 1 box object in front (object visible = 1), sync rate is 60)
With D.O: 4k polys/tris, 45~48 fps (somehow it counts my 4k poly model even though it's already occluded, maybe static?)
W/O D.O: 1M+ polys/tris, 52~55 fps


Maybe I should test more or it does work on older video cards but with my setup there's no difference at all in fact it runs a bit faster without it.


Quote: "Actually, there are 3 render passes. DirectX occlusion culling works by first rendering every objects reduced bounding mesh, bounding box, or bounding sphere to a render target surface. Then rendered again and their occlusion queries are received. Finally the object meshes that had pixels drawn in the second render are rendered to the actual scene."


Confirmed and thanks WickedX for the heads up, and at least I got to see and tested it for myself.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 25th Oct 2016 14:41
first of all DBPro already have culling system.So you cant see fps change because DBPro already culls
all object which out of camera view.
Dark Occlusion is useful for hiding objects which are covered by another one. This DBPro cant do
try this:
https://forum.thegamecreators.com/apollo/download/2208784
@WickedX
You can set render size half size for additional speed. I use DarkOcclusion (dll version ) for main render and also for directional light.
IMHO It is very good resolve
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 25th Oct 2016 15:55 Edited at: 25th Oct 2016 16:09
That's exactly why I have revised the provided demo for that, check it out and place the camera in front of the first object and make it occlude all that is behind it.

Maybe you can check the code I have posted and could point out what is wrong with it? It does register that it reduces the rendered polygon (same as the demo you posted) but the framerate is the same or lower than without D.O. Maybe adding those textures is not added for consideration?

I'm also using the DLL (demo) version.

P.S: I will try applying it with textures next time or even try to simulate the same scene and use those assets, maybe there is a big difference but I don't know..
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Oct 2016 16:28
It's hard to judge performance comparisons at sync rate 60, set this to 0 to let it run uncapped and see if there is a difference


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th Oct 2016 19:51
Attached is the occlusion culling demo, posted above with source and PDF document explaining the process. After reading the Dark Occlusion command set, I can only conclude it works exactly the same way. There has to be some benefit to occlusion culling, why else would Microsoft include functions for it in DirectX. I guess, I will have to write my own occlusion plugin to be sure.

Attachments

Login to view attachments
punkyb
7
Years of Service
User Offline
Joined: 8th Sep 2016
Playing: PC and Android Games
Posted: 25th Oct 2016 22:38
Thanks WickedX. Yes I'm sure there are other alternative occlusion culling solutions to use, which you have pointed out there with DX9 API.

For now I'm ok with my scene but I will try to rebuild that demo when I get a chance.

Login to post a reply

Server time is: 2024-03-29 14:30:39
Your offset time is: 2024-03-29 14:30:39