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 it possible to alter the draw distance of STATIC OBJECTS?

Author
Message
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 24th Jul 2010 16:27 Edited at: 24th Jul 2010 16:29
I have created a small test map in FPSC in the hope of using it in a 3PS DBP game.
With the camera quite low (too low!) I can see a useful portion of the level but when I move the camera up to the required height, the level is almost completely clipped.
I tried playing around with the values of SET STATIC UNIVERSE but every value I try results in invisible geometry.

I realise that the GameFX commands were written entirely for FPSC compatibility which is probably why I get the problems I do when I move the camera but if there is a way to fix it, I would very much appreciate the help.

Here you can see the two cases I am talking about. The only differences between the two images is the height of the camera.

Low camera:



Camera where I want it:


Thanks



HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Jul 2010 16:42
Almost looks like you have the camera view distance to short or too long, fov.

have to set or changed any of these.

SET CAMERA FOV
SET CAMERA RANGE
SET CAMERA VIEW

Dark Physics makes any hot drink go cold.
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 24th Jul 2010 17:02
Sadly, it's nothing as simple as the cameras FOV, range or view.
It is something to do with the way static portals are calculated.
In the first image you can just see the players head and as previously said; the only difference between the two images is the height of the camera, so you really should be able to see the ground beneath the players feet and the walls around him.



pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 24th Jul 2010 18:14
It thinks me to be SET_UNIVERSE_CULLING.
Only Lee knows the command.
Hearing it have a method to Lee.
Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 25th Jul 2010 07:57
If the object is too big, the program may be having difficulty culling it correctly. You could try set object radius ObjectNumber, -1. But if you do that, none of the object will be culled.

Ten minutes to Wapner.
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 25th Jul 2010 14:37
Thanks for the feedback. However, I doubt that would work because as you can see from the screenshot, the far wall is visible, it is the close part of the object that is hidden (perhaps I should point out that the whole world is a single object).

I would still like to test it because I don't like to rule out anything without trying it first. But to be able to test it I would need to know the object number of the world object. How do I find that?
There must be one because you can select to delete a static object with the DELETE STATIC OBJECT command and for this you need to provide the object number, but when you load a static object with LOAD STATIC OBJECT you do not provide an object number unlike when you LOAD OBJECT.

Any suggestions?



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2010 20:39
Which upgrade are you using?

I'm using U7.5 and can't even get the demo code in the Help file to work. The compiled exe's work fine if I supply the saved media from an earlier upgrade. The help file demo code checks to see whether the "universe.dbo" object exists - if it doesn't then the media are created and it seems to be the create light maps step that causes the crash.

Not sure at which upgrade things went wrong. Will report back after a bit more testing.
MASTER OF PUPPETS
22
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 1st Aug 2010 17:12
If it is a culling problem, try:

SET OBJECT FRAME 1,0,3
where "1" would be your level's object number,
and "3" will recalculate the object bounds.

If your level object ID# is say..."10",then...

set object frame 10,0,3

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 2nd Aug 2010 00:25
@MASTER OF PUPPETS: theres a command for that ==> "CALCULATE OBJECT BOUNDS ID#"
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 2nd Aug 2010 01:23
The problem isn't with culling, it is with portal occlusion (or at least my understanding of it!). However, I was only using STATIC OBJECTS because that is what the tutorial on this site suggested I do. Having realised that the map is saved as a standard DBO, I can get around the problems of portal occlusion by avoid static objects and treating the saved map as a standard object.

@GG I am using U7.3 which I intend to stick with since there seems to be problems with later revisions.



MASTER OF PUPPETS
22
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 3rd Aug 2010 11:16
@sepnon
i understand the "calculate object bounds" command BUT it doesn't work as well as "set object frame" at least in my experience with offset limb stuff.

...it wasn't the problem anyway so it doesn't matter...



metal is not music but a way of life...all hail to the reigning king METALLICA!!!

Login to post a reply

Server time is: 2026-07-25 15:28:39
Your offset time is: 2026-07-25 15:28:39