Commit graph

516 commits

Author SHA1 Message Date
Ammar Askar
becb9815e3 Fix inverse kinematics for legs.
Some animations change the root_trans and root_rot bones and these
were causing the IK feet goals to get out-of-sync with the model.
Adding a RigTransform is the recommended way to handle this in the
unity's animation rigging package.
2023-08-21 18:37:45 -04:00
Nahuel Rocchetti
b531dad192 Comment VMTest 2023-08-21 19:06:44 -03:00
Nahuel Rocchetti
1092566421 Fix sleep, implement test 2023-08-21 19:03:56 -03:00
Nahuel Rocchetti
7eada145c8 Implement simantics primitive registry 2023-08-21 18:23:20 -03:00
Nahuel Rocchetti
da18fc787f Update VMExpressionPrimitive.cs 2023-08-21 18:16:10 -03:00
Nahuel Rocchetti
c1d99422e9 Implement data sources 2023-08-21 17:56:58 -03:00
Nahuel Rocchetti
4daccae598 Document data sources 2023-08-21 17:39:38 -03:00
Ammar Askar
5e71afef64 Add gizmos around IK target positions to make animation debugging easier 2023-08-21 15:43:06 -04:00
Nahuel Rocchetti
f72520d0d2 Refactor VM exit codes, implement VM logic 2023-08-21 16:11:44 -03:00
Nahuel Rocchetti
6009d9f121 Start implementing primitives and entities 2023-08-21 13:41:18 -03:00
Nahuel Rocchetti
2bb732b4d6 Basic BHAV reading code 2023-08-21 12:59:44 -03:00
Ammar Askar
862dfe0f14 Add temporary hack for IK animations with hands by mirroring them 2023-08-21 00:39:35 -04:00
Ammar Askar
c237c9c291 Store data from cBoneDataExtension blocks 2023-08-20 23:55:10 -04:00
Ammar Askar
2b1c37b91f Use 2-bone ik constraints for all IKs 2023-08-20 23:37:17 -04:00
Ammar Askar
60578789af Load skeleton first for sims, fix IK chains for arms 2023-08-20 22:41:32 -04:00
Ammar Askar
73e06f09cc Start loading IK chains from animations into sim 2023-08-20 19:04:44 -04:00
Ammar Askar
c4bc83fe97 Add test scene for sims animation rigging 2023-08-20 13:09:25 -04:00
Ammar Askar
69922d956c Store Inverse-Kinematics chain data from animations 2023-08-19 22:58:58 -04:00
Ammar Askar
cd2f968ed5 Add animation rigging package for inverse kinematics 2023-08-19 10:46:36 -04:00
Ammar Askar
979da1a147 Add ability to render multiple scenegraph resources to a single ScenegraphComponent 2023-08-19 10:44:52 -04:00
Ammar Askar
4685e52efd Add a SimCharacterComponent class and handle 1F animation channels 2023-08-19 02:37:50 -04:00
Ammar Askar
9dd80da480 Fix accidentally un-commited files in refactor 2023-08-18 19:12:35 -04:00
Ammar Askar
462e7fdd16 Move ScenegraphComponent to components folder 2023-08-18 19:02:39 -04:00
Ammar Askar
060dc588c8 Change byte array to ReadOnlyList in texture asset class 2023-08-18 01:05:44 -04:00
Ammar Askar
0f88ae3bd9 Fix bug where BGR textures were loaded as RGB 2023-08-18 01:05:11 -04:00
Ammar Askar
da3165d602 Add work-in-progress cLightRefNode rendering 2023-08-17 17:55:11 -04:00
Ammar Askar
77c490f858 Render sub-components of cShapeRef in scenegraph 2023-08-17 17:41:48 -04:00
Ammar Askar
dfdb07f4b9 Fix tangent values for animations 2023-08-17 16:42:00 -04:00
Nahuel Rocchetti
caf0e655fb
Merge pull request #48 from riperiperi/perf/reia
Improve performance of REIA decoding
2023-08-16 18:07:13 -03:00
riperiperi
d1fc4bfc79 Improve performance of REIA decoding
The REIA decoder was performing a lot of crops and copies using Texture2D containers, which was slowing down decoding significantly.

The enumerator now remembers frame data and modifies it in place when new frames are requested. It only needs a working array to decode block data into before it's added to the result.

The mode where it creates a new texture for each frame still works. Here's how decoding the whole startup animation into textures compares:

before:
REIA (800x600 153 frames) took 4.657419s

after:
REIA (800x600 153 frames) took 0.8785773s

I'm not sure how much time creating each of the textures takes, it's probably faster when just setting data to the same one repeatedly.
2023-08-16 20:08:35 +01:00
Ammar Askar
99e43f21ac Fix bug with rendering some scenegraph components 2023-08-16 00:18:39 -04:00
Ammar Askar
12c875deba Start animating blend/morph shapes 2023-08-16 00:14:35 -04:00
Ammar Askar
6df4f8b9dc Fix fixed point deserialization in animations 2023-08-15 22:19:45 -04:00
Ammar Askar
3662299bd4 Add recliner chair for animation testing 2023-08-15 14:04:45 -04:00
Ammar Askar
52950a16ca Disable discontinuous tangent values in animations 2023-08-15 13:46:44 -04:00
Ammar Askar
4113d74795 Change how in/out tangents are handled 2023-08-15 13:38:44 -04:00
Ammar Askar
8c6b8e109f Temporarily working animations! No tangents yet 2023-08-15 11:55:33 -04:00
Ammar Askar
db88f1f4f5 Fix animation rotation channels 2023-08-15 11:46:22 -04:00
Ammar Askar
130dd93a86 Add work in progress animation to scenegraph component 2023-08-15 01:15:21 -04:00
Ammar Askar
f7808e12ad Convert keyframe data to floats 2023-08-14 23:42:12 -04:00
Ammar Askar
d26e9e8f7a Start testing anim files 2023-08-14 13:10:37 -04:00
Ammar Askar
a27a8deced Document more of the animation format 2023-08-14 12:34:01 -04:00
Ammar Askar
956c3da7a6 Fix bug where some bones weren't being assigned 2023-08-14 00:56:25 -04:00
Ammar Askar
818f239526 Add Animation component to scenegraphs with bones/morphs 2023-08-13 22:58:37 -04:00
Ammar Askar
131023aeab Bind bones and bind poses to models 2023-08-13 22:26:27 -04:00
Ammar Askar
31faedf256 Refactor scenegraph rendering code into its own MonoBehaviour 2023-08-13 21:52:44 -04:00
Ammar Askar
ce70486e7f Hold scenegraph bone ids and bind poses for use after rendering scenegraph 2023-08-13 21:32:35 -04:00
Ammar Askar
f421d19e62 Refactor ScenegraphModelAsset for bones work 2023-08-13 21:06:18 -04:00
Ammar Askar
a217247086 Start loading bones from gmdc 2023-08-13 20:40:30 -04:00
Ammar Askar
838b3f2e95 Fix another bug with DXT3 conversion.
Maybe we should switch to a library at this point.
2023-08-13 15:13:31 -04:00