twhl-community / halflife-unified-sdk-assets

Asset sources for the Half-Life Unified SDK. See https://github.com/twhl-community/halflife-unified-sdk
MIT License
8 stars 4 forks source link

Create shared scientist models. #97

Closed malortie closed 2 years ago

malortie commented 2 years ago

HL1 LD <-> Op4 LD

HL1 LD <-> Blue Shift LD

HL1 HD <-> Op4 HD

HL1 HD <-> Blue Shift HD


Additional information

1 - Slick head is used as 4th model head. Rosenberg will be moved to a separate model.

2 - HL1 LD scientist mouth bone controller max value is 20 while max in Blue Shift is 16. This will work as long as the max value is used when calling SetBodygroup()

3 - In Op4 crouch_idle sequences, the hands are a bit offset away from the head. The HL1 corresponding sequences will be used since they have correct hand placement.

4 - ~In Op4, the sequence fall_elevator is identical to fall in HL1. The sequence fall.smd is reused without changing the sequence name.~ HL1 and Op4 now use the same model. fall_elevator is unused in Op4.

5 - In Op4 HD, the fifth head (clipboard) uses Glasses while the LD uses Einstein. For consistency, Einstein is used since the LD came before HD.

6 - The following sequences were not available in HL1 HD and were converted from HL1 LD:

7 - The following sequences were empty in Op4 HD and were replaced by those in HL1 HD:

8 - The following sequences were empty in Op4 HD and were converted from Op4 LD:

9 - LD -> HD sequences do not animate the scientist tie in HD. The tie can sometimes be seen clipping through the body. Fixing this issue requires manually animating the sequence. At least, those sequences are not used in the game so this can be fixed later. See SamVanheer/halflife-unified-sdk-assets#28

10 - Blue Shift skeleton hierarchy is different from normal HL1 and has different bone length for the most part. When converting from Blue Shift LD -> HL1 LD, the bones length is recalculated to use the target length (HL1). In some animations, the hands and feet may not entirely match the position of the original animation. In almost all situations, the pelvis is translated to the original animation pelvis position, then the following adjustments are made for specific sequences:

In addition, for converted sequences, and because LD/HD meshes have different size and volume, the hands can sometimes end up clipping through the body. Fixing this may require translating hands at specific frames, or manually editing the animation.


Tasks:

Add Op4 sequences:

Add Cleansuit scientist sequences:

Add Blue Shift sequences:

Add Civilian scientist sequences:

Add Civilian newspaper scientist sequences:

Add Civilian console scientist sequences:

Add Gordon scientist sequences:

Add Cower scientist sequences:

malortie commented 2 years ago

@SamVanheer

Please, can you review the following models in branch model-scientist and confirm if they can be merged ?

Each model contains all custom scientist sequences.

SamVanheer commented 2 years ago

I've checked out the models and they all look fine, although i think we should rely on the default scientist model for the Opposing Force and Blue Shift campaigns. If all of the variants are functionally identical then there's no reason to have the others. Just an LD and HD variant will do.

malortie commented 2 years ago

I have released a minor update for HD scientists and LD Blue Shift.

I tweaked the fps for c1a0_catwalk and c1a0_catwalkidle for HD scientists. In LD/HD the fps is identical but the HD has about half the LD number of frames, which results in animation in HD playing approximately twice faster. The issue is present in the HL1 game.

I adjusted the LD Blue Shift c1a0_catwalk so it's the same as the others for consistency.

I will check each cinematic sequence (not used by AI) that has a different fps, see if it's used in game and adjust if the result is not too different. Unused sequences will be set to default scientist sequence fps.

Details c1a0_catwalk ``` LD frames: 81 fps: 16 duration = 81 / 16 = 5.0625 HD frames: 41 original fps: 16 original duration = 41 / 16 = 2.5625 new fps: 8 new duration = 41 / 8 = 5.125 (closest) ``` c1a0_catwalkidle ``` LD frames: 50 fps: 12 duration: 50 / 12 = 4.16666666666 HD frames: 26 original fps: 12 original duration: 26 / 12 = 2.166 new fps: 6 new duration: 26 / 6 = 4.33 (closest) ```
malortie commented 2 years ago

@SamVanheer

The HL1 and Op4 LD/HD scientist now use one model. The models/op4/scientist.mdl and models_hd/op4/scientist.mdl have been removed.

I will inspect Blue Shift models and see if I can standardize fps for cinematic sequences so it's consistent across all games. Once this is done, I will merge the model-scientist branch.

I created #27 that documents changes that will need to be made to maps to ensure the correct sequences play. Further required changes will be documented.

malortie commented 2 years ago

The scientist models have been updated. The following changes were made:

Tested:

Untested:

Please can you confirm if I can close the issue ?

SamVanheer commented 2 years ago

I think the scientist models have everything they need, so yeah you can close the issue.