Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

wrapping sphere around frustum

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 newtechnology   Members   

1772
Like
0Likes
Like

Posted 06 May 2014 - 11:36 AM

I was reading about frustum culling optimizations at flipcode and in that article, they wrap sphere around frustum and do a very cheap sphere-sphere intersection tests and if object is outside sphere, quicky reject or do again a frustum-box intersection to determine if object is really inside or outside frustum (for accuracy). Now I have some questions. This might be a stupid question but will i need to build sphere around frustum every frame (i think yes)? when i will build sphere around frustum, will it be in view space? (I think yes because frustum planes are in view planes.)

#2 C0lumbo   Members   

4366
Like
1Likes
Like

Posted 06 May 2014 - 11:43 AM

Yes, you will need to rebuild it every frame (or at least every time that the camera changes, which is going to be most frames probably).

 

Given that the bounding sphere is going to be used for quick trivial rejection, I'd recommend taking the once-per-frame cost of transforming the sphere from view space to world space, as that'll be more convenient (i.e. faster) to use when you do your many hundreds of trivial rejection tests.



#3 Burnt_Fyr   Members   

1664
Like
0Likes
Like

Posted 26 May 2014 - 02:25 PM

If your sphere is built in camera space, you will not need to rebuild it, just multiply by the inverse view matrix(the camer'a world transform) to get it into world space.



#4 Aardvajk   Members   

13095
Like
1Likes
Like

Posted 04 June 2014 - 02:42 AM

Given that for the purposes of intersection detection, a sphere is a centre point and a radius, the only sense in which you are "rebuilding" it is that you are moving the centre point each time. A sphere is four numbers, one of which would remain constant (the radius) in this particular application.

 

What exactly do you mean by "rebuilding" it?


Edited by Aardvajk, 04 June 2014 - 02:43 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.