Playstation Controller mapping

This component is for using a PS2 Dualshock or Dualshock2 controller as an input device for TouchDesigner. It is the mapping is based on the Red Octane PS2-USB adaptor, which unfortunately is becoming increasingly hard to find. Other adaptors will work fine but may require slight mapping changes inside the component to map the controls to the correct channels.

For more information see this wiki article: Playstation2 Controller

You will need:

  • a PS2 Dualshock(2) controller
  • a PS2-USB adaptor
  • v this component! v

PS2dualshock.tox (1.61 KB)

This component is for using a PS3 Sixaxis or Dualshock3 controller as an input device. I requires the use of the following driver: PS3-Windows driver No motion controls supported at this time, if someone finds a Windows driver that supports the Sixaxis motion sensors, I will gladly update this component.

You will need:

  • a PS3 Sixaxis or Dualshock3 controller
  • USB mini-B cable to connect the controller to the computer
  • the PS3-Windows driver
  • v this component! v

PS3sixaxis.tox (1.43 KB)

ha! thanks. works like a charm. are the constant and replace chops just to ensure to go back to 0?

The Constant and Replace CHOPs are there so that if you ever start up your file without the controller connected, then the channels are still coming out of the component with some default (zero) values. If all the channels disappeared, your networks might error, or loose some connections. This Constant and Replace CHOP trick is great to use wherever you need to make sure channels are always present. Whenever a channel is missing, the Replace CHOP reverts to the default value for that channel defined in the Constant CHOP.

Glad you found it useful, Xbox and Wii remote coming soon!

I’ve created this extra component that woks in conjuction with the two Playstation Dualshock components above. It basically adds the ability to run a script for each button on the controller.

Connect the output of the dualshock components above to the input of this dualshockevents.tox component. Then inside there is a Text DAT for each button down and button up event. You can add any script to these events, allowing for more complex behaviors to be triggered by the buttons.

Hope someone finds this useful, enjoy!

dualshockevents.tox (1.25 KB)

Thanks ;] , just in the case if some one will found troubles with sixaxis connecting - like me ;]
davieslim.wordpress.com/2008/07/ … n-windows/

Good method in my opinion is BTSIX + PPJOY + SixAxisDriver.exe (not libusb-win32).
No cable and motion sensors/analog buttons are available in this method.
You need to correct mapping in PPJoy and in Touch depends on your needs but benefits are nice;]
Also you can try GlovePie for remapping.

Thanks Raf, I was looking for a bluetooth solution. I’ll post an updated Sixaxis component soon!

Hey Folks,

I’ve packaged a .tox for a PS4 controller using the DS4Windows drivers.
github.com/Jays2Kings/DS4Windows

It is a very humble contribution that’s based completely on the previous two .tox files in this thread. I found that the controller mappings were a little different with these drivers, and thought if anyone out there wants this, maybe it’ll save them a few minutes of fiddling. It was a helpful learning exercise for me :slight_smile:

Also, I know the last post here was YEARS ago, but if @ben or anyone else feels so inspired, the DS4Windows drivers expose the Gyro and Accel readings, the touchpad, as well as the lightbar. (pic of driver interface attached)

Hope someone finds this of value.

-Casey
PS4dualshock4_.tox (1.38 KB)

Thanks Casey I’ve been meaning to do this as I also run DS4Windows drivers now.

Hi Casey!

Thanks for the file, it works perfectly. I made a navigation program that some may find handy. It uses the analog sticks, R1/L1, and R2/L2 for an easy way to fly cameras through 3D spaces.

Thank you again! Looking forward to using this for many projects.

Edit: I’ve uploaded a new .toe with analog sensitivity adjustment, optimized layout, and I also made it so the values are incremental based on how hard your pushing sticks/buttons. New to TouchDesigner, so apologies for any unnecessary fluff!

-B
PS4_Navi.tox (4.82 KB)

Ah dang!
Totally missed @ben’s original thanks. So tight!

and rad @stereoscopeologist (-B), look forward to checking this out. Glad you found my contribution of use.

Super pumped ya’ll, you’re so welcome!!!

-Casey

I’ve updated the file to be more functional now. I’m new to the TD game so apologies for any unnecessary stuff in there!

Hello everyone, I’m new to TD and can’t make my own .tox yet.
Have anyone maneged to use the DS4 gyro info inside TD?
This thread is amazing, thanks everyone!