You are on page 1of 13

Blender Plugin Implementations for 3D Collaborative Work

Martin Lesage, Omar Cherkaoui, Faysal Abouzaid, Martin Poirier, Gilles Raîche, and Martin Riopel

Abstract— The development of networking and client/server files smaller than Maya files for a same graphic scene. The
systems over the Internet had led to many collaborative work Blender application has advanced embedded data structures
software applications. To extend the graphic design offering frontward and backward compatibility. This
collaborative platforms focused on 3D artistic characters, the application can also interface itself with Web services by its
Articiel project is based on the Articiel collaborative platform
that is a client-server application on the World Wide
Python[19] scripting API and the SOAPPy[21] module. This
Web(WWW) based on a SOA architecture. This platform is approach had been studied in the present paper, buy rejected
including the essential functionalities needed by communities of at the advantage of a wrapper Python/C++. The wrapper
distantly located artists to create and modify 3D characters or approach was selected for his higher level of reuse of the
graphic animations. The Articiel platform collaborative Maya plugin C++ code.
functionalities are: messaging, agenda, storing and retrieving The code kept was the Web services access routines and
artists’ projects and contributions. Previous work has proved
the usability of the Articiel platform by the programming of a
the project management routines. The contribution
Maya plugin who was calling the platform functionalities management had to be rebuilt form scratch. The contribution
through its web services. The aim of this paper is to show a new management programming is one of the major parts of this
contribution algorithm and the technical innovations resulting project and discussed in section 5.
of the plugin conversion from Maya to Blender. This paper is organized as follows: we will place the
subject in the background section in section 2, explain the
I. INTRODUCTION collaborative work platforms in section 3, and define the

T HE aim of the realization of the Blender plugin was the


fulfillment of the Canarie[8] organism request by the
Networking Research Laboratory for increasing the use of
contribution in section 4. The subject entry completed, we
will develop our solution of the Blender plugin
implementation in section 5. The results will be shown in
his CA*NET4 network by allowing more graphic artist section 6 by the use of the plugin for 3D legendary shaped
communities to exchange contribution and project files. The characters by Montréal city high school students. In section 7
Maya[17] graphic software was proprietary domain and its are presented the limitations of this project. Future work is
use was restricted to the organizations that could afford the proposed in section 8. The work and results described in this
licence fees. A request was made to build SOA architecture paper have been accepted for a master degree thesis[15].
based plugin for the Blender Software that is similar to Maya
but in the public domain software using a GPL license free of II. BACKGROUND
utilisation. The wide Blender community of users and the Extensive tests and experimentation by graphics artists’
support given by the Blender organization was an asset to this communities had proved the reliability of the Articiel
project that allowed many students of different schools to Platform and the user friendliness of the Maya plugin. One of
participate in a collaborative creation of 3D characters in the major limitations of this approach was that the Maya
Blender. application is a proprietary software and its buying costs are
The Blender application is free of utilization and has a expensive. That limitation was denying some users to use the
rapid execution. It is used by a wide community of artists Articiel platform for 3D characters creation and animation
doing 3D drawing and graphic animations. It doesn’t have an collaborative work project. The aim of this project was to
explicit graphic scripting language like Maya making Blender develop a Blender plugin that have exactly the same
functionalities than the Maya plugin and could do
Manuscript received March 15, 2007. collaborative work by calling the Articiel Platform Web
Omar Cherkaoui and Martin Poirier are with the Université du Québec à
services. The Blender artistic 3D character and graphics
Montréal’s Networking Research Laboratory of the Computer science
Department, PO BOX 8888, Downtown Branch, Montreal (Quebec) H3C animation public domain software is free of utilization.
3P8 – CANADA. Phone (514) 987-3000 Ext.: 6189 Fax: (514) 987-8477 In that context a conversion of the Maya Articiel Plugin to
(e-mail: cherkaoui.omar@uqam.ca; poirier.martin.6@courrier.uqam.ca) a Blender Articiel plugin was done. The challenge was that
Martin Lesage, Gilles Raîche and Martin Riopel are with the Université
du Québec à Montréal’s Education Department, PO BOX 8888, Downtown the APIs of Maya and Blender were different. We couldn’t
Branch, Montreal (Quebec) H3C 3P8 – CANADA. Phone (514) 987-3000 recompile the Maya C++ code in the Blender API and
Ext.: 8982 Fax: (514) 987-4608 (e-mail: lesage.martin.3@courrier.uqam.ca; continue further studies of the problem. The MAYA API is
raiche.gilles@uqam.ca; riopel.martin@uqam.ca)
Faysal Abouzaid is a Ph.D. student in computer science at the École based on the MEL(Maya Embedded Language) scripting
Polytechnique de Montréal, PO BOX 6079, Downtown Branch, Montreal language that is describing the operations applied on the
(Quebec) H3C 3A7 – CANADA. Phone (514) 340-4711 (e-mail: graphic objects. Collaborative functionalities could be added
mohamed-faical.abouzaid@polymtl.ca)
to Maya by plugins made in the Microsoft .NET Visual C++
programming environment. The Blender API is different and
based on the Python[19] language. It doesn’t have a specific
dedicated graphic operation scripting language. The Blender
plugins are only applicable for texture and sequence and are
developed in the LCC/GCC environment. They don’t support
that kind of architecture. We had to study the Python API to
transpose the contribution problem in the Blender Python API
programming environment

III. COLLABORATIVE WORK PLATFORMS


The Articiel platform is a Web server application
regrouping many Web services programmed in the Microsoft
C++ .NET software development package. The Articiel
platforms allows allow groups of users assigned in
communities and studios to work and exchange contributions
simultaneously in real time situation. An artist session uses
the Articiel platform collaborative application to exchange
files and contributions with other artists. The platform
collaborative application enable the user to perform a work
session (login and logout), to exchange files and contributions
with other users (dataflow management), to add comments to Fig. 2. Articiel layered web services architecture[5][13][14]
his work (annotation) and to communicate with other artists
by an electronic agenda and mailboxes (workflow IV. CONTRIBUTION DEFINITION
management). The platform can be accessed by a Web The Articiel platform provides a distributed collaborative
browser or by a plugin as shown in figure 1. Due to its trivial work platform over the Internet for 3D wiremesh graphics
operation mode, the Web browser access will not be projects and animations as shown in figure 3. The Articiel
considered in this paper. platform manages artist’s projects and contributions. An artist
project is a graphic scene or an animation that usually
includes 3D characters evolving in a background. The Maya
Collaborative Collaborative Collaborative project files have the “.MB” extension while the Blender
application 1 application 2 application n project files have the “.BLEND” extensions.
(web browser (plugin access) (plugin or web
access) browser
access)

Articiel platform

Fig. 1. Articiel platform collaborative model[14]

The Articiel collaborative platform has layered software


architecture. All of its Web server applications are
implemented in Web services. The plugin software developed
for the Articiel platform is entirely base on calls to its Web Fig. 3. An user contribution modifying the nose[16]
services. Figure 2 illustrates the platform project, session and
In the Articiel collaborative platform context, an artist
file management through software layers. The functionality
contribution is the smallest component of work that the artist
layer enables the user’s registration functionalities (login and
logout) and the files annotation (comments describing the could do to a 3D character. The contribution is generally a
slight modification of a 3D character body part (head, limb,
contributions). The service composition layer manages the
arm, head, nose, etc.). Figure 3 illustrates an artist
Web services with the UDDI repository. The High-level
contribution that is a 3D character nose enlargement. For
services layer manages the artist’s contribution and project
computer processing, the contribution will be a small text file
files. This level also identifies the artist studio and
containing software application script or numerical data. The
community. The common services layers implements the chat
Maya 3D software application contributions files contains
and mailbox services. The low level files storage on the Web
MEL (Mata Embedded Language) script describing the
server is managed by the Data level.
modification (Ex.: select –r Setup.vtx[24:168]
return False
Setup.vtx[1321:1324], …, etc.). The Blender 3D software
application contribution files contains a list of data self.sendUserData()
val = Wrapper.NewLog()
representations of the 3D characters’modified vertex (Ex.: self.File = open(Wrapper.getLogPath(), "w")
return val
295 [0.0027, 0.0013, 0.000], 309 [0.2123, 0.1001, 0.000], …,
def stopContribution(self):
etc.). In both case, the contribution file is recording in the text if not self.OldMesh:
file the displaced wiremesh vertex resulting of a 3D character return

