RPi Game Dev: Using a Graphics Tablet with your Raspberry Pi
May 25, 2020 00:25 · 971 words · 5 minute read
OK, so in this video we’re going to look try to use a graphics tablet with the Raspberry Pi, which is a really useful thing if you’re getting serious with game dev. If you’re wanting to do the art side, if you want to do 2d or 3d art. Because mouse and keyboard doesn’t really cut it for a lot of those art tasks. And I’ve been looking at using… this is what I’ve got, which is quite an old model. It’s a Wacom Graphire 4 tablet and I’m gonna assume anyone using a graphics tablet for game dev with a Raspberry Pi is probably going to be using either and old tablet or certainly a budget one.
If you’ve got the 00:38 - money to spend on a really expensive graphics tablet chances are you’ll be using a more powerful computer than a Raspberry Pi. But we’re on a budget here with Raspberry Pi, and we’ve got a tablet and this is the pen that comes with the tablet, and it’s got a nib and it’s also got an eraser. It’s going to be useful for drawing assuming we can get it all set up. I did try this previously and as soon as I plugged in the tablet it worked as a pointer. So without doing anything I can use my graphics tablet here as a mouse effectively.
But it didn’t all work quite perfectly 01:13 - and I didn’t have all the features so I wasn’t able to use for example the eraser side of the pen. What I did was, I found in Add/Remove software, I found there is this additional input driver you can get for the Wacom tablets and pens that… [I] opened Add/Remove software, typed in “Wacom” and down at the bottom was this one. The other files here we’re actually installed already maybe from when I’d first plugged in the tablet but this one wasn’t so I added this one and installed this. Having done that without really doing anything else, as soon as I opened GIMP I found that it did start to recognize things a bit better.
So let’s open a new file and again I’m still using my pen for this 01:56 - so I’m not going near the mouse. I’ve got this massive brush just now…. that’s a bit smaller and so we’re using pen just now and I can draw a nice wiggly lines and that’s working OK. It’s definitely recognizing the pen and working and it’s also recognizing the eraser end but it’s just drawing the exact same. So let me turn this to actually use the eraser and turn the pen over, and it’s still on eraser. So it’s, you know, treating both ends of the pen the same.
So we want to actually enable this so we have to go into… if we go to the Edit menu and we go to Input Devices… Now when I first did this before I installed the driver it showed two of these three inputs here. So it showed me the tablet - and we want to switch this from “disabled” to “screen” and also showed the pen, the brush, and again switch that from “disabled” to “screen”. And this one [eraser] didn’t show up until I installed the drivers. This is the eraser side of the pen.
03:20 - And again switch this from “disabled” to “screen”. If I save that and then close that, and now that’s me using the nib, the pen, turn over to use the eraser and it’s… So I’ve now got two separate tools so I can separately select tools for, you know so the eraser might be this brush and then the nib could be there so I can customize what two brushes or tools I want to have when I, for my pen. So just by swapping the pen over I can use the eraser side to erase and the brush side or the nib side to do my painting and drawing. But it’s still not really acting like a tablet. It’s or sorry, like a pen.
It’s not noticing or paying any 04:15 - attention to how firmly I use the pen so I’m really not getting the full benefit. So I need to come down here and choose dynamics and we can choose “basic dynamics” And now, let me try if I gently use the pen we can see it’s quite faint, If we lean quite hard we can see it’s much firmer. So if I start being hard it… and if I just brush faintly and it’s like a wash and let’s see what if I do the same thing with the eraser. Lean quite hard with the eraser and go in a circle or lean quite gently with eraser… So again the effect is pressure sensitive now so It’s going to give me a much better painting and drawing experience with brushes that, you know are pressure sensitive as well as being able to quickly switch between erasing and drawing, and to really set up the brushes in a much more natural way.
There’s also a menu if I click down here 05:27 - there’s a mapping matrix that gives me a lot more control over how I set up the brush and I’m going to leave this alone because I’m far too amateur to really get involved in that. But I think that all I need to cover just now we’ve got a tablet, plug it in, works straightaway. Install a driver to get access to the full features and then it was, like for each app we may need to set up how our pen behaves to get the best out of out of the pen. That’s all and more coming up shortly. .