• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Julien Bayle

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

6 posts in this topic

[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...
[b]How would you handle this ? Does my discourse make sense ?[/b]
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][/color]
0

Share this post


Link to post
Share on other sites
As far as the lights and view-frustum culls go, why not partition your worldspace so that you only cull objects that are [b]both[/b] out of the frustum[b]AND[/b] 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.
1

Share this post


Link to post
Share on other sites
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?
0

Share this post


Link to post
Share on other sites
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.
2

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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. Edited by antiHUMANDesigns
1

Share this post


Link to post
Share on other sites
I understood all the point :)
maybe it means I'm not that a beginner[img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]

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 [img]http://public.gamedev.net//public/style_emoticons/default/wacko.png[/img]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0