body part modification. Contribution = ""


BLENDER.Window.EditMode(0)

mesh = GetMesh(self.getPerson())
if not mesh:
return False

file = self.File

if len(mesh.verts) != len(self.OldMesh.verts):
print "Vertex added or remove from mesh:"
print "Cannot calculate and send contribution"
Fig. 4. Articiel contribution reentrancy[14] Error("Calculating Contribution")
return False

for i in range(len(mesh.verts)):
An Articiel project contribution has reentrancy properties: v2 = mesh.verts[i].loc
v1 = self.OldMesh.verts[i].loc
the same contribution can be applied several number of times if v1[0] != v2[0] or v1[1] != v2[1] or v1[2] != v2[2]:
to the same character resulting a repetition of the modification Contribution += str(i) + " " + str(v2 - v1) + "\n"

that increase or decreases in magnitude the targeted part of file.write(Contribution)


file.close()
the 3D character as shown in figure 4. A contribution applied self.OldMesh = None
return True
at a 3D character can also be applied to a different character
as long as both characters have the same number of vertex.
V. BLENDER PLUGIN IMPLEMENTATION
The Blender plugin implementation started with the study
of the Maya plugin code and the Blender programming API.
Some preliminary tests were done with the SOAPPy module
but this option would have led the programming team to
rewrite all of the Maya plugin code accessing the Web
services. An other option was studied which was a
Python/C++ wrapper that is the adopted solution and led us to
reuse all the Web C++ code implementing the Web services
access.
A. UserInterface

Fig. 5. Geometrical 3D model of the Blender contribution[15]

The first number of a line of the text file is the


number of the modified vertex. The numbers in brackets are
the vertex changes for the three dimensional X, Y and Z
coordinates. The resulting vertex difference is: ∆i = vi’ - vi as
demonstrated in figure 5. The following difference can be
expanded over the x, y and z coordinates :

∆ix = vix’ - vix


∆iy = viy’ - viy
∆iz = viz’ - viz Fig. 6. Articiel platform user interface[13]
The following Python code function describes the The Blender plugin user interface is a window of the
generation of the contribution in Blender. This code records Blender user interface. The interface enable the artist to start a
the list of the modified vertex of the 3D character in a text session on the Articiel Platform with a login process and also
file: to quit the session. The Articiel session enable the artist to do
collaborative work in real time simultaneously with the other
def startContribution(self):
BLENDER.Window.EditMode(0) logged users. The plugin also enable the Artist to exchange
self.OldMesh = GetMesh(self.getPerson())
projects and contributions while they are working in a session
if not self.OldMesh:
as illustrated in figure 6. must have been obliged to rewrite the 10 000 lines of the
Maya plugin C++ code in Python.
B. Functionalities
The Blender plugin is an extension of the Blender software
BLENDER
enabling it to assess the functionalities of the Articiel Software
platform within a work session (buttons “Start Articiel and Python script
“Exity Articiel”). The functionalities of the plugin enable the
Blender application to do collaborative work by the exchange SOAPPy Web services client
over the Internet of contribution(buttons “Get Studio
Contribution”, “Get Author Contribution”, “Continue to Requests Responses
Capture” and “Stop and Submit”) and project files(buttons
“Save Project” and “Get Project” asd shown in figure 7. Articiel platform Web services
Articiel platform

Fig. 9. SOAPPy Architecture

E. The realized wrapper C++/Python


The architecture shown in figure 10 is a Python/C++
wrapper. This is the realized architecture implementing the
Fig. 7. Articiel platform functionalities buttons[13][15]
actual plugin with a 90% reuse of the Maya C++ plugin code
that was accessing the Articiel Web services.
C. General model of the plugin
The Blender plugin is an extension of the Blender software. BLENDER
Software
Figure 8 shows that the plugin enable the graphic artist to
Python Script
access the Articiel platform functionalities to save and («Articiel.py»)
retrieve contribution («.LOG» extension files) and project Wrapper Python/C++(«wrapycpp.cpp»)
files («.BLEND» extension files) on the Articiel server shared
C++ Code(«artwscpp.cpp»)
disk space.
Requests Responses

Articiel Platform Web Services (WSDL)


Plugin Plugin
Articiel Platform
Fig. 10. Wrapper C++/Python Architecture
Blender 2.36 Blender 2.36
VI. RESULTS
Workstation Workstation
Artiste #1 Artiste #2 The overall project and the technical aspects were leaded
by Professor Omar Cherkaoui of the Laboratoire de
Téléinformatique de l’université du Québec à Montréal
Contribution files Contribution files providing the plugin programming team and Articiel platform
(.LOG) (.LOG) hosting. The collaborative design of 3D legendary shaped
Projet files .BLEND) Projet files .BLEND) characters by students teams was supervised by Professor
Louise Poissant of the Groupe de Recherches en Arts
Médiatiques (GRAM) of UQAM[13]. The graphics
characters had to represent two strong men of the Quebec
province, the “Grand Antonio”[12] and the “Géant
Articiel Platform
Beaupré”[10] as shown in figure 11.
http://www.teleinfo.uqam.ca/articiel_05/ Professor Louise Poissant was assisted by Yves Amyot
who was in charge of the realization of 3D character design
by a high school student with the Articiel platform. He was
Fig. 8. Plugin interaction with Articiel Platform[13][15]
helped by Gisèle Trudel who was in charge of supervising the
design teams developing 3D characters within collaborative
D. The studied SOAPPy solution sessions with the Articiel plugin for Blender. Technical
The architecture shown in figure 9 was studied but rejected assistance, Blender software installation and plugin
even though the SOAPPy[21] module could enable the installation was provided by the programming team of the
Python API of Blender to access directly the Articiel platform Laboratoire de Téléinformatique[13].
Web services. This approach was tested but the programmers
The Artgrid server is implemented on the Canarie CA*NET4
network with Lightpath fiber optical nodes[8].
A. Proposed architecture to access grid Web services with
pyGlobus
Our experimentation of the SOAPPy module proved that
the Blender Python API can access the Globus Grid Web
services by the pyGlobus module as described in figure 12.
The time allowed to realize the project will have to include
the conversion on the 10 000 C++ lines of the Maya plugin
code in Python.
BLENDER
Software
Python Script

SOAPPy Web services client


Fig. 11. Plugin utilization for 3D characters generation[13] pyGlobus Module
Requests Responses

ArtGRID Grid Web Services(GWSDL)


VII. LIMITATIONS
ARTGrid Platform
The Blender plugin described in this paper despite its GLOBUS Grid manager
flexible SOA architecture is only interacting with the Articiel Fig. 12. SOAPPy architecture for Grid applications
collaborative platform belonging to the Laboratoire de
Téléinformatique de l’Université du Québec à Montréal B. Proposed architecture to access grid Web services with
(UQAM). The number of users that could use the application a wrapper
is restricted because the user must be registered in the The Python/C++ wrapper can access the Artgrid Web
platform. services by C++ functions enabling the execution of Grid
The graphic artists are currently using 3D graphic Web servicesas shown in figure 13.
authoring software applications like Maya[17] and
BLENDER
Blender[4]. The project leaders should consider the change Software
management considering traditional to collaborative work Python Script
and also collaborative platforms and the use of a specific
plugin. Our experimentation of this plugin with graphic artists Python/C++ Wrapper
has led us to give formation sessions to the communities of C++ Code
artists to improve the understanding of the plugin. Requests Responses
The Blender plugin have exactly the same functionalities
than the Maya plugin. The experimenters made no ArtGRID Grid Web Services(GWSDL)
improvements or modifications to the Articiel platform and Plateforme ARTGrid
collaborative work techniques.The Blender plugin have been GLOBUS Grid manager
developed in the Windows XP environment. During our Fig. 13. C++/Python architecture for Grid applications
experimentation with graphics artists, we encounter some
installation problems with DLL files when the software was C. ArtGRID supporting network
installed on a Windows 98 environment. Figure 14 shows the Canarie CA*NET4 network with
The contribution nature is different and specific to an Lightpath fiber optical nodes. This network has linked the
application. The Blender and Maya contribution files are UQAM, Ryerson and Emily Carr Institute of Arts and Design
different and a Maya contribution could not be retrieved in (ECIAD) universities in the Artgrid project. Future
Blender nor the inverse. Further work in the standardization applications and conversion of the Blender and Maya plugin
of API and scripting language of 3D graphics authoring for the Grid using the GLOBUS grid manager will use this
software(Blender, Maya, Softimage, OpenFX, Unigraphics network at its full extent[18].
NX, …) could enable greater compatibility, file exchange and
collaborative work between these applications.The plugin
must be completely recompiled to work on Linux, MacOS
and other platforms or operating systems.

VIII. SUMMARY AND FUTURE WORK


The Artgrid project is a Grid extension of the Articiel
project. The Articiel server can be accessed over the Internet.
[13] A. Kabbaj, and J. Martin, “Articiel rapport final: Programme du
contenu électronique de Canarie”. Laboratoire de recherche de
téléinformatique de l'UQAM, project CP-60, 62pp., 2005.
[14] Laboratoire de Recherche de téléinformatique, “ARTICIEL :Rapport
final”. Montréal(Qué.): Laboratoire de recherche de téléinformatique
de l'UQAM, 62p., 2004
[15] M. Lesage, “Le développement d’un plugiciel de travail collaboratif
pour la plateforme Articiel”. Master’s Degree thesis. Montréal :
Université du Québec à Montréal, U5564, 90pp., 2006.
[16] J. Martin, S. Boutemedjet, O. Cherkaoui, L.Poissant & M. Fleury, “The
Coordination and Collaborative Process in New Media Projects Using
ARTICIEL”. New Media Research Networks Conference, 4pp., March
2004.
[17] Maya.(2005). Available at: http://www.aliaswavefront.com
[18] pyGlobus. (2005). Available at:
http://dsd.lbl.gov/gtg/projects/pyGlobus/
[19] Python. (2005). Available at http://www.python.org
[20] K. Saar, “VIRTUS: A Collaborative Multi-User Platform”. Virtual
Reality Modeling Language Symposium, p.141-152., Feb 1999
Fig. 14. The Canarie CA*NET4 network[13] [21] SOAPy. (2005) Available at: http://sourceforge.net/projects/soapy
[22] Unigraphics(UGS). (2005). Available at : http://www.ugs.com/
[23] Uni-Verse . (2005) Available at : http://www.uni-verse.org/

IX. CONCLUSION [24] Verse. (2005). Available at : http://www.blender.org/modules/verse

This paper described our work is the conversion of a Maya


plugin Microsoft Visual C++ code to a Blender wrapper
C++/Python software application. The main part of our work
was that the code could not be directly transposed and
recompiled in a plugin for Blender because Blender does not
directly support that kind of plugin architecture. The
programming team had to learn the Python API of Blender
and do scientific research to implement the contribution in
Blender’s Python scripting API. We found two ways to
access Web services with the Python API, the first approach
was with the module SOAPPy that was rejected by the
obligation to rewrite all the plugin C++ code in Python. The
second and adopted approach was to write a Python/C++
wrapper that allowed the team to reuse 90% of the Maya
plugin web services C++ code access routines.

