Skip to content

Tachi animations for reload from empty with the slide locked open - #170

Merged
sunzenshen merged 4 commits into
NeotokyoRebuild:masterfrom
sunzenshen:vm-empty-slide-assets
Nov 7, 2026
Merged

sunzenshen merged 4 commits into
NeotokyoRebuild:masterfrom
sunzenshen:vm-empty-slide-assets

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds the missing empty reload animation (reloadempty) to the Tachi viewmodel models (v_jinrai_tachi and v_nsf_tachi).

While the Milso pistol shipped with a dedicated empty reload sequence (ACT_VM_RELOAD_EMPTY), the original Tachi model lacked one, causing its slide to snap forward as soon as a reload started rather than staying locked back until the new magazine was inserted. This asset update supplies the missing sequence so the slide remains locked open throughout the reload process, establishing full feature parity across both pistols.


Overview of Changes

  • New Sequences Added: Added reloadempty (ACT_VM_RELOAD_EMPTY) to both v_jinrai_tachi and v_nsf_tachi.
  • Animation Motion & Timing: Built directly off the shipped reload sequence (64 frames, 2.1 s). The slide bone is held locked back at its idle01empty position and eased forward near the end of the animation (frames 54 to 62, 1.80 to 2.07 s) right after the new magazine is seated.
  • Model Integrity: Every other sequence matches the original shipped models, recompiled within 0.01 u of the original data (reload within 0.14 u / 0.44 deg). Muzzle flash events on fire sequences remain preserved. Reload duration and timing remain strictly identical to master.
  • Source Files & Recompilation: Added full source files under neo/modelsrc/weapons/: Blender projects, QCs and SMDs for each Tachi model, shared preview textures, and the export_viewmodels.py and compile_viewmodels.py helper scripts. Models are compiled using studiomdl from the Source SDK Base 2013 MP toolset (MDL v48).
  • Documentation: Rewrote the root README.md to cover how neo installs these assets and how to use a local checkout. Added neo/modelsrc/README.md for tools and Blender export settings, and neo/modelsrc/weapons/README.md for the export and compile steps. The Tachi is the first weapon under these conventions, which are expected to change as more weapons are added.

