ValveResourceFormat / ValveResourceFormat

🔬 Valve's Source 2 resource file format parser, decompiler, and exporter.
https://valveresourceformat.github.io
MIT License
1.54k stars 195 forks source link

Certain models don't animate in GUI #494

Open moofMonkey opened 1 year ago

moofMonkey commented 1 year ago

Describe the bug

Exported glTF model animates correctly, however GUI doesn't seem to apply animations at all. idle idle cave_head_stone_fracture_new cave_head_stone_fracture_new

What Valve game does this happen in

Aperture Desk Job

Reference file in a Source 2 game

Only one reference file so far, models/cave_office/cave_head/cave_head_stone_fracture_new.vmdl.

Expected behavior

GUI should actually animate the model

What version of VRF are you using? On what platform?

master, 6b14a61 so far

kristiker commented 1 month ago

The model VBIB lacks BLENDWEIGHTS, so it multiplies by zero in the vertex shader.

BLENDINDICES is RG1616_SINT, so is it two components or what?

https://github.com/ValveResourceFormat/ValveResourceFormat/blob/9ff82297fe2f5149aa08764d11455c539deac10b/GUI/Types/Renderer/Shaders/common/animation.glsl#L26-L33