Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust posture in retargeted animations. #147

Open
malortie opened this issue Dec 25, 2023 · 0 comments
Open

Adjust posture in retargeted animations. #147

malortie opened this issue Dec 25, 2023 · 0 comments
Labels
animation enhancement New feature or request

Comments

@malortie
Copy link
Collaborator

Several models across the main HL games have custom sequences (both in LD/HD) but some have different bone hierarchy (armature), which required retargeting animations between each incompatible armature.

A tool was created to allow automating the process in converting each required animation. This also allowed to make animations more reusable across various models and add animations that were previously only restricted to specific models.

https://github.com/malortie/smd-tools/blob/master/test_smd_tool

The tool follows a pipeline like architecture. It loads SMDs and applies a set of operations based on the need of each case. In most of the cases, an operation was used to resolve feet positions so they could be positioned at the center between the two feet position in the original animation. There is no support for IK, which is the main concern in this issue.

The animations were converted so that they would try to rotate the same way as the input armature but since the two armatures don't necessarily have the same bone lengths for the arms or spines, the arms may not always end up close enough to the locations they are intended to be.

Whether or not it's an issue depends on the context of each animation. If the character doesn't need to hold an object and or extend an arm to a specific location, there's no need to adjust anything.

Each converted sequence was at first reviewed and deemed 'OK' but there are a few identified situations where this could be improved:

Scientist:

  • crowbar_swing
  • drive_jeep1, drive_jeep2
  • tap_down, tap_idle
  • All wallwork sequences

Ways to approach this situation:

A)

Implementing IK in the tool would be complex and does not guarantee to give adequate results. Remember that if both armatures don't have the same bone lengths, you can't just stretch the bones since it'll make the animation look glitchy. The only way is to run multiple simulations using combination of rotations for all the bones (possibly starting from the pelvis) that work concordantly with the target arm(s) and hope for an adequate result. Remember that this needs to blend across all frames of the animation for which the position of the arm(s) is important. This may potentially require a lot of trials/errors. Note that this approach does not allow easier further editing of the animation since it depends on an arbitrary process rather than using a 3D scene file.

B)

Manually fixing the animation at specific frames is highly probable to be less time costly than the above. In cases of sequences where the character is standing still or arms aren't moving too often (e.g. tap_down and tap_idle) then making small rotations would probably be sufficient but in cases of more complex animations, a rig with IK will likely be required.

Characters rigged to use IK are usually animated using controllers provided by the rig developer. The ideal solution would be to have a rig whose controllers have the same orientation as the target HL skeleton bones. This would allow to simply copy each bone transform to their associated controller and rebuild the animation on top of the controllers. Once you have all transforms, you could technically use the Decimate Keyframe feature to remove unneeded keyframes (simplify animation curves) and only correct the position of the arm(s) at specific times. If the IK rig does not match the bones transforms, then manually moving each controller to their respective bone will be required for each frame of the animation.

It may also be interesting to have an IK rig for animators to use to create custom animations more easily.


Solution B) is recommended.

Below is a list of all converted sequences.

Note: Most of the sequences listed below are shared between models, so the actual number of sequences is actually much lower.

Scientists

LD scientist

Ported from Blue Shift LD scientists sequences:

  • boost
  • boost_idle
  • chum_idle
  • chum_walk
  • cower_chat
  • cower_chat_die
  • cower_vents
  • crowbar_swing
  • dead_in_truck
  • diesimple_rose
  • drive_jeep1
  • drive_jeep2
  • eating
  • elev_dead1
  • elev_dead2
  • hambone
  • handscan
  • in_theory
  • open_gate
  • ponder_console
  • ponder_teleporter
  • power_pipes
  • railing_chat1
  • railing_chat2
  • rose_console1
  • rose_console2
  • rose_console3
  • rose_glance
  • rose_outro
  • rose_signal
  • sim_ack
  • sim_lever
  • tap_down
  • tap_idle
  • tele_jump1
  • tele_jump2
  • telework1
  • telework1_stand
  • telework2
  • telework3
  • wallwork1
  • wallwork2
  • wallwork3
  • wallwork4
  • wallwork5
  • work_jeep
  • working_console
  • you_go

Ported from Blue Shift LD civilian scientists sequences:

  • playgame1
  • sit1
  • sit2

Ported from Blue Shift LD civilian newspaper scientists sequences:

  • paper_idle1
  • paper_idle2
  • paper_idle3

Ported from Blue Shift LD console civilian scientists sequences:

  • console_idle1
  • console_shocked
  • console_sneeze
  • console_work

Ported from Blue Shift LD scientist_cower.mdl sequences:

  • cower_die

Ported from Blue Shift LD Gordon scientist sequences:

  • tram_glance

HD scientist

Ported from HL1 LD scientists sequences:

  • scicrash
  • scicrashidle

Ported from Op4 LD scientists sequences:

  • cpr_gesture1
  • cpr_gesture2
  • of1_a1_cpr2

Ported from Op4 LD cleansuit scientists sequences:

  • dead_against_wall
  • scientist_beatwindow
  • scientist_deadpose1
  • scientist_throwna
  • scientist_thrownb
  • scientist_zombiefear
  • teleport_fidget

Ported from Blue Shift HD civilian scientists sequences:

  • playgame1
  • sit1
  • sit2

Ported from Blue Shift HD civilian coat scientists sequences:

  • coat_idle1
  • coat_walk

Ported from Blue Shift HD civilian newspaper scientists sequences:

  • paper_idle1
  • paper_idle2
  • paper_idle3

Ported from Blue Shift HD console civilian scientists sequences:

  • console_idle1
  • console_shocked
  • console_sneeze
  • console_work

Gman

LD Gman

  • bigno
  • bigyes
  • cell_away
  • cell_idle
  • gman_cell
  • gman_reference
  • idle01
  • idle02
  • idlebrush
  • idlelook
  • listen
  • lookdown
  • lookdown2
  • no
  • open
  • push_button
  • stand
  • walk
  • working_nuke
  • yes

Otis

LD Otis

Ported from Blue Shift LD Otis sequences:

  • otis_dumped
  • otis_dumped_idle
  • range_fire (now otis_range_fire)
  • range_struggle

Ported from Blue Shift LD intro_otis.mdl sequences:

  • intro_glance

Barney

HD Barney

Ported from Op4 LD Otis sequences:

  • cowering
  • dead_sitting
  • fence (now otis_fence)
  • wave (now otis_wave)

Ported from Blue Shift LD Otis sequences:

  • otis_dumped
  • otis_dumped_idle
  • range_fire (now otis_range_fire)

HGrunt

LD HGrunt

Ported from Blue Shift LD HGrunt sequences:

  • soldier_dump
  • soldier_dump_idle
  • soldier_kick
  • soldier_shoot_ahead

Ported from Op4 LD Massn sequences:

  • standing
  • working

HD HGrunt

Ported from HL1 LD HGrunt sequences:

  • cliffdie

Ported from Op4 LD Massn sequences:

  • standing
  • working

Skeleton

LD Skeleton

  • dead_against_wall
  • dead_stomach
  • s_onback
  • s_sitting

Massn

LD Massn

Ported from HL1 LD HGrunt sequences:

  • 180L
  • 180R
  • WM_button
  • WM_moatjump
  • bustwall
  • bustwindow
  • cliffdie
  • converse1
  • converse2
  • corner1
  • corner2
  • defuse
  • diveaside
  • diveaside_idle
  • divecover
  • draghole
  • dragholeidle
  • dragleft
  • dragright
  • flyback
  • hoprail
  • impaled
  • jumptracks
  • kneeldive
  • kneeldive_idle
  • leftarmflinch
  • leftlegsmflinch
  • pipetoss
  • plunger
  • rightarmflinch
  • rightlegsmflinch
  • soldier_dump
  • soldier_dump_idle
  • soldier_kick
  • soldier_shoot_ahead
  • startleleft
  • startleright
  • stone_toss
  • trackdive
  • trackwave

