Skip to content

Instantly share code, notes, and snippets.

@crazii
Created September 30, 2019 10:44
Show Gist options
  • Save crazii/46ad48707b391e50c075027c58409bc7 to your computer and use it in GitHub Desktop.
Save crazii/46ad48707b391e50c075027c58409bc7 to your computer and use it in GitHub Desktop.
pseudo code on Motion Matching optimization
c = computeCost(...);
if( c < cost )
{
//normal routine
}
//additional check if c is too large
//the cost function is continuative and if current cost is too large, we can assume the next few one cannot be small enough.
else if(c > cost*2)
{
i += n; //use n from 1 to 5 or any tunable number.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment