Game Development Community

Need help and advices about special LOD collision system

by Cedrik zamo · in Torque 3D Professional · 12/13/2011 (2:58 am) · 1 replies

Hi,

I'm building a spacesim with small and big ships. Some are 10m length (starfighters) and other are hundreds metters length (starcruisers).
So, when two big ships collide they only need simple collision, but when a small ship collide with a big one, the big ship collision must be more detailled.

With Unity I made a collision LOD system that work fine. For various reasons I don't use Unity anymore, but I still need this system for my game.

It work like this :

Each spaceship as one or more collision LOD.
Smallest ones got only one LOD with only a few collision primitives (like a simple box or so).

Biggest ones got 2 or more LOD.
The highest LODs are big boxes or primitives with large size (said 100m or more) and are used for big objects collisions.
Big ships also have more detailled collision primitves for collisions with small ship (around 10m size).

Only one LOD should be used when two ships collide : the highest LOD of the ship that got the lowest LOD count.

In exemple :
We have ship A with LOD1, LOD2 and LOD3.
We also have ship B with LOD1 and LOD2.
LOD1 is the most detailled and LOD3 the less detailled.

So, when those two ships collide we use LOD2 (the highest LOD of the ship that got the lowest LOD count).

For this to work I must disable collision between all primitives except LOD2 of both spaceships :

Disable Collision A LOD1 vs B LOD1
Disable Collision A LOD1 vs B LOD2
Disable Collision A LOD2 vs B LOD1
Disable Collision A LOD3 vs B LOD1
Disable Collision A LOD3 vs B LOD2

_____ALOD1 ALOD2 ALOD3
BLOD1 ____ _____ _____
BLOD2 ____ XXXXX _____

How can I do this correctly with Torque ?
(I did it successfuly with Unity and Unity use PhysX too)

#1
12/13/2011 (10:37 am)
I suppose I must ask more precise questions.
So
1) I read some thread about max collision primitives count, but they are not clear. Is it possible to have more information about how to increase the limit without crashing the engine ? I read it should be changed in many places.
2) How to use collision layers in Torque ? Are they supported ?
3) Is there a way to disable collision between two or more primitives ?
4) Where should I search to support more primitives and collision layers in the 3D file system (max2dts or other) ?
5) Is there limitations about physx and primitve I should be aware of for this idea ?