SkeletalD.dpr 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. (* Basic Skeletal Animation sample.
  2. This demo loads a SMD model and 3 of its animation (SMD are part of and
  3. Half-Life MDL file, and may be extracted to individual files with tools
  4. like MilkShape).
  5. SMD loading order matters: the "model" SMD must be loaded first, it contains
  6. bones and vertex data, the "animation" SMD are loaded afterwards with
  7. AddDataFromFile, they contain only bone animation data. Don't forget to link
  8. the actor to a material library, SMD models commonly use several textures!
  9. If you hit one of the jump buttons, the character will perform the jump,
  10. and once it has been completed, revert to the walk or run animation.
  11. The slider makes the character look left/right by using blending (through
  12. and animation controler).
  13. Why, why, why didn't the model moves it arms? Because it's not
  14. in the animations frames! HL uses blends to move the arms and accomodate gestures
  15. such has aiming a weapon...
  16. Side note: the look_left_right.smd animation was added by me, so don't blame
  17. the model's author if it ain't anatomically correct (hand edited smd with
  18. only three keyframes).
  19. Model Author: Neal 'Guplik' Corbett, edited by ~A.u.s.t.i.n. ([email protected])
  20. Thanks!
  21. *)
  22. program SkeletalD;
  23. uses
  24. Forms,
  25. fSkeletalD in 'fSkeletalD.pas';
  26. {$R *.RES}
  27. begin
  28. Application.Initialize;
  29. Application.CreateForm(TFormSkeletal, FormSkeletal);
  30. Application.Run;
  31. end.