DAXS Plugin - Gamepad Support for Rhino

Hey Rhino Community & McNeel Team,
I would like to introduce a project of mine: The Daxs Plugin for Rhino.

Daxs Logo Daxs


Daxs brings gamepad support to Rhino, so you can navigate your model in a way that feels intuitive, and surprisingly natural. At least when you grew up playing video games, like me.

(Video will be replaced with a better one)

Why


I am working often with larger architecture models in Rhino, and especial navigating in tight spaces can be a little bit awkward.

There are already some great solutions, like STORK or other Hardware like 3D mouses. But I started wondering about another option: game controllers. They are affordable, easy to use, and a lot of us already have one lying around at home.

And that is where Daxs ([ Da’ks ] - “Dachs” - German for badger) came from: The idea of turning a gamepad into a simple navigation tool for Rhino.

Overview


Fly Mode

Daxs Fly Mode

  • Fly freely through your model

Walk Mode

Daxs Walk Mode

  • Walk through your model via navigation mesh, or a plane (first-person view)
  • Adjust speed via buttons, change the camera lens dynamically, and trigger Rhino Commands like RenderToViewport directly from your controller.

Daxs 4 Fundamentals


Rhino First
Daxs runs in the background without getting in the way of your normal Rhino workflow.
If the gamepad is not being used, Daxs goes into a hibernation state.

Plug and Play
If your controller is already recognized by Windows, either through USB or Bluetooth, you are basically ready to go. Start Rhino 8, turn your controller on and Daxs does the rest.

Daxs uses the Simple DirectMedia Layer 3.0 library (SDL 3), which means it supports a wide range of devices. That includes Xbox-, PlayStation-, Nintendo- and many third-party- controllers.The only real requirement is that the controller should have two analogue sticks, because that is essential for movement and camera control.

Customization
You can reassign buttons, adapt controls, and add your own custom commands to you gamepad

Open Source
Daxs is released under the MIT License and the source code is openly available via GitHub.

Daxs Wiki


→ How to get started
→ Documentation
→ Changelog

Feedback


Any comment or feedback is welcome!
And of course it is a super early public version - so expect some bugs.

Greetings,
Leon (I will update the first page as new updates come by.)

Be nice if this also supported keyboard & mouse (aka first person shooter) navigation. Rhino is lacking a good walkthrough mode.

This is Stork solution, the picture below was taken from stork food4rhino page.

Thank you for the comments. With Stork, there is already a solution out there to do those things. I, personally would like to focus first on features, which are not available on food4rhino. While it would take me not so much time to make the viewport camera work, integrating mouse + keyboard movement without interfering with Rhinos Workflow is another thing. And just copying someones else work would not make me feel better - besides the legal implications for me.

Besides that, you have already a first person walkthrough mode in Daxs - just with a gamepad. :slight_smile:

I would like to give a suggestion, if possible, to add a command to save the view/camera position and another to cycle/teleport between them.

This way, lets say we are using it to present a building to a manager or client and they have some comment to add about something and we can just press a button to save the camera to get back to that later.

Or even save camera positions for rendering later.

You can already cycle between Named Views via a Button. I just did not mention it. The “Save View as Named View“ Action is a great Idea. I created an Issue in GitHub. Thank you.

I added the SaveNamedView action/command in the current test build (0.2.4), @altamiro.aj
It seems to be working well so far.
The Name of the view has to be still typed with the keyboard.
I am not seeing any advantage to add a virtual one. Overwriting a view works just with gamepad though.

I also added a small controller overlay to the HUD, so it is easier to see what is happening with the gamepad.

Maybe just make so it has a standard name with timestamp or basic counting ? So the user doesn’t have to drop the controller to type, just so it doesn’t break the workflow :slight_smile:

Yeah - i thought about it. While I am not adding so many Named Views in a project - overwriting one is a common thing for me. So the focus right now is to update a named view. Maybe I will add another eto button for creating one with a timestamp. Thank you for your comment.

[0.2.4] Released

Added

Changed

Fixed

Step 1: Install Daxs

    Open Rhino
    launch the Package Manager via "_Packagemanager" command inside the Rhino commandline.
    Search for "Daxs", install the plugin
    Restart Rhino once the installation is complete.

My Rhino 7’s Package manager can’t find the plug-in… Is it version-specific?

I can’t find it on Food4Rhino, either…