Ported from Op4 LD friendly grunts sequences:

  • cpr
  • crawling
  • dead_canyon
  • dead_headcrabed
  • dead_on_back
  • hgrunt_dead_stomach
  • hgrunt_on_stretcher
  • interogation
  • interogation_idle
  • mic_idle1
  • mic_idle2
  • mic_idle3
  • mic_idle4
  • mic_stand
  • of1a6_get_on
  • of2a2_death_speech
  • of2a2_speech_idle
  • open_floor_grate
  • sitting2
  • sitting3

Ported from Op4 LD intro_commander.mdl sequences:

  • bark (now intro_stand_bark)
  • fall_out (now intro_stand_fallout)
  • intro_stand_idle1
  • intro_stand_idle2
  • intro_stand_idle3
  • stand_react (now intro_stand_react)

Ported from Op4 LD intro_medic.mdl sequences:

  • sitting1 (now intro_sitting_holster1)
  • sitting2 (now intro_sitting_holster2)
  • sitting3 (now intro_sitting_holster3)
  • sitting4 (now intro_sitting_holster4)
  • sitting5 (now intro_sitting_holster5)
  • sitting6 (now intro_sitting_holster6)
  • sitting7 (now intro_sitting_holster7)

Ported from Op4 LD intro_regular.mdl sequences:

  • sitting1 (now intro_sitting_mp5_1)
  • sitting2 (now intro_sitting_mp5_2)
  • sitting3 (now intro_sitting_mp5_3)
  • sitting4 (now intro_sitting_mp5_4)
  • sitting5 (now intro_sitting_mp5_5)

Ported from Op4 LD intro_saw.mdl sequences:

  • cower (now intro_sitting_cower1)
  • sit_React (now intro_sitting_react)
  • stiff (now intro_sitting_stiff)

Ported from Op4 LD intro_torch.mdl sequences:

  • cower (now intro_sitting_cower2)

HD Massn

Ported from Op4 LD intro_medic.mdl sequences:

  • sitting1 (now intro_sitting_holster1)
  • sitting2 (now intro_sitting_holster2)
  • sitting3 (now intro_sitting_holster3)
  • sitting4 (now intro_sitting_holster4)
  • sitting5 (now intro_sitting_holster5)
  • sitting6 (now intro_sitting_holster6)
  • sitting7 (now intro_sitting_holster7)

Ported from Op4 HD intro_regular.mdl sequences:

  • sitting1 (now intro_sitting_mp5_1)
  • sitting2 (now intro_sitting_mp5_2)
  • sitting3 (now intro_sitting_mp5_3)
  • sitting4 (now intro_sitting_mp5_4)
  • sitting5 (now intro_sitting_mp5_5)

Ported from Op4 HD intro_saw.mdl sequences:

  • cower (now intro_sitting_cower1)
  • sit_React (now intro_sitting_react)
  • stiff (now intro_sitting_stiff)

Ported from Op4 LD intro_torch.mdl sequences:

  • cower (now intro_sitting_cower2)

Ported from Op4 HD friendly grunts sequences:

  • hgrunt_on_stretcher

Op4 friendly grunts

LD Op4 Medic

  • run

LD Op4 Engineer

  • walk1

