Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acl::calculate_compression_error is triggering asserts #510

Open
teddemunnik opened this issue Jan 28, 2025 · 0 comments
Open

acl::calculate_compression_error is triggering asserts #510

teddemunnik opened this issue Jan 28, 2025 · 0 comments

Comments

@teddemunnik
Copy link

There seems to be a logical error in acl::calculate_compression_error;

The entire function only works on scalar tracks:

  if (raw_tracks.get_track_type() == track_type8::qvvf)
  	return invalid_track_error();	// Only supports scalar tracks

However it is calling functions on the tracks that are only supported for transform tracks:

  const compressed_tracks& tracks = *context.get_compressed_tracks();
  if (tracks.has_database() || tracks.has_stripped_keyframes())
  	args.rounding_policy = sample_rounding_policy::none;
  else
  	args.rounding_policy = sample_rounding_policy::nearest;

Both has_database and has_stripped_keyframes are only valid for transform tracks:

bool get_has_database() const { ACL_ASSERT(track_type == track_type8::qvvf, "Transform tracks only"); return (misc_packed & (1 << 8)) != 0; }
bool get_has_stripped_keyframes() const { ACL_ASSERT(track_type == track_type8::qvvf, "Transform tracks only"); return (misc_packed & (1 << 10)) != 0; }

Encountered this issue in unreal engine 5.5 (using ACL 2.10) when cooking an animation from a debug build (with asserts). Reporting upstream here as it looks to be a general issue in ACL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant