Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Occlusion query #264824
05/08/09 12:27
05/08/09 12:27
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
I have a project with a huge cube, each side if it consists of panels.

Some of them are on the other side of the cube, so they are not visible( they are rendered and eat FPS, but not visible for the camera).

First, i thought about a trace from every panel to camera to know, if it is visible... But it isnt good idea, as i'd need as many traces, as many panels i have.

Second idea - it to calculate camera's angle... With the help of it, i increase FPS from 80 to 120-140, that depends of the visible blocks (as other sides of the cube are invisible)...

So, the question: is there a build-in(or is it possible) function for culling models, that invisble for camera?

Something like this: http://www.codesampler.com/dx9src/dx9src_7.htm#dx9_occlusion_query


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Occlusion query [Re: VeT] #264830
05/08/09 12:55
05/08/09 12:55
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
the only culling i see is engine doing is the basic view cull that removes backfacing polygons... i wont ave much to say on this topic tho )

Re: Occlusion query [Re: VeT] #264831
05/08/09 12:58
05/08/09 12:58
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The only built in occlusion function is the BSP tree. DirectX Queries, as in the sample code, require the object to be drawn and thus can't be used for occlusion tests.

In your case the obvious criterion is not the occlusion, but the orientation of the panels. Surfaces facing away from the camera are not drawn by DirectX. Make sure that all panel surfaces face outwards.

Re: Occlusion query [Re: darkinferno] #264833
05/08/09 13:01
05/08/09 13:01
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
I also met with frustrum colling, but that was bad experience: i have had a pyramide of boxes with shadows. So, if moved camera close to the pyramide and watch on the shadows (pyramide wasn at my back), some shadows disappeared, because entities, that droped shadow were culled eek smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Occlusion query [Re: jcl] #264834
05/08/09 13:06
05/08/09 13:06
Joined: May 2008
Posts: 150
Switzerland
Hitsch Offline
Member
Hitsch  Offline
Member

Joined: May 2008
Posts: 150
Switzerland
In your case you could only have one trace per side of the cube, right?
Since all the panels of that side would be visible or invisible anyway...
That's only six traces and wouldn't take up that much calculation time and always deactivate at least 3 sides of the cube.

Just a thought.

Re: Occlusion query [Re: VeT] #264836
05/08/09 13:06
05/08/09 13:06
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
jcl, but i'd needed to run through all panels each frame(compare their orientation)... I'm afraid, it would be little bit slow.

I solved this, just checking position of camera (looking like its the fastest method), and hiding some panels, if camera.pan<a1 and camera.pan>a2
I was just curious if there are(or, probably, "would be") some kinds of culling in nearest time? I think that it could be useful in large numbers of another cases, where camera position would'nt be enough.


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Occlusion query [Re: VeT] #264837
05/08/09 13:07
05/08/09 13:07
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Hitsch, yes, its a good idea, to trace from the middle of the every side smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Occlusion query [Re: VeT] #264838
05/08/09 13:08
05/08/09 13:08
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
hm.... this is a mix of 2 methods: to check the rotation of middle cell laugh


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Occlusion query [Re: VeT] #264839
05/08/09 13:10
05/08/09 13:10
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
Cude is a single model?


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: Occlusion query [Re: XD1v0] #264840
05/08/09 13:12
05/08/09 13:12
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
no, it consists of a "cells"
BTW, number of "cells" can be different


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Page 1 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1