Repository navigation
Add empty lowered sprint animations for the MILSO and Tachi - #196
sunzenshen wants to merge 5 commits into
Conversation
One Blender file holds a scene per viewmodel project (rig, preview mesh, camera, one Action with a slot per sequence), replacing the per-team .blend files. The two Tachi QCs share one viewmodel.qci and the arm preview images move to arms/textures for every weapon. The export now guards the shipped clips (round-off rewrites keep the old bytes; a real change fails unless --edit-shipped), checks the range-of-motion limits from rom_spec.json before writing, and warns when an authored slot moves faster than the shipped clips. A sidebar panel (viewmodel_tools.py) runs these from Blender. The README describes the workflow. The shipped Tachi SMDs and models are unchanged.
viewmodels.blend now holds one scene per gun: jinrai_tachi keeps its rig and action, and the NSF preview mesh moves onto that rig in its own collection, so one key moves both teams' arms. The NSF project has no scene: it compiles from its shipped SMDs on disk. merge_teams.py did the merge and stays for a gun added later with two scenes. The export takes the Jinrai project only and refuses an NSF one. --edit-shipped copies a changed shipped SMD into the NSF project, so both teams play the edited clip. rom_spec.json has one section per gun. The Viewmodel panel shows the team on view and flips it with a Team button. The preview images keep their paths relative to the .blend. Export jinrai_tachi: rc 0, no clamp, no SMD changed. Both Tachi models compile byte-identical to before, except the texture pointer slots studiomdl leaves uninitialized.
An empty Tachi idles with its slide held back, but its shipped lowered clips (idletolow, lowidle, lowtoidle) show the slide forward, so a sprint closes the slide of an empty pistol. The Tachi gets three authored slots, made by script from the shipped lowered clips with the slide and its catch held at their idle01empty pose: idletolowempty, lowidleempty (activity ACT_VM_IDLE_LOWERED_EMPTY) and lowtoidleempty. The two transitions link node 0 with a new node 3, so the engine plays them into and out of the empty lowered pose. The Tachi models are recompiled. Shipped clips are unchanged.
The MilSO viewmodels (both teams) move into the layout as scene jinrai_milso, decompiled from the shipped models: one scene with both teams' arms and a whole .qc per team (the team models differ in more than their bones). The export writes the shipped clips byte for byte. Only the original animations come in: no new clips, no markers and no phases file. The game keeps the shipped model (none is compiled here).
An empty MilSO idles with its slide held back, but its shipped lowered clips (idletolow, lowidle, lowtoidle) show the slide forward, so a sprint closes the slide of an empty pistol. The MilSO gets the three authored slots the Tachi has, made by the same script from its shipped lowered clips: idletolowempty, lowidleempty (activity ACT_VM_IDLE_LOWERED_EMPTY) and lowtoidleempty, linked through node 3. The MilSO models are compiled from the sources for the first time. Shipped clips are unchanged.
|
Demo of the fix: milso-empty-sprint-slide-stays-back.mp4Reproduction of the problem: milso-shipped-empty-sprint-as-master.mp4 |
|
Cutting the stack here. I want this to be the first thing reviewed and merged out of the animation PRs. |
|
One way to examine these animations is to open up the Blender project in "neoAssets\neo\modelsrc\weapons\viewmodels.blend" to examine the new Action slots:
One can flip through the slot entries between the pair of original and tweaked slots to verify that the animation is the exact copy of gato's original animation (within floating point export variance), except that the bone "slide" of jinrai_tachi_skeleton is moved backwards of where it usually is in the existing animation set. (The distance to pull the slide bone back is based on the firing animation.) This alignment might be easier to observe when flipping through the slot pairs while the animation is playing in the preview window.
The slot pairs for this PR are
To browse the Milso scene, select jinrai_milso from the top right of the window:
This PR also refactors the separate Blender projects into the main viewmodels.blend project from #170, such that reload and reloadempty can be compared while viewing the same Blender project. To keep the export streamlined for animators without requiring duplication, viewmodels.blend has no NSF scenes. Each gun has one rig and one action, and both teams' arms are skinned to that rig, so one set of keyframes animates both. The NSF models are then compiled from the same exported jinrai_ animation data. |



Description
Add lowered sprint animations for an empty MILSO and Tachi. The neo code (NeotokyoRebuild/neo#2310) provides the animation code integration.