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

[Build Actor] Animation Rounding Issues #3850

Open
2 tasks done
Grateful-Forest opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks done

[Build Actor] Animation Rounding Issues #3850

Grateful-Forest opened this issue Jan 23, 2025 · 0 comments
Labels

Comments

@Grateful-Forest
Copy link

Acknowledgements

  • I have searched for duplicate or closed bug reports
  • I understand that I am supposed to provide my own legitimately obtained copy of the game

Describe the Bug

There are rounding errors for the locations of bones in animations, despite not appearing in Blender or a GLB viewer.

In this example, the animation pose had the meshes sit flush against each other, starting at negative offsets like - 15, - 10, -5, and using + 5 increments on the Z axis to achieve a completely flat re-alignment, but, in OpenGOAL it is off:

Image

It would be good if this file could be changed so the bone locations are not stored as integers:

constexpr float kTransScale = 4.f / 4096.f;
s16 data1[3];
for (int i = 0; i < 3; i++) {
data1[i] = s16(trans[i] / kTransScale);
}
u32 data2[1];
memcpy(data2, data1, 4);
frame->data32.push_back(data2[0]);
frame->data16.push_back(data1[2]);

The degree to which they are off seems like it's within the range of 4096.XX

How To Reproduce

Offset bones in an animation (this was a skeleton without collision meshes) so they begin at position - 5 on the Z, then animate to sit at + 5 on the Z, the animation won't exactly align to that location. This was dealing with location changes, without scale or rotation.

Does this problem occur on original hardware or PCSX2?

Yes, it's unique to OpenGOAL

Expected Behavior

Animations should match the GLB file locations

Environment Information

OpenGOAL v0.2.21

Blender 4.3.2

Game Version

NTSC 1.0 (black label)

Have you set the game to something other than 60fps?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant