Upload
maria
View
221
Download
0
Embed Size (px)
Citation preview
8/14/2019 blender pluging implementation
1/13
Abstract
The development of networking and client/serversystems over the Internet had led to many collaborative worksoftware applications. To extend the graphic designcollaborative platforms focused on 3D artistic characters, theArticiel project is based on the Articiel collaborative platformthat is a client-server application on the World WideWeb(WWW) based on a SOA architecture. This platform is
including the essential functionalities needed by communities ofdistantly located artists to create and modify 3D characters orgraphic animations. The Articiel platform collaborativefunctionalities are: messaging, agenda, storing and retrievingartists projects and contributions. Previous work has proved
the usability of the Articiel platform by the programming of aMaya plugin who was calling the platform functionalitiesthrough its web services. The aim of this paper is to show a new
contribution algorithm and the technical innovations resultingof the plugin conversion from Maya to Blender.
I. INTRODUCTION
HEaim of the realization of the Blender plugin was thefulfillment of the Canarie[8] organism request by the
Networking Research Laboratory for increasing the use ofhis CA*NET4 network by allowing more graphic artistcommunities to exchange contribution and project files. TheMaya[17] graphic software was proprietary domain and itsuse was restricted to the organizations that could afford thelicence fees. A request was made to build SOA architecture
based plugin for the Blender Software that is similar to Maya
but in the public domain software using a GPL license free ofutilisation. The wide Blender community of users and thesupport given by the Blender organization was an asset to this
project that allowed many students of different schools to participate in a collaborative creation of 3D characters inBlender.
The Blender application is free of utilization and has arapid execution. It is used by a wide community of artistsdoing 3D drawing and graphic animations. It doesnt have anexplicit graphic scripting language like Maya making Blender
Manuscript received March 15, 2007.Omar Cherkaoui and Martin Poirier are with the Universit du Qubec
Montrals Networking Research Laboratory of the Computer scienceDepartment, PO BOX 8888, Downtown Branch, Montreal (Quebec) H3C3P8 CANADA. Phone (514) 987-3000 Ext.: 6189 Fax: (514) 987-8477(e-mail: [email protected]; [email protected])
Martin Lesage, Gilles Rache and Martin Riopel are with the Universitdu Qubec Montrals Education Department, PO BOX 8888, DowntownBranch, Montreal (Quebec) H3C 3P8 CANADA. Phone (514) 987-3000Ext.: 8982 Fax: (514) 987-4608 (e-mail: [email protected];[email protected]; [email protected])
Faysal Abouzaid is a Ph.D. student in computer science at the colePolytechnique de Montral, PO BOX 6079, Downtown Branch, Montreal(Quebec) H3C 3A7 CANADA. Phone (514) 340-4711 (e-mail:[email protected])
files smaller than Maya files for a same graphic scene. TheBlender application has advanced embedded data structuresoffering frontward and backward compatibility. Thisapplication can also interface itself with Web services by itsPython[19] scripting API and the SOAPPy[21] module. Thisapproach had been studied in the present paper, buy rejectedat the advantage of a wrapper Python/C++. The wrapperapproach was selected for his higher level of reuse of theMaya plugin C++ code.
The code kept was the Web services access routines andthe project management routines. The contributionmanagement had to be rebuilt form scratch. The contributionmanagement programming is one of the major parts of this
project and discussed in section 5.This paper is organized as follows: we will place thesubject in the background section in section 2, explain thecollaborative work platforms in section 3, and define thecontribution in section 4. The subject entry completed, wewill develop our solution of the Blender pluginimplementation in section 5. The results will be shown insection 6 by the use of the plugin for 3D legendary shapedcharacters by Montral city high school students. In section 7are presented the limitations of this project. Future work is
proposed in section 8. The work and results described in thispaper have been accepted for a master degree thesis[15].
II. BACKGROUNDExtensive tests and experimentation by graphics artists
communities had proved the reliability of the ArticielPlatform and the user friendliness of the Maya plugin. One ofthe major limitations of this approach was that the Mayaapplication is a proprietary software and its buying costs areexpensive. That limitation was denying some users to use theArticiel platform for 3D characters creation and animationcollaborative work project. The aim of this project was todevelop a Blender plugin that have exactly the samefunctionalities than the Maya plugin and could docollaborative work by calling the Articiel Platform Web
services. The Blender artistic 3D character and graphicsanimation public domain software is free of utilization.In that context a conversion of the Maya Articiel Plugin to
a Blender Articiel plugin was done. The challenge was thatthe APIs of Maya and Blender were different. We couldntrecompile the Maya C++ code in the Blender API andcontinue further studies of the problem. The MAYA API is
based on the MEL(Maya Embedded Language) scriptinglanguage that is describing the operations applied on thegraphic objects. Collaborative functionalities could be addedto Maya by plugins made in the Microsoft .NET Visual C++
Blender Plugin Implementations for 3D Collaborative Work
Martin Lesage, Omar Cherkaoui, Faysal Abouzaid, Martin Poirier, Gilles Rache, and Martin Riopel
T
8/14/2019 blender pluging implementation
2/13
programming environment. The Blender API is different andbased on the Python[19] language. It doesnt have a specificdedicated graphic operation scripting language. The Blender
plugins are only applicable for texture and sequence and aredeveloped in the LCC/GCC environment. They dont supportthat kind of architecture. We had to study the Python API totranspose the contribution problem in the Blender Python API
programming environment
III. COLLABORATIVE WORKPLATFORMS
The Articiel platform is a Web server applicationregrouping many Web services programmed in the MicrosoftC++ .NET software development package. The Articiel
platforms allows allow groups of users assigned incommunities and studios to work and exchange contributionssimultaneously in real time situation. An artist session usesthe Articiel platform collaborative application to exchangefiles and contributions with other artists. The platformcollaborative application enable the user to perform a worksession (login and logout), to exchange files and contributions
with other users (dataflow management), to add comments tohis work (annotation) and to communicate with other artists by an electronic agenda and mailboxes (workflowmanagement). The platform can be accessed by a Web
browser or by a plugin as shown in figure 1. Due to its trivialoperation mode, the Web browser access will not beconsidered in this paper.
Fig. 1. Articiel platform collaborative model[14]
The Articiel collaborative platform has layered softwarearchitecture. All of its Web server applications areimplemented in Web services. The plugin software developedfor the Articiel platform is entirely base on calls to its Webservices. Figure 2 illustrates the platform project, session and
file management through software layers. The functionalitylayer enables the users registration functionalities (login andlogout) and the files annotation (comments describing thecontributions). The service composition layer manages theWeb services with the UDDI repository. The High-levelservices layer manages the artists contribution and projectfiles. This level also identifies the artist studio andcommunity. The common services layers implements the chatand mailbox services. The low level files storage on the Webserver is managed by the Data level.
Fig. 2. Articiel layered web services architecture[5][13][14]
IV. CONTRIBUTION DEFINITION
The Articiel platform provides a distributed collaborativework platform over the Internet for 3D wiremesh graphics
projects and animations as shown in figure 3. The Articielplatform manages artists projects and contributions. An artist project is a graphic scene or an animation that usuallyincludes 3D characters evolving in a background. The Maya
project files have the .MB extension while the Blenderproject files have the .BLEND extensions.
Fig. 3. An user contribution modifying the nose[16]
In the Articiel collaborative platform context, an artistcontribution is the smallest component of work that the artistcould do to a 3D character. The contribution is generally aslight modification of a 3D character body part (head, limb,arm, head, nose, etc.). Figure 3 illustrates an artistcontribution that is a 3D character nose enlargement. Forcomputer processing, the contribution will be a small text filecontaining software application script or numerical data. TheMaya 3D software application contributions files containsMEL (Mata Embedded Language) script describing themodification (Ex.: select r Setup.vtx[24:168]
Articiel platform
Collaborativeapplication 1
(web browseraccess)
Collaborativeapplication 2
(plugin access)
Collaborativeapplication n
(plugin or webbrowseraccess)
8/14/2019 blender pluging implementation
3/13
Setup.vtx[1321:1324], , etc.). The Blender 3D softwareapplication contribution files contains a list of datarepresentations of the 3D charactersmodified vertex (Ex.:295 [0.0027, 0.0013, 0.000], 309 [0.2123, 0.1001, 0.000], ,etc.). In both case, the contribution file is recording in the textfile the displaced wiremesh vertex resulting of a 3D character
body part modification.
Fig. 4. Articiel contribution reentrancy[14]
An Articiel project contribution has reentrancy properties:the same contribution can be applied several number of timesto the same character resulting a repetition of the modificationthat increase or decreases in magnitude the targeted part ofthe 3D character as shown in figure 4. A contribution applied
at a 3D character can also be applied to a different characteras long as both characters have the same number of vertex.
Fig. 5. Geometrical 3D model of the Blender contribution[15]
The first number of a line of the text file is thenumber of the modified vertex. The numbers in brackets arethe vertex changes for the three dimensional X, Y and Zcoordinates. The resulting vertex difference is: i = vi - vi asdemonstrated in figure 5. The following difference can beexpanded over the x, y and z coordinates :
ix = vix - vixiy = viy - viyiz = viz - viz
The following Python code function describes thegeneration of the contribution in Blender. This code recordsthe list of the modified vertex of the 3D character in a textfile:
def startContribution(self):BLENDER.Window.EditMode(0)
self.OldMesh = GetMesh(self.getPerson())if not self.OldMesh:
return False
self.sendUserData()val = Wrapper.NewLog()self.File = open(Wrapper.getLogPath(), "w")return val
def stopContribution(self):if not self.OldMesh:
return
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"Error("Calculating Contribution")return False
for i in range(len(mesh.verts)):v2 = mesh.verts[i].locv1 = self.OldMesh.verts[i].locif v1[0] != v2[0] or v1[1] != v2[1] or v1[2] != v2[2]:Contribution += str(i) + " " + s tr(v2 - v1) + "\n"
file.write(Contribution)file.close()self.OldMesh = Nonereturn True
V. BLENDERPLUGIN IMPLEMENTATION
The Blender plugin implementation started with the studyof 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 torewrite all of the Maya plugin code accessing the Webservices. An other option was studied which was aPython/C++ wrapper that is the adopted solution and led us toreuse all the Web C++ code implementing the Web servicesaccess.
A. UserInterface
Fig. 6. Articiel platform user interface[13]The Blender plugin user interface is a window of the
Blender user interface. The interface enable the artist to start asession on the Articiel Platform with a login process and alsoto quit the session. The Articiel session enable the artist to docollaborative work in real time simultaneously with the otherlogged users. The plugin also enable the Artist to exchange
projects and contributions while they are working in a session
8/14/2019 blender pluging implementation
4/13
8/14/2019 blender pluging implementation
5/13
Fig. 11. Plugin utilization for 3D characters generation[13]
VII. LIMITATIONS
The Blender plugin described in this paper despite its
flexible SOA architecture is only interacting with the Articielcollaborative platform belonging to the Laboratoire deTlinformatique de lUniversit du Qubec Montral(UQAM). The number of users that could use the applicationis restricted because the user must be registered in the
platform.The graphic artists are currently using 3D graphic
authoring software applications like Maya[17] andBlender[4]. The project leaders should consider the changemanagement considering traditional to collaborative workand also collaborative platforms and the use of a specific
plugin. Our experimentation of this plugin with graphic artistshas led us to give formation sessions to the communities of
artists to improve the understanding of the plugin.The Blender plugin have exactly the same functionalities
than the Maya plugin. The experimenters made noimprovements or modifications to the Articiel platform andcollaborative work techniques.The Blender plugin have beendeveloped in the Windows XP environment. During ourexperimentation with graphics artists, we encounter someinstallation problems with DLL files when the software wasinstalled on a Windows 98 environment.
The contribution nature is different and specific to anapplication. The Blender and Maya contribution files aredifferent and a Maya contribution could not be retrieved in
Blender nor the inverse. Further work in the standardizationof API and scripting language of 3D graphics authoringsoftware(Blender, Maya, Softimage, OpenFX, Unigraphics
NX, ) could enable greater compatibility, file exchange andcollaborative work between these applications.The pluginmust be completely recompiled to work on Linux, MacOSand other platforms or operating systems.
VIII. SUMMARY AND FUTURE WORK
The Artgrid project is a Grid extension of the Articielproject. The Articiel server can be accessed over the Internet.
The Artgrid server is implemented on the Canarie CA*NET4network with Lightpath fiber optical nodes[8].
A. Proposed architecture to access grid Web services withpyGlobus
Our experimentation of the SOAPPy module proved thatthe Blender Python API can access the Globus Grid Webservices by the pyGlobus module as described in figure 12.
The time allowed to realize the project will have to includethe conversion on the 10 000 C++ lines of the Maya plugincode in Python.
Fig. 12. SOAPPy architecture for Grid applicationsB. Proposed architecture to access grid Web services witha wrapper
The Python/C++ wrapper can access the Artgrid Webservices by C++ functions enabling the execution of GridWeb servicesas shown in figure 13.
Fig. 13. C++/Python architecture for Grid applications
C. ArtGRID supporting networkFigure 14 shows the Canarie CA*NET4 network with
Lightpath fiber optical nodes. This network has linked theUQAM, Ryerson and Emily Carr Institute of Arts and Design(ECIAD) universities in the Artgrid project. Futureapplications and conversion of the Blender and Maya plugin
for the Grid using the GLOBUS grid manager will use thisnetwork at its full extent[18].
BLENDERSoftware
Python Script
SOAPPy Web services client
ARTGrid Platform
ArtGRID Grid Web Services(GWSDL)
Requests Responses
pyGlobus Module
GLOBUS Grid manager
BLENDERSoftware
Python Script
Python/C++ Wrapper
Plateforme ARTGrid
ArtGRID Grid Web Services(GWSDL)
Requests Responses
C++ Code
GLOBUS Grid manager
8/14/2019 blender pluging implementation
6/13
Fig. 14. The Canarie CA*NET4 network[13]
IX. CONCLUSION
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 workwas that the code could not be directly transposed andrecompiled in a plugin for Blender because Blender does notdirectly support that kind of plugin architecture. The
programming team had to learn the Python API of Blenderand do scientific research to implement the contribution inBlenders Python scripting API. We found two ways toaccess Web services with the Python API, the first approachwas with the module SOAPPy that was rejected by theobligation to rewrite all the plugin C++ code in Python. Thesecond 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 athttp://www.jabber.com/media/Jabber_Advantages.pdf
[3] F. Bergenti, A. Poggi, and M. Somacher, A collaborative platform forfixed 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 dune plateforme collaborative de
cration de personnages 3D travers le Web. Masters Degree thesis.Montral : Universit du Qubec Montral, M8167, 150pp., 2003.
[6] S. Boutemedjet, ARTICIEL: Document de spcification des nouveaux
besoins de la plateforme Articiel. Laboratoire de recherche detlinformatique de l'UQAM, 17pp., 2003.
[7] S. Boutemedjet, ARTICIEL: Overall requirements and designdescriptions. Laboratoire de recherche de tlinformatique del'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] Gant Beaupr. (2005). Available athttp://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
[13] A. Kabbaj, and J. Martin, Articiel rapport final: Programme ducontenu lectronique de Canarie. Laboratoire de recherche detlinformatique de l'UQAM, project CP-60, 62pp., 2005.
[14] Laboratoire de Recherche de tlinformatique, ARTICIEL :Rapportfinal. Montral(Qu.): Laboratoire de recherche de tlinformatiquede l'UQAM, 62p., 2004
[15] M. Lesage, Le dveloppement dun plugiciel de travail collaboratif pour la plateforme Articiel. Masters Degree thesis. Montral :Universit du Qubec Montral, U5564, 90pp., 2006.
[16] J. Martin, S. Boutemedjet, O. Cherkaoui, L.Poissant & M. Fleury, The
Coordination and Collaborative Process in New Media Projects UsingARTICIEL.New Media Research Networks Conference, 4pp., March2004.
[17] Maya.(2005). Available at: http://www.aliaswavefront.com [18] pyGlobus. (2005). Available
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[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/
[24]Verse. (2005). Available at : http://www.blender.org/modules/verse
8/14/2019 blender pluging implementation
7/13
Fig. 2. Articiel layered web services architecture[5][13][14]
Fig. 3. An user contribution modifying the nose[15]
8/14/2019 blender pluging implementation
8/13
Fig. 4. Articiel contribution reentrancy
Fig. 5. Geometrical 3D model of the Blender contribution[15]
8/14/2019 blender pluging implementation
9/13
Fig. 6. Articiel platform user interface[13]
Fig. 7. Articiel platform functionalities buttons
8/14/2019 blender pluging implementation
10/13
Fig. 8. Blender plugin interaction with the Articiel Platform
Fig. 9. SOAPPy Architecture
BLENDER
SoftwarePython script
SOAPPy Web services client
Articiel platform
Articiel platform Web services
Requests Responses
Articiel platform web services
http://www.teleinfo.uqam.ca/articiel_05/
Artist #1 computer
BLENDER 2.36 Application
Plugin
Contribution(vertex coordinates differences)
Project (.BLEND files)
Artist #2 computer
BLENDER 2.36 Application
Plugin
Contribution(vertex coordinates differences)
Project (.BLEND files)
8/14/2019 blender pluging implementation
11/13
Fig. 10. Wrapper C++/Python Architecture
Fig. 11. Plugin utilization for 3D characters generation[13]
BLENDERSoftware
Python Script(Articiel.py)
Wrapper Python/C++(wrapycpp.cpp)
Articiel Platform
Articiel Platform Web Services (WSDL)
Requests Responses
C++ Code(artwscpp.cpp)
8/14/2019 blender pluging implementation
12/13
Fig. 12. SOAPPy architecture for Grid applications
Fig. 13. C++/Python architecture for Grid applications
BLENDERSoftware
Python Script
Python/C++ Wrapper
Plateforme ARTGrid
ArtGRID Grid Web Services(GWSDL)
Requests Responses
C++ Code
GLOBUS Grid manager
BLENDERSoftware
Python Script
SOAPPy Web services client
ARTGrid Platform
ArtGRID Grid Web Services(GWSDL)
Requests Responses
pyGlobus Module
GLOBUS Grid manager
8/14/2019 blender pluging implementation
13/13
Fig. 14. The Canarie CA*NET4 network[13]