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.

Dark GDK / to hide or not to hide, that is the question

Author
Message
Smoke sheath
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 15th Jul 2006 13:21
Hi folks,

In a recent post which Zeal kindly answered about a chunk system for representing terrain, he made the comment that the DarkSDK will auto-hide the chunks not in view. I have a little problem with this. Doing a simple test with a 1000 nested spheres and rotating the camera away whilst noting frame rate, any object that is hidden with dbHideObject is not attemped to be drawn, while unhidden objects outside the camera view still have to be tested to see if they fall within the viewing frustrum. This is right isn't it ? To keep your framerate low you *have* to hide unnecessary objects, you cant let the system do it for you can you ?

No Gir ! Thats Bad !
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 16th Jul 2006 00:15
"Hide"? That is correct, dark will auto 'hide' objects for you if they are outside the cameras view frustum (note I said OBJECTS, dark will NOT auto hide LIMBS, only OBJECTS). It hides objects pretty fast (by maintaining its own internal quadtree), so it works fine in most cases.

However, if you want to EXCLUDE a object (which will almost always give you a performance boost), you need to do that manually. That menas YOU need to determine if a object is in or out of view. You can do this a couple ways - the fastest but most complex would involve maintaing your own quadtree, the simplest would be using the dbObjectVisible() command (which is kinda slow).

All you need is zeal

Login to post a reply

Server time is: 2024-05-25 08:18:19
Your offset time is: 2024-05-25 08:18:19