LD Op4 grunts (hgrunt_medic.mdl, hgrunt_opfor.mdl, hgrunt_torch.mdl)

  • combatidle
  • cpr
  • crawling
  • crouching_idle
  • crouching_saw_blend1
  • crouching_saw_blend2
  • crouching_wait
  • dead_canyon
  • dead_headcrabed
  • dead_on_back
  • dieback1
  • diebackwards
  • dieforward
  • diegutshot
  • dieheadshot
  • diesimple
  • hgrunt_dead_stomach
  • hgrunt_on_stretcher
  • holding_on (now intro_stand_idle1)
  • idle2
  • interogation
  • interogation_idle
  • mic_idle1
  • mic_idle2
  • mic_idle3
  • mic_idle4
  • mic_stand
  • of1a6_get_on
  • of2a2_death_speech
  • of2a2_speech_idle
  • open_floor_grate
  • react (now intro_stand_react)
  • reload_saw
  • shoot_shotgun
  • sitting (now intro_sitting_mp5_1)
  • sitting2
  • sitting3
  • standing_saw_blend1
  • standing_saw_blend2

HD Op4 grunts (hgrunt_medic.mdl, hgrunt_opfor.mdl, hgrunt_torch.mdl)

  • hgrunt_on_stretcher

Op4 Intro grunts

LD Intro Regular Op4 grunt (intro_regular.mdl)

  • sitting1 (now intro_sitting_mp5_1)
  • sitting2 (now intro_sitting_mp5_2)
  • sitting3 (now intro_sitting_mp5_3)
  • sitting4 (now intro_sitting_mp5_4)
  • sitting5 (now intro_sitting_mp5_5)

LD Intro SAW Op4 grunt (intro_saw.mdl)

  • cower (now intro_sitting_cower1)
  • sit_React (now intro_sitting_react)
  • stiff (now intro_sitting_stiff)

HD Intro SAW Op4 grunt (intro_saw.mdl)

  • cower (now intro_sitting_cower1)
  • sit_React (now intro_sitting_react)
  • sitting1 (now intro_sitting_mp5_1)
  • sitting2 (now intro_sitting_mp5_2)
  • sitting3 (now intro_sitting_mp5_3)
  • sitting4 (now intro_sitting_mp5_4)
  • sitting5 (now intro_sitting_mp5_5)
  • stiff (now intro_sitting_stiff)

LD Intro Torch Op4 grunt (intro_torch.mdl)

  • cower (now intro_sitting_cower2)

LD Intro Medic Op4 grunt (intro_medic.mdl)

  • sitting1 (now intro_sitting_holster1)
  • sitting2 (now intro_sitting_holster2)
  • sitting3 (now intro_sitting_holster3)
  • sitting4 (now intro_sitting_holster4)
  • sitting5 (now intro_sitting_holster5)
  • sitting6 (now intro_sitting_holster6)
  • sitting7 (now intro_sitting_holster7)

Zombies

LD Zombie scientist

Ported from Op4 LD zombie soldier sequences:

  • dead_on_back
  • dead_on_stomach
  • get_off_table
  • table_breathe
  • throw_scientist

HD Zombie scientist

Ported from Op4 LD zombie soldier sequences:

  • dead_on_back
  • dead_on_stomach
  • get_off_table
  • table_breathe
  • throw_scientist

Ported from HL1 LD zombie scientist sequences:

  • busting_through_wall
  • c2a3_snack_getup
  • deadidle
  • deadwall
  • eat_to_stand
  • falling
  • zombie_eating
  • zombie_pull_scientist

LD Zombie soldier

Ported from HL1 LD zombie scientist sequences:

  • bust_window
  • busting_through_wall
  • c2a3_snack_getup
  • deadidle
  • deadwall
  • eat_to_stand
  • eatbody
  • eatbodystand
  • eatbodytable
  • freak
  • freakdie
  • haulzombie
  • kick_punch_wall
  • pause
  • ripdoor
  • slideidle
  • slidewall
  • soda
  • vent_c1a3
  • vent_zidle
  • ventclimb
  • ventclimbidle
  • zombie_eating
  • zombie_pull_scientist

Ported from Blue Shift LD zombie scientist sequences:

  • left_tug
  • left_tug_idle
  • right_tug
  • right_tug_idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
animation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant