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 content 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 on - 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!

Comments
Herr_Alien
Herr_Alien

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!

Reply Good karma Bad karma+2 votes
ninjadave Author
ninjadave

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

Reply Good karma+1 vote
moci
moci

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

Reply Good karma Bad karma+2 votes
ninjadave Author
ninjadave

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.

Reply Good karma+1 vote
azultain
azultain

i like this engine! can you add a video?

Reply Good karma Bad karma+1 vote
ninjadave Author
ninjadave

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.

Reply Good karma+1 vote
azultain
azultain

ok

Reply Good karma Bad karma+1 vote
fláráðr_ljós
fláráðr_ljós

Never knew this, cool.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Icon
Crimson Crow
Platforms
Windows
Contact
Send Message
Release date
Game watch
Start tracking
Tutorial
Browse
Tutorials
Share
Related Games
Crimson Crow
Crimson Crow Tactical Shooter
Related Engines
Chrome Engine 4
Chrome Engine 4 Commercial
Torque 3D
Torque 3D MIT
Torque Game Engine
Torque Game Engine Commercial
Related Groups
Garage Games
Garage Games Developer & Publisher