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 / C++/DGK: Strange Behavior with dbHideObject with a imported Object

Author
Message
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 6th Feb 2009 20:26
System Specs: XP Windows Home, Nivdia6800 series 6 512 meg video card. 2 Megs system ram. VC++ 2008 Express.

Just wonder if anybody else has ran across this. I am working on creating a "List" of objects that are suppose to stay Hidden. These objects are copied for the other objects in the game.

With generic primitives ones made from dbMakeBox, hide just fine. When I started to replace these with loaded file "using .x format objects" objects with textures already on them, the new ones don't want to "Hide" with the dbHideObject. The object that was copied (dbInstanceObject) from the original is be able to Hide.

The pic is just a quick example.

The only work around I can think of at this time is to place orginal objects outside the camera view and turn the fog on them. Any idea on what effect will that have on performance?

Any other ideas that I might be missing.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 6th Feb 2009 20:55
Never mind, I figured out what I was doing wrong. What was happening is that I was using the wrong reference in my code. When I started the work around some pieces where not moving or not moving. Sorry folks I had been staring at the issue for a few hours. Well It's time for lunch. Catch you later.

Moderates if you wish to delete this topic - be my guest. - Thanks

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2009 21:12
Can I suggest that you try excluding the objects rather than hiding them? You may find that your performance is better when you are rendering more objects.

The functions to try are dbExcludeObjectOn() and dbExcludeObjectOff()

Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 6th Feb 2009 21:26 Edited at: 6th Feb 2009 21:38
What does those function do? I did not see them in the doc file. Just did a search found a few DBasic messages. Looks like it shuts the model down, dose not draw it and the system pretty much ignores the model. Sounds perfect for what I am trying to do. Thanks.

There are many answers but just one question" ~ Jerilith the Mad
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Feb 2009 22:08
so HideObject still redraws the object and eats up performance?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2009 23:02
Not really, no.

What I believe happens (and I could certainly be wrong about this) is that excluding the object removes the object from the standard list of objects into another 'excluded' list - this simply means that instead of scanning over the object list, checking and then skipping the hidden objects during rendering, that the object is not even seen by the rendering process.

There may be other rendering related steps that are skipped too, for example there's no real need to update the object & limb matrix's when you aren't going to render the object (I don't know whether that's true or false, it's just a 'for instance' example).

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Feb 2009 09:22
can someone maybe do a small demo using Hide and Exclude, so maybe we can see if there is any real speed improvement? I suppose that the main benefit will be when using 1000s of objects

Login to post a reply

Server time is: 2024-11-25 13:19:41
Your offset time is: 2024-11-25 13:19:41