[ODE] Trimesh Temporal Coherence Patches

Aras Pranckevicius nearaz at interamotion.com
Sun Dec 7 17:04:20 MST 2003


> Why did you need to disable temporal coherence for all of your
> meshes?  I guess the answer to that question would answer why
> other people might want to do the same.  This is just an optimisation
> 'hint' isn't it, not something which is behaviour-affecting?

Because, well, current temporal coherence cache implementation in TriMesh 
isn't very good :) There are several issues with it:

1. it never clears (if you don't do it by hand). Hence, each trimesh geom has 
a list of other geoms ever collided with it. And the list is only growing 
(especially if there are geoms created/destroyed dynamically - then even 
destroyed ones are still in a list).

2. upon every collision function call, it does a linear search over 
previously mentioned ever-collided geom list. That's not bad if the list is 
small, and there's big chance that temporal coherence info will actually be 
useful -- but there are lots of cases when this isn't true.


IMO, a better thing would be to have a global cache of colliding geom pairs. 
Eg. a LRU cache of constant size; and use some sort of hashing to quickly 
find the cached info.

Of course, the eternal problem - someone has to actually implement it =] But 
for now, just disabling coherence might be a temporaty solution for those who 
are scared by things I've written above.


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/



More information about the ODE mailing list