The USSFC is losing hope and losing the war, but the poorly equipped Legion are losing soldiers fast. This is the desperate last struggle of two clashing armies... This is Crimson Crow.

Report article RSS Feed Torqials #2 - Cheap Occlusion Culling

The second of maybe many Torque Tutorials - Torqials - to help Torque developers get on the right track. This deals with using a sort of hack to optimize heavy levels.

Posted by ninjadave on Apr 13th, 2010
Basic Mapping/Technical.

The second of maybe many Torque Tutorials - Torqials - to help Torque developers get on the right track. This deals with using a sort of hack to optimize heavy levels.

Torque's LOD system has been noted to be not so great. Portals are a nice touch, but always seem to work as well as you want them to. This is really more of a hack than a real method of doing things, but its effective and pretty simple.

Simply put, this is to use the terrain to cull out sections of the map, since the DIF interiors seem to load all objects regardless of how many walls.

This can only work if the level design allows it.

Let put this into an example:


The character, with his vision marked in red, views all these green objects (within the two red 'bars' anyways).


With a DIF interior (Dark green) and terrain (orange-ish) blocking the way, the possible amount of render-able objects is drastically reduced. If you tried to view as many objects at one time in the previous drawing, the game could seriously be impacted. With a terrain wall (The interior just to cover the look), the possible performance hit is drastically reduced.

Lets look at an example of how this can work in-game:


This is not a demanding scene (In fact its a test map!), but the technique has already been applied.
As of this angle, I cannot render both the tunnel area (right) and the roadway to the deeper part of the city (left). Since the view distance is set pretty high, if I was to stand in the deeper part of the tunnel and look towards the deeper part of the city, the system will render both parts of the map.

This can be a problem, so here is the quick fix:


Here is the same scene with DIF shapes only in outlines. If this was to be a little more effective, I could put the same trick in the first inaccessible building on the far left so even a part of the city won't be rendered from here.
The terrain is orange because the orange texture is a stretched 16x16 and does little to the performance.

In a nutshell, this is really a cheap hack. In the long run, it could do wonders for city maps like this, specifically to 'not' render the array of objects you will commonly find in some of our other maps:


Each red dot is an object, and all are being rendered. For Warlord_Evil's machine, this is little to nothing. For my poor old laptop, this is very costly.

Hope this helps!

Post comment Comments
Herr_Alien
Herr_Alien Apr 14 2010, 4:29am says:

Cool beans!
Basically allowing the mapper to decide what gets culled. Similar systems get used by quite a lot of games. Glad to see you guys are using it in yours!

+2 votes     reply to comment
ninjadave Author
ninjadave Apr 14 2010, 10:10am replied:

Only this is a sort of hack of a way to do it!
For right now though it works, so it will be used.

+1 vote   reply to comment
moci
moci Apr 14 2010, 5:30am says:

So you've decided to stick with torque?
Great, now focus and finish it ;).

+2 votes     reply to comment
ninjadave Author
ninjadave Apr 14 2010, 10:12am replied:

We essentially decided we'll get a first release with Torque. After that, if we feel the need to do a major revision, we can do so knowing all our previous work wasn't in vain.

+1 vote   reply to comment
azultain
azultain Apr 14 2010, 5:51am says:

i like this engine! can you add a video?

+1 vote     reply to comment
ninjadave Author
ninjadave Apr 14 2010, 10:15am replied:

Videos have been our to-do list for a very long time.
We've been hesitant because we're still lacking in a lot of animations, meaning some of that fancy in-game look is heavily offset by a static gun.

Its ok though, we do have something in the mix.

+1 vote   reply to comment
azultain
azultain Apr 15 2010, 6:28am says:

ok

+1 vote     reply to comment
assassini
assassini Jan 17 2011, 9:58am says:

Never knew this, cool.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Crimson Crow
Platform
Windows
Contact
Send Message
Official Page
Crimsoncrowgame.com
Release Date
TBD
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Crimson Crow
Crimson Crow Multiplayer Tactical Shooter
Related Engines
Torque 3D
Torque 3D Commercial Released Mar 29, 2009
Torque Game Engine
Torque Game Engine Commercial Released Oct 23, 2006
Torque Game Engine Advanced
Torque Game Engine Advanced Commercial Released Oct 31, 2007
Related Groups
Round House Studios
Round House Studios Developer with 2 members