[Soc-2010-dev] status report (fancy input devices)

Mike Erwin significant.bit at gmail.com
Sun Jun 6 00:11:03 CEST 2010

Sorry about the delayed report -- internet access has been flaky.

Tom pointed me to a bug involving Intuos mice on the Mac, which I reproduced
on Intuos and Graphire. This week I dug deeper into tablet pen and tablet
mouse events. I now have a much better understanding of trackpad, standard
mouse, pen, eraser, and tablet mouse behavior on the Mac.

Built a tablet prototyping app in Cocoa to quickly test ideas. So far I've
got all input devices listed above working great, building strokes similar
to blender's grease pencil. The foundations of this app will migrate to the
Mac event handler in ghost.

When grabbing all input events (coalesce = off), the stroke lags the pen but
is very smooth. When coalesce = on (OS default), the stroke keeps up with
the pen by dropping points. Filtering the uncoalesced points with a simple
distance threshold gives a nice balance of performance and precision. Grease
pencil has such a filter, and brushes have a 'spacing' value. I'm
investigating a way to filter these at a lower level, so they don't flood
blender's event queue just to be discarded by the tool. Suggestions are very

Worked on erasing strokes as marks (instead of as data structure). After
projecting the strokes to screen space, I then project the cursor position
onto stroke segments (in 2D) to determine contact. The existing eraser works
only at endpoints, which works ok for curves but terribly for straight
lines. The math and hit test are in place, but it's not yet erasing.

Each platform has its own way to talk to tablets. I'm most familiar with the
Mac, but it is my duty to get the others on board as well. Got a great lead
on Linux tablet development at the Linux Wacom Project. Everything in my
proposal (regarding tablets) seems possible now on Linux. Downloaded sample
code for Windows tablets using the WinTab interface, but haven't yet
absorbed that.

Next Week:

Try to reproduce that wacom mouse bug on Windows, then squash it.

Study blender's Windows and X event handlers to see how they differ from the
Cocoa handler.

Continue work on natural erasing. This involves splitting or deleting
strokes (which blender already does) and adjusting stroke segment endpoints
(which it doesn't).

One of my deliverables is a web page about setting up and using these fancy
devices with blender. I'll start putting notes, links, experiments and works
in progress online. Already have a domain and web host, but allow me to get
some content up before linking.

Catch up on my commit backlog! Internet connection has been hit-or-miss (I
live in a remote area), so I've arranged to work from the university's
graphics lab starting next week.

On Track?

This week was slower than I liked, but had no major setbacks (beyond missing
rent -- hurry, Google payment cards!). I didn't get around to SpaceNav or
NDOF events as planned, instead spending most time on bulletproof
pen/eraser/mouse handling.

Mike Erwin
musician, naturalist, pixel pusher, hacker extraordinaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2010-dev/attachments/20100605/36f240c0/attachment.htm 

More information about the Soc-2010-dev mailing list