3D Connextion space mouse with Houdini

   3047   11   2
User Avatar
Member
33 posts
Joined: 10月 2019
Offline
Does anyone know if it's possible to lock the horizon tilt in the Houdini viewport? I use a 3d Connextion space mouse and the tilt/roll in the viewport is really nauseating, and I was hoping I could disable it. In space mouse settings in other packages there's an option to "lock horizon" but for Houdini I don't see that option in the space mouse settings, so I was hoping I could do this through the Houdini preferences, but I'm just not finding it there. Any idea if this is possible in Houdini?
Thanks!

Attachments:
spacemouse.png (36.5 KB)

User Avatar
Member
710 posts
Joined: 7月 2005
Online
It's not possible, SideFX has not implemented it. There is an existing RFE (Request for Enhancement) #106266 for this feature. I would urge you to add your voice to it.

https://www.sidefx.com/bugs/submit/ [www.sidefx.com]
User Avatar
Member
251 posts
Joined: 7月 2013
Offline
Working on this at the moment. Should give (technical) users full customization control since the raw data is simply exposed to python..

https://vimeo.com/manage/videos/777706928 [vimeo.com]
Edited by Jonathan de Blok - 2022年12月3日 18:44:47
More code, less clicks.
User Avatar
Member
710 posts
Joined: 7月 2005
Online
!!!

Fantastic Jonathan. It would be great to finally have Spacemouse navigation in Houdini that's as usable as other DCCs.
User Avatar
Member
1 posts
Joined: 5月 2022
Offline
Jonathan de Blok
Working on this at the moment. Should give (technical) users full customization control since the raw data is simply exposed to python..

https://vimeo.com/manage/videos/777706928 [vimeo.com]

Did you end up finishing the script?
Permanent Beginner
User Avatar
Member
636 posts
Joined: 6月 2006
Offline
https://www.sidefx.com/docs/houdini/basics/3dmouse.html [www.sidefx.com]
User Avatar
Member
251 posts
Joined: 7月 2013
Offline
ttiimmaacc
Jonathan de Blok
Working on this at the moment. Should give (technical) users full customization control since the raw data is simply exposed to python..

https://vimeo.com/manage/videos/777706928 [vimeo.com]

Did you end up finishing the script?

I polished it a bit so it's ready for basic use, had more plans for this to control objects etc but for now it's just viewport navigation. It does work for recording camera movement if you lock a camera to the view and enable autokey.

Anyways, You can grab the SpaceMouse panel from here:
https://bitbucket.org/jcdeblok/jdb_houdinitoolkit/src/master/python_panels/ [bitbucket.org]

Place the file in your '/Documents/houdini19.5/python_panels' or equivalent folder and you should be able to add it to the UI.

PS: You do need to set the "HOUDINI_ENABLE_3DMOUSE" environment var to "0" to avoid interference with native support. The panel will display a message about this if this has not been done.
Edited by Jonathan de Blok - 2023年10月22日 05:30:12
More code, less clicks.
User Avatar
Member
710 posts
Joined: 7月 2005
Online
Thanks so much for sharing this Jonathan! I get the following error when trying to access the panel:

There is an error in the SpaceMouse script.

Traceback (most recent call last):
File "C:/Users/hibbi/Documents/houdini19.5/python_panels/SpaceMouse.pypanel", line 18, in <module>
#
File "C:\Program Files\Side Effects Software\Houdini 19.5.773\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'spacenavigator'
User Avatar
Member
251 posts
Joined: 7月 2013
Offline
Siavash Tehrani
Thanks so much for sharing this Jonathan! I get the following error when trying to access the panel:

There is an error in the SpaceMouse script.

Traceback (most recent call last):
File "C:/Users/hibbi/Documents/houdini19.5/python_panels/SpaceMouse.pypanel", line 18, in <module>
#
File "C:\Program Files\Side Effects Software\Houdini 19.5.773\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'spacenavigator'


Ohh yeah, I forgot to include this 3th party python bit: https://github.com/johnhw/pyspacenavigator/blob/master/spacenavigator.py [github.com]

I guess you could place it in here:
C:\Program Files\Side Effects Software\Houdini 19.5.752\python39\lib\site-packages

But what I prefer to do it make separate folder for nondefault site-packages and add it to the PATH env variable so the imports will find it. That way things will stay intact when updating/changing Houdini versions. In my case it looks like this:



I see the 3th party code is MIT licensed so that gives me the option to just include it in the code and make it a single package, I'll look into that later, until then the above method should work.
Edited by Jonathan de Blok - 2023年10月22日 13:58:17

Attachments:
Screenshot 2023-10-22 195313.jpg (20.5 KB)

More code, less clicks.
User Avatar
Member
710 posts
Joined: 7月 2005
Online
Thank you. I added spacenavigator.py. It then complained about missing pywinusb, so I installed it via pip, following Paul Ambrosiussen's handy tutorial here: https://youtu.be/cIEN50WuPoc?si=t-aXG4CZSOElqaBV [youtu.be]
The panel now loads without errors, however while the buttons on the spacemouse still work fine, no inputs from the puck seem to be detected.
User Avatar
Member
251 posts
Joined: 7月 2013
Offline
Siavash Tehrani
Thank you. I added spacenavigator.py. It then complained about missing pywinusb, so I installed it via pip, following Paul Ambrosiussen's handy tutorial here: https://youtu.be/cIEN50WuPoc?si=t-aXG4CZSOElqaBV [youtu.be]
The panel now loads without errors, however while the buttons on the spacemouse still work fine, no inputs from the puck seem to be detected.

My system had a modified version of spacenavigator.py to support the compact model, which is not in the original repo so that's why it didn't work. I've added support for all current 3dconnexion devices and added a package handler that, after asking permission, install missing python packages like spacenavigator and pywinusb on the fly.

( The buttons are being handled by the 3dconnexion driver but there are hooks in the panel's code to make your own handlers for this. For that you do need to disable the driver's button handlers by messing around with some of the relevant XML files in C:\Program Files\3Dconnexion\3DxWare\3DxWinCore\Cfg )


All in the SpaceMouse.pypanel from https://bitbucket.org/jcdeblok/jdb_houdinitoolkit/src/master/python_panels/ [bitbucket.org]
Edited by Jonathan de Blok - 2023年10月24日 07:58:52
More code, less clicks.
User Avatar
Member
10 posts
Joined: 4月 2016
Offline
Supernewbie to adding stuff like this to Houdini.
Could anyone who's made it work write me a recipe ? Would love to get my SpaceMouse work properly in Houdini! A pity it doesn't work as it should out of the box.
  • Quick Links