mypaint / mypaint

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.
https://mypaint.app
GNU General Public License v2.0
2.69k stars 387 forks source link

[Feature Request] - Get networked collaboration working in mypaint #67

Open git-it-done opened 10 years ago

git-it-done commented 10 years ago

Mypaint currently has no networked collaboration features. I would like to change this. I was thinking that server mode and client mode should be available and that multiple clients should be able to connect as long as the server approves the handshakes. Passwords for security?

There are many ways this might be implemented, and I would appreciate any and all input.

  1. Send only the stroke information
    • This could be a stream
    • Or large packets of many strokes once a thresh-hold of changes or time has been met
  2. Send a layer
    • maybe def __deepcopy__ could take a layer and push that
      • In this situation, layers would probably be owned by one of the connections
  3. Send changed tiles
    • Only send tiles which have been modified.
  4. Other

Thoughts? Any source files recommended as starting points? Security concerns?

achadwick commented 10 years ago

Off the top of my head here.

Sending changed tiles sounds like the best approach here (tiled data currently contains the strokemap info too, in a different place: maybe good for sharing brushes via the working doc.

You'd also have to share the undo stack state; the current abstractions should suffice provided you're not exchanging whole snapshots.

Synchronizing simultaneous brushwork-mode accesses to the same tiles would be about as awkward as synchronizing access to the undo stack.

For auth, a shared secret string would work. Not stored in the doc, but established whenever someone opens their ports.

I'd sort of like this to be done as a plugin (an idea we knocked around a while back, but it got overtaken by the GTK3 port).

We'd also need to tidy up the internal APIs a bit and... make them an actual documented API. But it's doable. Post-1.2, I think...

Marand- commented 10 years ago

I never even considered asking for this, but I wish I had a long time ago. It's something I wish more programs would implement, not just art ones. It would be especially awesome with MyPaint due to the infinite canvas; just an infinite whiteboard for brainstorming sessions.

The only implementations of online collaborative image work I can think of:

None do infinite canvas, but they could still be useful for some sort of reference, especially Drawpile. Since Drawpile's dev is back at it again after a hiatus, there could be some potential for collaboration, too.

git-it-done commented 10 years ago

So here are my thoughts.

  1. (maybe by 1.2?) get an ugly and slow, completely experimental full-layer network push working.
    • Is there a relatively straightforward way to get and set layer data as a large 2d array that could act as a proof of concept?
    • The layer should be locked on the other user's instance, and update on a timer or something.
    • This should be done such that all the network code (if possible) is in one place and can eventually be migrated without having hooks.
    • I already have two mypaint instances talking locally. :)
  2. (post 1.2) get plug-in system working
    • Don't optimize until the target method is usable. It sounds like the plug-in system will is a definite goal.
  3. migrate to plug-in system
    • Optimization and migration may happen at the same time. At the very least this being a plug-in for the system might guide plug-in system needs.
  4. Optimize for only the diff of tiles
    • Send as zlib compressed base64 data
  5. Make it interoperable with networked krita (I'm working on this too).
horkana commented 9 years ago

Do people still do WebDAV? It's not full realtime collaboration on a shared drawing space but maybe it would be an easier thing to implement in the short term?

AtsusaKaneytza commented 9 years ago

There's another opensource program called "Drawpile" that seems to be geared towards what you're talking about here: http://drawpile.net/about/ I learned about it on the MyPaint site.

Maybe some info can be exchanged between the two, because Drawpile doesn't support pressure sensitivity from my Monoprice tablet like MyPaint does.

0ion9 commented 9 years ago

@AtsusaKaneytza : Drawpile's failure to support non-Wacom tablets is all due to Qt's failures, much as MyPaint's ability to support non-Wacom tablets is mostly due to GTK's abilities. Krita had to do their own tablet handling in order to support non-Wacom tablets properly, and they use Qt, so they would be much more relevant to Drawpile's problems than MyPaint.

jeisner commented 9 years ago

Those of you who are interested in this extension -- I independently sketched out some design ideas on #480. @achadwick correctly marked that as a duplicate, but please have a look.

Above, @achadwick noted:

Synchronizing simultaneous brushwork-mode accesses to the same tiles would be about as awkward as synchronizing access to the undo stack.

and these two issues were my focus on #480.

odysseywestra commented 4 years ago

Triage Note: Moving to Limbo for now since this Feature Request is technically is out-of-scope for MyPaint atm.

odysseywestra commented 4 years ago

@git-it-done Could you move this thread over to https://community.mypaint.org/c/feature-requests? I'm working on cleaning up the issue tracker by move all feature requests there so we can get community feedback. If you can also set your post as a wiki that way we can edit the scope of the feature request that would be awesome as well. Don't forget to link back to here as well so I can keep track of it incase we need to reopen the issue.

juliapath commented 4 years ago

Having this would be really nice. Much nicer than Zoom's or BigBlueButton's whiteboards. I think MyPaint could be really suitable for collaborative learning and 1:1 teaching.

jplloyd commented 4 years ago

@janpath Have you tried drawpile (https://github.com/drawpile/Drawpile/)? It is geared specifically for collaborative use, and is from my experience a very competent program (as well as being free/open source). It is also available for Windows/OSX as well as Linux.

I think it's unlikely that MyPaint will see networked collaboration implemented any time soon.