GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2011-Oct-18

Title: Technical speed question in 3d camera
Post by: mentalthink on 2011-Oct-18
Hi there,
I have a doubt whit the camera... if I draw the 3d camera and over I put in 2D mode a sprite overriding part of the camera , this can be usefull, for reduce the consume of graphical CPU?¿, or simply don´t make nothing, and all 3D scene it´s redreawing while the loop works.!!!

Thanks ,
Iván J.

PS : I think this it´s called "furstrum effect" or something ....  :blink:  :S
Title: Re: Technical speed question in 3d camera
Post by: AMateus on 2011-Oct-18
Hi,

Frustum Culling is used to remove the objects outside the View Frustum (the visible area). So, to answer your question, no, it don't make nothing. The whole 3D scene is rendered first, and then the 2D on top of it.

More Info: http://www.lighthouse3d.com/tutorials/view-frustum-culling/

António
Title: Re: Technical speed question in 3d camera
Post by: MrTAToad on 2011-Oct-18
What you should try and do if possible is to try and render object that are only within the camera range.  The only problem with this is deciding how to determine such a thing :)
Title: Re: Technical speed question in 3d camera
Post by: AMateus on 2011-Oct-18
Be my guest :P

http://www.flipcode.com/archives/Frustum_Culling.shtml
Title: Re: Technical speed question in 3d camera
Post by: AMateus on 2011-Oct-18
Anyway, from the manual:

"While in 3D mode, only objects or parts of objects that are between znear# and zfar# relative distance to the camera will be drawn."

We just need to know if the engine also culls objects *outside* the viewport ;)

António
Title: Re: Technical speed question in 3d camera
Post by: Kitty Hello on 2011-Oct-18
Yes it does. It has a bounding-shere-to-frustim culling algo implemented.
Title: Re: Technical speed question in 3d camera
Post by: AMateus on 2011-Oct-18
 :good:
Title: Re: Technical speed question in 3d camera
Post by: mentalthink on 2011-Oct-18
thanks in advance for the utils explanations...