https://github.com/mrpowergamerbr/objloadertests
🖼️ Don't let the name fool you, this is actually a (very crappy) .obj model loader and a (very crappy) The Sims 1 .skn/.cmx/.cfp model loader and animation renderer!
https://github.com/mrpowergamerbr/objloadertests
kotlin lwjgl obj-format obj-loader opengl the-sims the-sims-1
Last synced: 4 months ago
JSON representation
🖼️ Don't let the name fool you, this is actually a (very crappy) .obj model loader and a (very crappy) The Sims 1 .skn/.cmx/.cfp model loader and animation renderer!
- Host: GitHub
- URL: https://github.com/mrpowergamerbr/objloadertests
- Owner: MrPowerGamerBR
- Created: 2025-02-16T04:27:38.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-17T02:17:14.000Z (12 months ago)
- Last Synced: 2025-10-07T13:44:16.698Z (4 months ago)
- Topics: kotlin, lwjgl, obj-format, obj-loader, opengl, the-sims, the-sims-1
- Language: Kotlin
- Homepage:
- Size: 2.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🖼️ ObjLoaderTests 🖼️
It all started as a simple `.obj` model loader... but I craved knowledge, I wanted to know how you can create and apply animations to a skeletal model.
So that's why I also coded a The Sims 1 `.skn`/`.cmx`/`.cfp` loader too! Yeah, The Sims 1 skeletons are very simple (no weight mapping, only one bone per vertex), but now I do have the knowledge of how this works, so in the future I can improve it further.
The animation code is borked beyond salvation tho, I need to swap the arm bones because, if I don't do that, the arms are wonky because their animations are swapped (?).
Also I don't apply the base skeleton rotation, not sure if it is needed but, when applying it, the animation becomes all borked... but I do translate based on the base skeletion + animation transform.
## Screenshots
## Resources
* https://web.archive.org/web/20050501050322/http://simtech.sourceforge.net/tech/cfp.html
* https://github.com/mixiate/ts1-blender-io/
By the way, I think that Milkshape 3D's is incorrectly previewing The Sims 1' skeleton. Inverting the quaterions makes the default The Sims 1 skeleton be in a "default" pose (like the Sim standing up, without any weird rotations on the back) and the toe bones aren't below the feet like Milkshape 3D's is.