I couldn't find anything via the search, has anybody successfully hooked up a Xbox 360 controller to Houdini, and can give me some tips on how to make that happen, please?
cheers
andre
360 controller in Houdini
5939 8 2- athomas
- Member
- 51 posts
- Joined: July 2005
- Offline
- mark
- Staff
- 2591 posts
- Joined: July 2005
- Offline
athomas
I couldn't find anything via the search, has anybody successfully hooked up a Xbox 360 controller to Houdini, and can give me some tips on how to make that happen, please?
cheers
andre
I think that the 360 controller is a USB device. So you might consider looking for a Python library to interface with the controller (maybe pygame?).
If so, it should be fairly straight-forward to create a python expression to access the controls.
Of course, I don't know how complicated it might get.
- malexander
- Staff
- 5158 posts
- Joined: July 2005
- Offline
If you are using Windows, you can proto-install the Joystick CHOP. It reads channels directly from the controller using DirectX. To install the CHOP:
1) run proto_install from the Houdini Command Prompt
2) Select the # for the Joystick CHOP
3) Restart Houdini
You can use Motion Effects to create a simple motion for a geometry (say, a Wave) and substitute the Joystick CHOP input instead. You will probably need to rename some of the channels to fit the channels you want to override.
1) run proto_install from the Houdini Command Prompt
2) Select the # for the Joystick CHOP
3) Restart Houdini
You can use Motion Effects to create a simple motion for a geometry (say, a Wave) and substitute the Joystick CHOP input instead. You will probably need to rename some of the channels to fit the channels you want to override.
- edward
- Member
- 7722 posts
- Joined: July 2005
- Online
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
- athomas
- Member
- 51 posts
- Joined: July 2005
- Offline
- malexander
- Staff
- 5158 posts
- Joined: July 2005
- Offline
Well, unfortunately #1 and #2 are sort of mutually exclusive, if you're looking to drive something.
To accumulate position, you assume the channels coming from the Joystick CHOP are velocities, and use the Area CHOP to accumulate the positions. You'll need to turn on the Time Slice flag (Common tab) on the Area in order for this to work properly. You'll probably need to use a math CHOP before the Area to multiply the raw values of the Joystick CHOP to come up with decent velocities for you scene's scale. Set the export flag on the Area CHOP.
Then all you need to do is hit play (the mut. excl. thing I was mentioning earlier) and drive your object around.
If you want a more permanent copy of your motion, you can use a Record CHOP to capture the channels as you are performing them, and then lock it once you're happy with the results. You can use a Trim CHOP to cut out the area of interest, if there's a bit of a lag between you pressing start/stop and your performance.
To accumulate position, you assume the channels coming from the Joystick CHOP are velocities, and use the Area CHOP to accumulate the positions. You'll need to turn on the Time Slice flag (Common tab) on the Area in order for this to work properly. You'll probably need to use a math CHOP before the Area to multiply the raw values of the Joystick CHOP to come up with decent velocities for you scene's scale. Set the export flag on the Area CHOP.
Then all you need to do is hit play (the mut. excl. thing I was mentioning earlier) and drive your object around.
If you want a more permanent copy of your motion, you can use a Record CHOP to capture the channels as you are performing them, and then lock it once you're happy with the results. You can use a Trim CHOP to cut out the area of interest, if there's a bit of a lag between you pressing start/stop and your performance.
- athomas
- Member
- 51 posts
- Joined: July 2005
- Offline
Awesome works like a charm.
A shame about not being able to do this without having to hit play, I wonder if I could somehow hook into tthe OGL call that drives the viewport and have the joystick node evaluate continuosly?
Just thinking out loud here, of course if anybody has ever attempted that please feel free to offer some tips/advice.
cheers
andre
A shame about not being able to do this without having to hit play, I wonder if I could somehow hook into tthe OGL call that drives the viewport and have the joystick node evaluate continuosly?
Just thinking out loud here, of course if anybody has ever attempted that please feel free to offer some tips/advice.
cheers
andre
- fux00rdb00nsh!t
- Member
- 34 posts
- Joined: Dec. 2008
- Offline
-
- Quick Links