How to Test

  1. Load a build containing the empty slide code logic (e.g., NeotokyoRebuild/neo#2259 or NeotokyoRebuild/neo#2248).
  2. Equip the Tachi (test both Jinrai and NSF teams).
  3. Fire the magazine dry (cl_autoreload_when_empty 0).
  4. Initiate a reload from empty. Verify the slide stays locked back throughout the reload and smoothly snaps forward near the end of the animation after the magazine is inserted.
  5. Perform a partial reload (with rounds left in the clip). Verify that the standard reload animation plays instead, with normal slide behavior.

Related

@sunzenshen

sunzenshen commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

I'm expecting critical feedback on where to actually put the pre-compilation animation files. Probably don't want to commit every file as is in this initial commit to neoAssets.

Edit: Initial discussion seems to point to neoAssets being the right repo, but I need to prepare the project files in modelsrc/ to be more easily auditable by a Blender user.

@sunzenshen
sunzenshen marked this pull request as ready for review October 17, 2026 02:03
@sunzenshen sunzenshen added the enhancement New feature or request label Oct 17, 2026
@sunzenshen

sunzenshen commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Added a blender project for hand posing the animations.

@sunzenshen sunzenshen changed the title Tachi: reload from empty with the slide held back Tachi animations for reload from empty with the slide locked open Oct 29, 2026
@AdamTadeusz

AdamTadeusz commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
image

I'm wondering if it would be better for the camera preview to be positioned at 0,0,0, facing the negative Y direction, so one can open the preview to see the viewmodel exactly as what one would see in game. Also interesting to note that inputting the offset values in meters seems to transform the model exactly as it would be transformed in-game. I don't see any conversion from meters to hammer units, there must be something I'm missing 🤔.

https://developer.valvesoftware.com/wiki/Viewmodels_in_Blender

(edit) It makes perfect sense actually

AdamTadeusz
AdamTadeusz previously approved these changes Oct 30, 2026
@AdamTadeusz
AdamTadeusz requested review from a team and AdamTadeusz October 30, 2026 12:28
@AdamTadeusz
AdamTadeusz dismissed their stale review October 30, 2026 12:32

Oh yeah, also I'm not sure about the python scripts, I think it might be better to include instructions detailing how to edit gameinfo.txt so that it works with crowbar. In fact I'm gonna remove my approval while I explore this topic further too

@AdamTadeusz
AdamTadeusz removed the request for review from a team October 30, 2026 12:32
AdamTadeusz
AdamTadeusz previously approved these changes Oct 30, 2026

@AdamTadeusz AdamTadeusz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok the README explains that these are optional

@AdamTadeusz
AdamTadeusz requested a review from a team October 30, 2026 12:53
@sunmachine
sunmachine self-requested a review November 3, 2026 03:33
The Tachi viewmodels had no reload for an empty gun, so a reload from
empty played the normal reload, whose slide is forward from its first
frame, and the slide closed as the reload began. Add reloadempty
(ACT_VM_RELOAD_EMPTY) to the Jinrai and NSF Tachi, built the way the
Milso's shipped one is: the normal reload with only the slide changed,
held back and released over frames 54-62 after the magazine is seated.
Every other sequence is the shipped one, recompiled.

Add Blender sources for Tachi animations

Make both Tachi animation sets editable in Blender with relative preview
textures and repeatable SMD export and model compilation. Include the
original reference mesh and all animation inputs for a complete rebuild.

Keep reference mesh export disabled to preserve original split normals.
Document the animator workflow and CMake-installed asset layout.

Verify both Blender exports, SDK compiles, and relocated project exports.
Preserve all 54 bones, 16 clips, sequence metadata and mesh attributes.

Update comments in compile_tachi.py

Update README.md to remove timing details

Removed redundant timing information for model export and compilation.
@sunzenshen

sunzenshen commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Based on @sunmachine's offline feedback, reorganized and rewrote the documentation: 366984f

Rename compile_tachi.py and export_tachi.py to compile_viewmodels.py and
export_viewmodels.py. Both now take the source folders to work on, so
models that do not come as a Jinrai and NSF pair are also supported.

Describe the Tachi as the first weapon under these conventions, which
are expected to change, and correct the Python and bpy tool requirement.

Remove the segments.csv files, which nothing reads.

Tested the export in Blender 5.2.2 with Blender Source Tools 3.4.3.
@sunmachine

Copy link
Copy Markdown

I'm pushing some changes to both the assets and the PR description that will warrant a brief re-read of this stuff @AdamTadeusz. I'm primarily focusing on the fact these are likely becoming conventional assets, and I am making sure we treat the docs with a broad-enough writing to cover the fact we intend to build and iterate on art source files.

Move the preview camera to the Tachi's hip-fire offset, facing -Y, and
use perspective with the effective viewmodel FOV of 60 and a near clip
of 1. Show the camera in the Animation workspace's left viewport.

The rig stays at the origin, so exported SMDs do not change.
@sunmachine

Copy link
Copy Markdown
  • Updated the blender files a bit with a small QOL improvement.

@sunzenshen
sunzenshen merged commit 3a9c95d into NeotokyoRebuild:master Nov 7, 2026
@sunzenshen

sunzenshen commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author
image

I'm wondering if it would be better for the camera preview to be positioned at 0,0,0, facing the negative Y direction, so one can open the preview to see the viewmodel exactly as what one would see in game. Also interesting to note that inputting the offset values in meters seems to transform the model exactly as it would be transformed in-game. I don't see any conversion from meters to hammer units, there must be something I'm missing 🤔.

https://developer.valvesoftware.com/wiki/Viewmodels_in_Blender

(edit) It makes perfect sense actually

Maybe some settings are a bit off, but ended up figuring this out, as well as consolidating the .blend files into one in:

NeotokyoRebuild/neo#2285

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants