View-frustum culling VS azimuth/elevation for objects inactivation/activation

Started by
5 comments, last by Julien Bayle 11 years, 9 months ago
[color=#3C3C3C][font=proxima-nova-1, proxima-nova-2, arial, sans-serif]

hi there,
I have been pointed to view-frustum culling as a nice strategy of objects activation/inactivation.
Indeed, each object outside the view-frustum can be inactivated, cooling the cpu ...

I worked a lot about that,more because it was unfamiliar to me than because it is really hard, and at 80% of the walk, I had doubts about the benefits of this technique considering:
- I have glowing objects which HAVE to ... glow everywhere around my cam even if not directly visible.
- I need a far far-clip (not 1000000, but I mean, more than the usual 200)
- I already calculating azimuth / elevation of my objects relatively to my cam for sound purposes
The first statement would drive me to consider a culling angle smaller than (360° - lens Angle) and even ... maybe, if an object would be behind, it would have to light the stuff in front of the cam...
How would you handle this ? Does my discourse make sense ?
The second one is also a cons arguments considering the view frustum culling technique.
I read a lot that far far-clip of course decrease the ratio benefits/cost.
The third could drive me to use those value to make almost the same thing than view frustum technique, considering all my objects that have to be culled are spherical (homogeneous dimension I mean)
Indeed, I need that for sounds, so EACH objects know about its azimuth/elevation relatively to the cam.
I can easily use them to inactive objects in a particular space quadrant of the cam local space for instance..
I'd like to have your opinions, maybe some leads around all of that.
Best regards,
Julien[/font]
julien
> my project
Advertisement
As far as the lights and view-frustum culls go, why not partition your worldspace so that you only cull objects that are both out of the frustumAND out of the camera's current space partition? That would still decrease the amount of work being done by the renderer, but allow non-visible nearby light sources to affect the visible scene.

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

Hi BCullis,
thanks a lot for your answer.
Yes I got the strategy you are talking about.
This test wouldn't be hardcore in my case, I already maintain a global matrice with all objects' coordinates and I'm calculating their position relatively to cam in order to make some sound processing according to azimuth/elevation/distance (a/e/d) ; so it means I'd add a test about a (big) box around my cam , everything outside AND not in my cam view could be cull !


About the "pure" view-frustum culling part (à la lighthouse3d.com), because I'm already calculating a/e/d for each object, wouldn't be smarter to use this calculation to cull objects and light instead of 6 planes determination, etc etc ?

with azimuth & elevation (and obviously, global properties near clip & far clip), I already know which object is in the frustum and outside.
right?
julien
> my project
View frustrum culling has big easy savings in *most* circumstances, however it sounds like your case may not be entirely typical. As far as glowing objects, agreed about a radius around the camera. Also if there will be glowing objects generally in the world, I would suggest using view frustrum culling with a slightly bigger angle than that visible so that glowing objects near the edge of the screen can still cast glow on walls etc. Alternately you could perhaps do two passes, one for glowing objects without view frustrum culling, and another with view frustrum culling for everything else?

If you have a large far-clip distance, you may need to look at LOD or imposters to deal with far away objects.

Another possibility is to use PVS (partially visible sets), e.g. if room A is connected to room B, which is then connected to room C at a right angle, a player in A cannot see any objects in C and vice versa.
Hi jefferytitan.
Many thanks for your answer which is very complete.

About culling.
Because of calculations constraints in my actual way, I'm already making azimuth/elevation/distance calculations for each object.
Can I use these values for culling ?
I mean, the usual/classic culling works with the 6 planes intersection detection and a list of object to activate/inactivate. Implementing that in my system would be a cost more, knowing I alread have all A/E/D for all objects.
What do you think about the fact I can inactivate/activate about A/E/D ?
It would also provide something precious, not all objects would be culled on the same way as you suggest... glowing lighten object could be cull only considering distance, and the others considering distance and position relative to cam.

I have to know how to glow like in this video:
http://www.youtube.com/watch?feature=player_embedded&v=o5z1wEj3tHk

it seems there is like a "matter in the space" (sorry for my newbie words)
this would forbid me to cull objects even if they are behind the cam, if I want to have that kind of glowing
no?


About LOD.
I read http://blog.wolfire.com/2010/10/Imposters about that
Thanks a lot to have pointed me there. It is an interesting technique, probably classic but totally new for me.
I'll dig that for my system, but my system is really much simpler than complex objects to visualize. Those objects would "only" be primitives like spheres, cubes etc.
Btw, I'll try to test it.

About PVS.
god.. 10h I'm here and you already taught me a lot :)
I got it too.
in my case, there wouldn't be a predefined path, which means the cam can go everywhere without predictable path.
It means it would be hard to use that BUT ... it gives me another idea related to the first answer I had here by BCullis.
I could use a global sphere around the cam (I already have it with my distances calculations)


(partial) Conclusion
if I can cull considering A/E/D, I guess i would already optimize A LOT !
I'll dig LOD for sure.
julien
> my project
Hey, it doesn't have to be a frustum. You could, for example, skip the far plane check, if that makes sense to you.

If you have few objects with many polygons each, then frustum culling (or view culling, if we want to stay geometry-agnostic) will likely have an enormous positive effect. But frustum culling particles would not, if you get my point. But if you change your frustum into a simpler geometry (you be the judge), then you could cull less expensively but leaving some objects that should've been culled unculled.

I apologize if it sounds like I'm assume you know nothing and can't think for yourself, but I just wanted to throw this out there in case you're too stuck in one way of thinking, or something.

Also as for some objects needing to be handled differently, consider a form of LOD, where you switch them for a "model" that only has what it needs when outside the frustum. If an object has a glowing billboard, consider making a second object/model that is switched to when outside the frustum, which may only contain things like glowing billboards or such. So each model has 2 models, one for inside, and one for outside the frustum. Most models's second incarnation would likely be empty and not really cost you anything, and the few that are not empty will have very low cost.

BTW, isn't this above beginner's section? Sounds more advanced than beginner to me.
I understood all the point :)
maybe it means I'm not that a beginnerblink.png

ok for the 2 model per object.
I also got it.

I also got the pure culling concept you developed.
I'm already making azimuth/elevation calculation for all objects because I need these values for sound panning purpose.
Does it make sense to cull or not according to these values instead of detecting intersections between objects & view planes ?
Indeed, I feel it like more efficient to use these already available values in my system...

My objects would/will be almost only primitives like spheres, glowing lines, very light grid of small spheres.. but glowing, lighting, flashing.


many thanks for your answer.


I'll implement that as soon as I'll be totally ok with that : http://www.gamedev.net/topic/626839-quaternion-rotation-vs-euler-angles-based-rotation/
This also shows you I'm a beginner wacko.png
julien
> my project

This topic is closed to new replies.

Advertisement