REFERENCES
[1] Alienbrain. (2005). Available: http://www.alienbrain.com.
[2] D. Bergal. (2002). “Advantages of Jabber as a Platform for
Developping Collaborative Applications”. Available at
http://www.jabber.com/media/Jabber_Advantages.pdf
[3] F. Bergenti, A. Poggi, and M. Somacher, “A collaborative platform for
fixed and mobile networks”. Communications of the ACM, Vol. 45, No.
1, pp.39-44, Nov 2002.
[4] Blender. (2004). Available at http://www.blender.org
[5] S. Boutemedjet, “Conception d’une plateforme collaborative de
création de personnages 3D à travers le Web”. Master’s Degree thesis.
Montréal : Université du Québec à Montréal, M8167, 150pp., 2003.
[6] S. Boutemedjet, “ARTICIEL: Document de spécification des nouveaux
besoins de la plateforme Articiel”. Laboratoire de recherche de
téléinformatique de l'UQAM, 17pp., 2003.
[7] S. Boutemedjet, ARTICIEL: “Overall requirements and design
descriptions”. Laboratoire de recherche de téléinformatique de
l'UQAM, 12pp., 2002.
[8] Canarie. (2005). Available at http://www.canarie.ca
[9] C. D. Cera, W. C. Regli, I. Braude, Y.Shapirstein & C.V. Foster, “A
Collaborative 3D Environment for Authoring of Design Semantics”.
Drexel University Technical report, DU-MCS-01-06, 16pp., 2001
[10] Géant Beaupré. (2005). Available at
http://collections.ic.gc.ca/beaupre/prommf41.htm
[11] Globus. (2005). Available at http://www.globus.org/
[12] Grand Antonio. (2005). Available at
http://www34.brinkster.com/noxfr/pages_blog/articles/t-29.html
Fig. 2. Articiel layered web services architecture[5][13][14]

Fig. 3. An user contribution modifying the nose[15]


Fig. 4. Articiel contribution reentrancy

Fig. 5. Geometrical 3D model of the Blender contribution[15]


Fig. 6. Articiel platform user interface[13]

Fig. 7. Articiel platform functionalities buttons


Plugin Plugin

BLENDER 2.36 Application BLENDER 2.36 Application

Artist #1 computer Artist #2 computer

Contribution Contribution
(vertex coordinates differences) (vertex coordinates differences)
Project (.BLEND files) Project (.BLEND files)

Articiel platform web services


http://www.teleinfo.uqam.ca/articiel_05/

Fig. 8. Blender plugin interaction with the Articiel Platform

BLENDER
Software
Python script

SOAPPy Web services client

Requests Responses

Articiel platform Web services


Articiel platform

Fig. 9. SOAPPy Architecture


BLENDER
Software
Python Script
(«Articiel.py»)
Wrapper Python/C++(«wrapycpp.cpp»)

C++ Code(«artwscpp.cpp»)

Requests Responses

Articiel Platform Web Services (WSDL)


Articiel Platform
Fig. 10. Wrapper C++/Python Architecture

Fig. 11. Plugin utilization for 3D characters generation[13]


BLENDER
Software
Python Script

SOAPPy Web services client


pyGlobus Module
Requests Responses

ArtGRID Grid Web Services(GWSDL)


ARTGrid Platform
GLOBUS Grid manager

Fig. 12. SOAPPy architecture for Grid applications

BLENDER
Software
Python Script

Python/C++ Wrapper
C++ Code
Requests Responses

ArtGRID Grid Web Services(GWSDL)


Plateforme ARTGrid
GLOBUS Grid manager

Fig. 13. C++/Python architecture for Grid applications


Fig. 14. The Canarie CA*NET4 network[13]

You might also like