Game Development Community

dev|Pro Game Development Curriculum

Working on an updated Occlusion Blocker for T3D

by Joshua Halls (Xerves) · 10/08/2009 (5:56 pm) · 4 comments

There was an Occlusion Blocker resource for TGEA 1.8 that was orignally posted by Caylo. You can find that here.

www.garagegames.com/community/blogs/view/16623

This started as a good place to start and was being used for awhile with one of our dungeon zones (the dungeon construction kit) to block out all of those dts from being rendered if they were behind a wall. Worked rather well and makes it run rather quickly if placed in the right places. Also, added a bit to the LevelInfo to disable the checks as well since they do actually reduce framerate slightly if the occlusion objects are not being used because evey object in the scene has to be checked for some kind of collision.

Well, recently I decided to work on it some more and try to make it a bit more officient and useful. Added some of the coloring bits from the zone code so it renders red while selected, or in the console you can turn them all on so you can see them all. Also, one of the big things was putting in an occlusion state for the sceneObjects being passed through. Instead of checking every frame if an object was occluded, by default (and changeable by the client) it will check every 7 frames and use the state it finds for the rest of the time. Since T3D has quite a few rendering passes with Shadows it only grabs the first state and will use that to detect if the object should be occluded (thus it also eats the shadows as well). Also, a few other things were added like a separate object instead of using the Vehicle Blockers, flags for objects to tell them to skip the occlusion check (if you place them in an object you will need to do that), checks to see if it is an object we want to occlude before the collision checks (makes it faster), and finally added it into the guis so it can be placed into the scene easily.

After carefully placing the objects in walls or behind some walls gained a rather significant increase in Advanced Lighting with the Sun Shadows on and in Basic and AL/Sun Shadows off a bit of a gain as well.

Here is a screenshot with all of the blockers on. They are inside some geometry so they stick out just slightly making them easy enough to see.

www.therepopulation.com/images/occblocker1.jpg
Will probably resource this at some point depending on what occlusion changes happen as I believe 1.1 is going to have some more occlusion code added in.

About the author

Part of the team that works on The Repopulation, a SciFi based MMO using a heavily modified version of the Torque MMO Kit - T3D. I also take care of the T3D version of the Torque MMO Kit.


#1
10/09/2009 (4:53 am)
Nice work and could definately be of benefit to people :)
#2
10/09/2009 (10:27 am)
Yes, I would like to have a look at it.
#3
10/10/2009 (2:39 am)
if you have any vids of this, would be nice to see it in action when you get it all worked out. looks great, trying to imagine how placement would work in a game as complex as Repopulation where you can go off in any direction without boundries. i can kind of understand whats going on in the octagon room. is the area a cube like the T3D zone? keep up the great work.
#4
03/02/2010 (9:30 pm)
I am in great need of this right away! I've recently switched from TGEA to T3D and we are now having a lot of frame rate issues. We've split our levels into 7 pieces each and would like to further increase our frame rates with use of these occlusion blockers. We had the code working in TGEA and were using those 'vehicle objects' for the occlusion blockers, but your system sounds like it has a lot of really nice improvements that I would love to get my hands on.... Where's the code???