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 / Dark Occlusion Problem

Author
Message
Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 29th Mar 2012 13:15
Hello,
i got a problem with Dark Occlusion. I want to setup a 99^99 object area, but it needs soooo long to setup with DC.



somebody knows whats wrong?
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Mar 2012 13:31
Are you using OC_BeginLoading() and OC_FinishLoading()?

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 29th Mar 2012 13:34 Edited at: 29th Mar 2012 13:49
Tried it, still slow

edit: Okay, that code above is slow because of the sync and print.

Without Sync, Print and Dark Occlusion it loads in about 10 Seconds.

With Dark Occlusion it needs a loooong time. Try it...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Mar 2012 14:58
Gunslinger... what is your...

OS
CPU
MOBO
RAM
HDD

makes and part numbers... use CPU-Z to get most of this information
is your hard drive sata I or sata II?
is your RAM DDR I or DDR II or even DDR III?

Might as well throw your GPU in there too

I can not check your code right now but read Max Ps message above regarding the begin and finish commands...

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 29th Mar 2012 15:15


SATA II i guess, not sure.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Mar 2012 15:18 Edited at: 29th Mar 2012 15:18
It loads in 1 min 50 sec here. Runs at 50-200 fps.
The loading is quite long, but Dark Occlusion wasn't really made to handle thousands of cubes, I might add an instance/clone object command in the future to speed these things up.
You can try to group the cubes together

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Mar 2012 15:34
Gunslinger, yeah I suppose your hardware is fine, and seeing as Max ran it for over a minute too, can someone put the full code together for me to test... I will copy the OC folder into a new project folder just its been a while as I have been doing web development for a few weeks now...

Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 29th Mar 2012 15:39
@MrValentine
You might have to change the open console, print console and find free object()


MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Mar 2012 16:26
I do have Matrix1Utils you know [it is your fault that I do have it lol]

yeah this is strangely slow

took about a minute to load all objects even for me...

thanks Max

and Gunslinger, why not try creating a .dbo cube and load that 99 times instead?

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 29th Mar 2012 18:16
Because the cubes are just a test.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Mar 2012 20:00
Still worth a go using premade objects and use instancing for benching the various methods... maybe even try memblocks...

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 29th Mar 2012 20:32 Edited at: 29th Mar 2012 20:34
Well, the problem is, i don't even know if i'll use normal objects.
I want to create a dungeon keeper like map, and at the moment i don't know wich technic to use for creating something like that.



The blocks are changing each time you destroy (or build) a block next to it.

At least, 99^99 is not even close to the final map size. I'm targeting around 125^125 * 3 as size (3 layers).
Somebody knows Dungeon Keeper (How the blocks are changing) and got an idea how to recreate this? As a Matrix? Vertex modification? I have no clue at the moment.

With 99^99 and with normal cubes i got around 15 fps, even with occlusion culling.
Seppuku Arts
Moderator
21
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 29th Mar 2012 22:00
What you could do is use segments light Neverwinter Nights does...or FPSC for that matter. It means you can reuse parts you've already created too.

Josh Mooney actually did a segment modelling tutorial a while back (on his old account):

http://forum.thegamecreators.com/?m=forum_view&t=103187&b=3

Then as these are separate objects, Dark Occlusion ought to work (if you feel you need it).

What you could also do is code a basic placement editor that uses a grid for placing each segment piece and have it write to a file that you could code a function in your main project file to read. If you keep the size of each segment consistent and have each space in the grid equal to that set size then your segments ought to be seamless.

That's if you felt like doing it that way.


Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 29th Mar 2012 23:03 Edited at: 29th Mar 2012 23:53
Here is a quick example I just knocked together of how you could look to handle such a large grid of objects.



It will obviously need some work. In this example you have a fixed number of real objects which are repositioned as required to look like a much larger grid. Because of how much the camera is zoomed out in this example you can see the blocks jump around but this is intentional so you can see it working.

Whilst this would need a bit of work to get it to match your needs entirely, this example runs at 1600 fps for me rather than the 15 fps you mentioned. Let me know if you need any more info.

Thanks.

[Edit]P.S. Move the mouse to move the camera about![/Edit]

Login to post a reply

Server time is: 2026-07-09 21:19:41
Your offset time is: 2026-07-09 21:19:41