Code and utilities shared among groups

Input Code

Xbox Controller "Emulator"

Download

Description

This is a simple component which allows the user to emulate the xbox controller input using a keyboard on the PC. The component is done to be as transparent as possible.

Usage

To use this component, just call "GamPadX.GetState(...)" instead of "GamePad.GetState(...)". There is almost no performance loss when deploying it on the xbox as the component disables itself.

Keyboard mapping

  • F1 - switch to index 1 of controller
  • F2 - swtich to index 2 of controller
  • F3 - switch to index 3 of controller
  • F4 - switch to index 4 of controller
  • F5 - turn off emulator

  • DPad : Numpad 8,4,2,6
  • Left thumbstick : Arrow keys
  • Right thumbstick : J,K,L,I

  • A = keyBoard A
  • B = keyBoard B
  • X = keyBoard X
  • Y = keyBoard Y
  • Back = keyBoard Backspace
  • Start = keyBoard Enter
  • XBOX Button = keyBoard ESC
  • Left SHoulder = keyBoard Left Shift
  • Right SHouler = keyBoard right shift
  • left stick button = keyBoard left ctrl
  • right stick button = keyBoard right ctrl

  • left trigger = keyBoard q
  • right trigger = keyBoard w

Notes:

The emulator starts in disabled mode by default. Press any of the F(1,2,3,4) to enable it. Also, it does not do anolog values for the sticks and triggers.

Revision:

  • 1 - base version

Utility Code

Animation mixer

Download

Description

This is a simple java program to join multiple FBX files into one FBX files containing animations. This is because the FBX 3ds max exporter can only export one animation in one FBX files and always names it Take 001. This application takes a a base file (which has the model defined etc...) and animation files in a animation folder and will write a new FBX file with the animations. The animation names will be the same as the file names inside of the animation folder. The nice thing is that you can change the model as many times as you like (and the vertex weights) and you only have to export into the base file. The animation files can stay the same as long as the bone structure isnt changed.

Usage

To use this application, you first have to compile it (java 1.5 or greater). Then you can use it with the following arguments: <baseFile.FBX> <animationFolder.Path> <outPutFile.FBX>

Revision:

  • 1 - base version

I Attachment History Action Size Date Who Comment
Java source code filejava Convert.java r1 manage 4.5 K 2009-04-18 - 18:46 UnknownUser A java utility to merge FBX files for animation
Unknown file formatcs GamePadX.cs r1 manage 5.6 K 2009-03-23 - 12:33 UnknownUser Controller Emulation

Page URL: https://twiki.graphics.ethz.ch/bin/view/GameClass/SharedCode
2025-08-02
© 2025 Eidgenössische Technische Hochschule Zürich