3DS MAX: Using a hardware controller

ngon master
Offline / Send Message
perna ngon master
This video demonstrates how you can (and why you should) be using hardware controllers with 3ds Max.

You can get these things cheaply, and at any level of complexity you want. Knobs, faders, pads, touch-sensitive strips and pads, screens, bi-directional communication. There's no end to what you can do.

3D art is big business these days. The software and computer hardware required ends up costing a great deal of money, so restricting yourself to mouse and keyboard controlling on-screen UI elements is terribly crude and old-fashioned when considering what you could be doing instead.

I definitely imagine that all the big studios will make hardware controllers standard in the future. The cost/benefit ratio is just too good to ignore.

I ended up skipping a lot of information in the video, but you get the idea.

[ame=" Controller useage with 3ds Max - YouTube[/ame]


edit: Follow-up video:
[ame=" keyboard with 3ds Max - YouTube[/ame]

Replies

  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 9
    Oh wow, this is some mad-scientist level stuff :)

    Some questions:

    • How do you bind hardware buttons to functions? Is there a framework? Do you need a custom maxscript (if so, do you have this)? Or is it a hack like when binding mouse movement to an Xbox controller in games that don't support controllers?
    • Additionally, could you hook this up to things in other applications? Like functions in Photoshop for example.
    • How responsive is this? I'm not sure I could tell, but it seemed to lag behind a little bit, and it looked annoying. I got a feeling this could become a major annoyance for me.
    • What controller is that, how much did you pay?
    ps; the mumbling is OK :thumbup:
  • stabbington
    Offline / Send Message
    stabbington polycounter lvl 6
    The nice thing is that you can pick up those little Akai or Korg usb controllers for just a few quid too!

    As an aside, I worked at a studio where I was gifted a Space Pilot and I found it ended up significantly slowing my workflow down - it took my hand away from the keyboard or mouse and it couldn't physically replace all the functions and speed of normal hotkeys and mouse/wacom. Having to hop back and forth between the keyboard the many times I had to use normal key strokes was always jarring, and it didn't seem worth having something plugged in just for the sake of assigning a couple of fun functions to it when you could just use a macro or a slider or hotkey combo using your normal input devices your hands were already on.

    That being said, with the comparatively low cost of these kinds of devices you 'could' have them plugged in just for the sake of using for novel input uses. I think my own personal experiences have made me wary of any physical button/knob/slider-based hardware that tries to replace the myriad functions a keyboard and pointing device provide for programs as complex as the ones we use, because there's always going to be a need for some way of inputting text and navigating your OS and I only have so many hands... but there's surely some creative and actually useful ways to make use of stuff like this.
  • stabbington
    Offline / Send Message
    stabbington polycounter lvl 6
    Xoliul wrote: »
    What controller is that, how much did you pay?

    Looks like the Akai LPD 8, maybe? [ame="http://www.amazon.co.uk/Akai-Lpd8-Midi-Pad-Controller/dp/B002M8EEW8"]Akai Lpd8 Midi Pad Controller: Amazon.co.uk: Computers & Accessories[/ame]

    You can get similar USB controllers from Korg (nano's - http://www.keyofgrey.com/2009/02/korg-nanokontrol-thin-is-in/) and probably some other digital music makerers of good repute.
  • MrOneTwo
    Offline / Send Message
    MrOneTwo polycounter lvl 7
    Akai LPD 8 is even cheaper than cheapest Wacom Bamboo here... It really looks interesting. Thanks perna.
  • perna
    Offline / Send Message
    perna ngon master
    Xoliul wrote: »
    Oh wow, this is some mad-scientist level stuff :)

    Some questions:

    • How do you bind hardware buttons to functions? Is there a framework? Do you need a custom maxscript (if so, do you have this)? Or is it a hack like when binding mouse movement to an Xbox controller in games that don't support controllers?
    • Additionally, could you hook this up to things in other applications? Like functions in Photoshop for example.
    • How responsive is this? I'm not sure I could tell, but it seemed to lag behind a little bit, and it looked annoying. I got a feeling this could become a major annoyance for me.
    • What controller is that, how much did you pay?
    ps; the mumbling is OK :thumbup:

    Laurens:
    -I have a DLL which lets me respond to MIDI events in Maxscript. It passes along basic information (CC of the knob, value, etc) which I then turn into anything I want. So the hardware interface is very simple. Well, you need to queue up messages so they don't overflow (there's a ton of them when turning a knob), and make sure everything is in sync and so on. So it's not really a hack at all, it's direct communication.
    -Since I'm not hacking, I couldn't use this interface to communicate with Photoshop unless it's possible to do communication like this with a photoshop script.
    -There's no lag. Remember that MIDI is designed to work with music, which necessitates real-time operation of a whole other level than we'll ever need in 3D.
    -LPD8, like stabbington links to. Now, the key here is that it's MIDI. This means you can literally use any MIDI device in existence. You might have an old keyboard with faders and a pitch/bend control lying somewhere. These are supe cheap and the MIDI standard is very straightforward. It beats buying any dedicated hardware, like the AVID stuff they use in movies. You'll have to write all the necessary code, but as far as interface goes, that's a one-time job, and very straight-forward. After that you just write logic, say, in Maxscript (or SDK or whatever you want), which is the more fun and easy part.

    Next time I won't record the audio at 3AM, or I'll have a cup of coffee first ;)
    As an aside, I worked at a studio where I was gifted a Space Pilot and I found it ended up significantly slowing my workflow down - it took my hand away from the keyboard or mouse and it couldn't physically replace all the functions and speed of normal hotkeys and mouse/wacom.

    Yeah, that just sounds like bad design. You wouldn't ever want to try to totally replace existing hardware or move all functionality onto new hardware.

    I showed the color management functionality for a reason. It's an example of perfect use. It should be pretty evident that the existing workflow for doing this is far inferior to using the knobs.

    By the way, my setup is context sensitive. When I'm not in an SO mode, the controller adjusts color. When I'm in SO mode, it models.

    Naturally pretty much all the controls interface with custom scripts, not standard Max features the way I demonstrated. Over the years I've progressively reduced the number of tools I use in max, replacing them with fewer tools that have more functionality. Now, I'm making use of very few tools, and most of them can be mapped to the controller.

    It's also done in such a way that I don't keep jumping back and forth between controller and keyboard.

    That said, however, even with the jump between keyboard and controller with my left hand, it's still faster to use the controller.

    It's not just about speed and efficiency, though. It feels great. It feels intuitive. You develop a physical link to the parameters. This means I know that, for example, the 3 o' clock knob setting for chamfer gives a certain width, or gives a certain color for the hue controller... so I can super quickly get those results.

    So, yes, you shouldn't just start dumbly mapping stuff to the controller. You need a solid design behind it as well. Be smart about it.

    Just to point out, since I met some skepticism elsewhere: I'm not selling anything (library, code, whatever) here, and this is not about trying to get anyone else to implement an idea that I have. I already have the code, it works great, and I already have the logic and using it is pure bliss. So, this is all about sharing. It's too cool not to.
  • perna
    Offline / Send Message
    perna ngon master
    Common among all the following is that you can use literally the same code to drive them all. That's the joy of using a well-established standard


    MIDI communication goes both ways, so you can send signals to have the controller light up, or for motorized faders to move on their own.
    novation-launchpad.jpg



    You can build your own controller
    Completed%20MIDI%20Controller.jpg


    You can go hard-core
    pmtonline-yamaha-st41995-31.jpg


    ...or satan-core
    PM5000_image07.jpg


    There's all sorts of cool stuff
    ds1_side.jpg
  • thomasp
    Offline / Send Message
    thomasp polycounter
    i used a board with dials for animation in softimage on an SGI ages ago. it was a dedicated 'CG' piece of input hardware, not a music production device. can't say it sped up working enormously, it was more like a fancy toy not the least due to limited application within the software.

    later i used a spacemouse and a particular microsoft-made controller for strategy games and mapped 3ds max functionality to them which kind of felt more intuitive than hitting hotkeys but now i only see these things as useful for people who specialize in a particular niche task and have the time and resources to come up with their own specific solution for carving out their workflow.

    for anyone who covers modelling, texturing, sculpting and/or more areas and various programs, i can only see stuff like this complicating work and introducing new dependencies. apps are built with mouse and keyboard in mind and it shows. e.g. shame that there is no support in zbrush for the spacemouse, it seems like it would be the perfect device for the job in conjuction with a tablet. totally incompatible software-design from the looks of it however.
    so, KISS principle for me as far as input devices are concerned.

    also, pretty sure the only way you'll get R&D staff at a studio to put development effort into a solution is to have them do it out of interest in their spare time. ;)
  • PogoP
    Offline / Send Message
    PogoP polycounter lvl 8
    Whilst that does look cool and like a fun little hobby project, I imagine it would be incredibly impractical to use in a working environment.
  • perna
    Offline / Send Message
    perna ngon master
    thomasp wrote: »
    for anyone who covers modelling, texturing, sculpting and/or more areas and various programs, i can only see stuff like this complicating work and introducing new dependencies. apps are built with mouse and keyboard in mind and it shows. e.g. shame that there is no support in zbrush for the spacemouse, it seems like it would be the perfect device for the job in conjuction with a tablet. totally incompatible software-design from the looks of it however.
    so, KISS principle for me as far as input devices are concerned.

    I keep hearing this. The issue isn't that a hardware interface is a bad idea, it clearly isn't, but that the accompanying software is poorly designed.

    So maybe then it does become more relevant for us to release a product like this, because while I know for sure that others can write the MIDI interface code without much issue, designing scripts to put it all into good use requires more work.

    I didn't show much modeling functionality, because that's all using custom scripts and the kind of things I'm not going to just throw out there.

    However, the color manip functionality should speak for itself, and you can try to use those principles when writing your own functionality:
    -pick tasks that are whole stages.
    -tasks where you can control all parameters on the MIDI device and you don't have to keep going back and forth
    -tasks where using the UI to do the same is extremely slow (as in the case of color/material editing)
    -Use the chance to automate the things you previously had to discreetly edit (in this case energy conservation, metallic values, etc)
    -...and so on

    I'm also using the controller for Modifier parameters and object creation parameters. It's all context sensitive.
  • radiancef0rge
    Offline / Send Message
    radiancef0rge Polycount Sponsor
    tom-delonge.jpg

    This is awesome.
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 13
    perna wrote: »
    I already have the code, it works great, and I already have the logic and using it is pure bliss. So, this is all about sharing. It's too cool not to.

    Are you going to share the code?
  • EarthQuake
    This is crazy cool.
  • perna
    Offline / Send Message
    perna ngon master
    PogoP wrote: »
    Whilst that does look cool and like a fun little hobby project, I imagine it would be incredibly impractical to use in a working environment.

    I use it in a working environment. And that stuff was tight before I started meddling with controllers, to say that least. Now, no comparison, never going back.

    Interesting in hearing what you or anyone would consider impractical about it though. Remember I don't have a dog in this. If people get into this, I'll be happy to help, but if not, well I'm ok with being the coolest kid on the block yo

    Are you going to share the code?

    I don't have time, that's why I'm putting this out there, so others can steal this and work on their own versions. I am also ramping up to get a bunch of stuff out to you guys and I need to get into making videos and that. Next time, less alcohol and more sleep before recording VO. Live and learn
  • fearian
    Offline / Send Message
    fearian Polycount Sponsor
    I've windered about getting somethign like this for photoshop for a while - I dont use PS enough to justify the time though, and I never even considered max!

    Just a thought, but if you could put together a program that would organize these scripts and plugins neatly, I'd buy it! probably with a cheap controler too...
  • Nam.Nguyen
    Offline / Send Message
    Nam.Nguyen polycounter lvl 4
    So, are you telling me that 3D artists in the future is look like this ?


    warrengoldswain-nightclub-dj-playing-music-on-deck-with-vinyl-record-headphones-light-flare-clubbing-party-scene.jpg

    this is awesome man !


    .
  • Sam Hatami
    Offline / Send Message
    Sam Hatami polycounter lvl 11
    DJ-PERZ in da clubz! Looks very cool dude!

    It crossed my mind several times to use programble keyboards (such as http://xkeys.com/xkeys.php for instance). mostly so I can switch between right and left arm when either is starting to get overused. But I guess you're mostly aiming this towards control of the modelling environment? I can see this work very well as a fluent iteration process.

    Keep this shit up saaan!
  • perna
    Offline / Send Message
    perna ngon master
    EQ: Awesome, yes I think so too!

    fearian: I guess if a large amount of time passes by and no one else has turned this into a commercial product, we'll look at it. I would prefer that someone else run with it, because I don't think it would be a lot of fun to provide support for a product like that.

    Nam: lululu, no, like this:
    3-year-old-operating-an-excavator.jpg

    sam: cheaper solution - autohotkey and midi. For real, if your keyboard hand is getting tired, google all that posture and arm angle stuff and so on because that shouldn't be happening, mens. Also eat wheat and barley
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 9
    I'm at least wondering what DLL you use to drive this, and how you're accessing that in maxscript?
  • perna
    Offline / Send Message
    perna ngon master
    Xoliul wrote: »
    I'm at least wondering what DLL you use to drive this, and how you're accessing that in maxscript?

    dotnet.loadassembly:
    http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-24FFB4C6-B37D-4F37-89FC-54AED58B44C2.htm,topicNumber=d30e715652

    and for the DLL:

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd798495(v=vs.85).aspx

    In Max:
    Use DotNet.addeventhandler with the Dotnetobject you create

    logic:
    -I queue up messages for 100ms before sending an event
    -the event handler locks further event processing until it's done (sometimes functions are slow and you don't want these things running tandem)

    Building a DLL and using it in Maxscript:
    http://www.mrbluesummers.com/1392/3d-tutorials/c-sharp-to-maxscript
    http://www.gamasutra.com/view/feature/132174/integrating_maxscript_and_net_.php?page=3
  • Mark Dygert
    Also eat wheat and barley
    I hear this his comes in a convenient liquid form.

    Overall this thread is awesome, crazy awesome. I agree you're some kind of 3D ninjaneer...

    What I've been wanting since I learned Sign Language, is something that picks up hand signals and gestures. In general small gesture recognition is pretty lacking in comp-sci but its getting better. Most small gesture systems focus on the face or aim to replace everything using big gestures to do it all. Which just swaps out old limitations for new ones while getting rid of everything that worked. Swiping, pinching and expanding, touch-less tablet features like LEAP, it is neat but is it worth giving up everything that works?

    If it could team up with the mouse and supplement the keyboard instead of trying to replace it all, I think that could be really helpful. It could do this by watching the space above the keyboard. Move your hand into the live area and make a quick gesture, like swipe to activate the cut tool, or make the A shape to select all. Move it back down onto the keyboard and it ignores what your fingers are doing. You would just be throwing up quick movements in a set area and it fires off commands.

    It wouldn't need to know all ASL, we don't need to ask it out on a date or debate politics with it, so just recognizing the ASL alphabet would be enough. If it allowed for custom gestures on top of that it would open it up a lot more.

    Someday soon someone will get it all figured out and working, probably about the time someone makes something even cooler and more intuitive, ha.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 8
    Might be cool if say you gave it to an art director and the controller has been bound to profiles (so shader editing etc) and thats tweaking either your ingame shader for Max/Maya. Definitely sounds awesome and out of the box thinking in terms of ui access. Looking forward to the "Crank Graphics to 10" dial :P
  • perna
    Offline / Send Message
    perna ngon master
    For those who asked, and those who didn't:
    [ame=" keyboard with 3ds Max - YouTube[/ame]

    Mark Wheatboy: Thank you, and: Wouldn't that be unreliable with the non-touch interface?

    Haiddasalami: It should be an actual crank, the kind they used to start cars back when I was young
  • MoP
    Offline / Send Message
    MoP polycounter lvl 13
    I'm currently looking into Midi Dot Net (because I'm too lazy to write my own C# MIDI library) and it seems to work pretty well in 3dsmax.

    Will probably play around with inputs from my Novation controller tomorrow morning, should be fun :)

    -MoP
  • Pabs
    Offline / Send Message
    Pabs polycounter lvl 6
    any software out there for the non-programmer?
  • perna
    Offline / Send Message
    perna ngon master
    MoP: Oh, awesome find. I hope the information up there was some help. Does it help queue messages for you? Because I'm getting some instability when there's a LOT of messages coming in

    Keep posting your finds!
  • cman2k
    Offline / Send Message
    cman2k polycounter lvl 12
    giphy.gif

    this is just...nuts. I'll have to think on how I might use it practically....but damn if it's not cool.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 13
    Perna, actually I've had troubles getting it working because it uses a background thread (which midi.net creates internally) for processing event handlers.

    As far as I can tell there's no way to get those events back to max without writing custom max-specific C# event handlers since you can't do that in Maxscript (as far as I'm aware! please correct me if I'm wrong!).

    It assigns a timestamp to each midi message in the background thread so I guess it wouldn't be too difficult to queue them if necessary. I'll maybe have another look this weekend, it's turned into too much work for a morning before going into the office :)

    scapulator: I'd probably release one if I wrote it and it was any good (both of which are aspects of dubious likelihood).

    Regarding use cases, I thought that if you had a controller with lots of sliders/knobs then it'd be great for morph target blending :)
  • cman2k
    Offline / Send Message
    cman2k polycounter lvl 12
  • perna
    Offline / Send Message
    perna ngon master
    cman2k: Awes!

    I'm trying to hook this device up now. I'm not sure what its original purpose is. A relic of the 80s I suppose. Anyway it doesn't have native support for MIDI so it's a bit of a struggle
  • Computron
    Offline / Send Message
    Computron polycounter lvl 7
    Perna you crazy. I would love it if there was a board with dials and sliders and little screens for labels under each so that they could change with the context.
  • thomasp
    Offline / Send Message
    thomasp polycounter
    a 1988 demo of some software that may have been one of the fathers of what became maya. behold the use of dials (for materials and modelling!):

    http://vimeo.com/41349401
  • perna
    Offline / Send Message
    perna ngon master
    Thomas, that is brilliant! Knobs for extrusions, material properties - did you notice that the specular control was energy conserving?? AND a metalness specular control - in 1988! Bump maps, displacement, environment maps...

    The whole software is very impressive for 1988. That's quite a find - thanks for sharing!
  • fatihG_
    Offline / Send Message
    fatihG_ polycounter lvl 10
    [ame=" Driver Hack - YouTube[/ame]

    Wacom driver hack and foot pedals.
  • throttlekitty
    Offline / Send Message
    throttlekitty Polycount Sponsor
    Cool stuff, perna! I've wanted to do something like this for a long time. Whenever I get my hands on a 3d printer, I'd like to design something that would sit just to the left of my keyboard. Or even a series of knobs and sliders above the function keys. Ideally, I'd like to just have a special keyboard for modeling that matches what we do better with our hands.

    Edit: I used to have a keyboard that had a scrollwheel on the leftside, near the shift key. I miss that thing.

    You say you use it heavily, how much keyboard/controller dancing do you do with your hand?

    Footpedals would be neat, but I'm not sure how comfy that would be after long sessions. I'm thinking something more like this for 3d (twist and tilt)

    pogoball-1.jpg
  • Computron
    Offline / Send Message
    Computron polycounter lvl 7
    I got one of dem 3d mice and I love using the thing, but the problem is all the hand juggling you have to do between the keyboard and the control cap. I am in the same boat as throttle kitty
  • StateOfLux
    Hey guys, I made a tutorial & some project files for getting MIDI and iPad control into the max viewport, hopefully its helpful for getting started. You can use any sort of MIDI controller, doesnt have to be an iPad:

    http://stateoflux.net/?portfolio=wifi-midi-animation-in-3ds-max-via-ipad-osc
  • RonB1
    Hello Forum..

    i am happy that i found this thread... for hobby im a dj/music producer and was always used to controll most software with hardware controllers. as 3d artists (shading/lighting) i really miss this intuitive workflow and have bin thinking about this for a long time.. To all the people with negative reactions about this. i think you all are a little short sighted and not able to think out of the box. a keyboard is an device that`s made for typing letters not to control a complex interface as 3DS Max where you need to navigate in 3d space. So i believe there is plenty of room for improvements.. until the EEG Brain controllers are available i think this is a step i the right direction ;)
    Example ----> http://www.emotiv.com/


  • martinszeme
    Offline / Send Message
    martinszeme polycounter lvl 8
Sign In or Register to comment.