I found an installer version for Rhino 8, dragged the file into the Rhino 7’s viewport and a message confirmation appeared saying that the installation was successful.
However, my Xbox Series X gamepad is not working in Rhino 7’s viewports even after restarting Rhino 7. My gamepad is recognized by Windows 10 via USB type-C and works perfectly well with any game.
There is no Daxs plug-in in the plug-ins list of Rhino 7.

Hey @Rhino_Bulgaria, thank you for your comment. I love your shader work!
Right now just Rhino 8 on Windows is supported. I will make it clearer in the documentation.

I initially programmed the plugin just for myself and it started as a simple R8 script editor plugin. The base of the plugin is the net7.0 framework - so converting it to Rhino 7 / net4.8 is some work. I need to find a free weekend, where I can test it, if I can downgrade the project easily.

I can’t promise anything, besides that I will give it a try. I created an Issue in GitHub.

nice work - a pity i do not have a game controller …

you can check the System.Environment.OSVersion and the Rhino Version in the protected override LoadReturnCode OnLoad in your plugin s class.
and return an LoadReturnCode.Error… if not supported / plugin should not load.

Thanks! It would be nice if your plug-in supports Rhino 7, as well. There are plenty of users who prefer Rhino 7 over Rhino 8, despite that they own the latter, too.

By the way, what’s the difference between the “Walk” and “Fly” modes? Will the “Walk” mode allow actual walking-like moving in the scene on top of the geometry, sort of what the game characters do when they walk on the terrain in the video games? Or, it’s just a slower version of the “Fly” mode and the camera will still move through the geometry?

Also, what about the camera origin? Is it constant, or a dynamic and seeking of nearby objects (like what a 3d mouse do) and locks on the closest object in the center of the viewport?

Cycling between the saved views is handy. Is the regular Perspective view also in this list? For example, if I have two saved views, will the cycling be limited only to these (cycling between 2 views), or the non-saved Perspective view will be also included (cycling 3 views total)? I would much prefer the latter behaviour.

Do you plan to add an option to reverse the directions for the moving and rotating the camera?

Is it possible to swap the triggers for elevation? I tested the plug-in in Rhino 8 and I can only go up with the left trigger, which is counter-intuitive for me, because most video games with some sort of elevation (airplanes, helicopters etc) have ti assigned to the right trigger, while the left trigger is for going down. Likewise, acceleration in video games with cars is done by the right trigger, while deceleration/braking is assigned to the left trigger.
Right trigger = go up/go faster
Left trigger = go down/go slower

This is honestly amazing. Exactly what I need, very intuitive and free! This has cut literal hours off the time it takes me to find and set up views for rendering. thank you

@Tom_P It’s added to the next version 0.2.5. I did not know this override method, thank you. (edit: done :white_check_mark: )

@Rhino_Bulgaria
Thank you for the feedback!
I will try my best to see, if downgrading to 7 will be possible. Daxs works with Multithreading classes, that got introduced in newer .net Version so I need to touch some core elements of the daxs runtime. We will see.

Walk mode
Yes, it is exactly like in a video game, but without jumping/crouching.
It is important to set a navigation mesh first via the “_Daxs_SetNavigationMesh” command/button though. (If not set up - you are walking on a virtual Plane)

Here you can see an example of a navigation mesh I am using:

Optimize this mesh as much as possible (making it smaller and just have the faces you need for the collision). It should have under 10000 vertices.
There should be some comfort functions in the future, which could help to optimize the mesh.

Camera origin & targets
It always picks up the position of the viewport - so you can switch easily between mouse and gamepad. I would like to add/experiment with a camera target lock for objects after I brought daxs to a more robust version. The challenge will be that there will be a clash collision with all of the objects inside of the Rhino file. This could take in same cases multiple seconds, which would interrupt the feel& workflow. I need to test this. GitHub Issue

Cycling between views
You can cycle between Named Views, Viewports, Display modes → you need to open the daxs settings and change the button bindings.
The non-saved perspective view is per definition not saved ;). I can try to add a default state, before you are switching to the named views, so you can cycle back. GitHub Issue

Inverse Axis option
Makes sense. I added it to the next version 0.2.5 (edit: done :white_check_mark: )

Rolling camera
A rolling camera will interfere with the mouse movement in Rhino and thinks are getting super weird with it (see the gimball lock topic). I am not ready to deal with quaternions again. No.
For what use?

Reverse camera action
Possible. Not planned. For what use?

Left & right trigger
Good point. I am always getting confused with the direction. Maybe this is the reason for that. I will flip it in 0.2.5. (edit: done :white_check_mark: )

@Eden3
Thank you and for the postitive review on food4rhino!